/* ============================================
   CUSTOM RELATED PRODUCTS - CLEAN CSS
   ============================================ */

/* Section wrapper */
.ce-related-products {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

/* Header */
.ce-related-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    color: var(--color-text);
}

/* Grid container - CLEAN, NO CONFLICTS */
.ce-related-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(4, 1fr);
}

/* Product cards - Use your existing card styles */
.ce-related-grid .ce-product-card {
    width: 100%;
    /* All other styling inherited from components.css */
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Desktop - 4 columns */
@media (min-width: 1024px) {
    .ce-related-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Tablet - 3 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .ce-related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile - 2 columns */
@media (max-width: 767px) {
    .ce-related-products {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .ce-related-header h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .ce-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ============================================
   ENSURE COMPATIBILITY WITH YOUR CARDS
   ============================================ */

/* Product card uses existing classes from components.css */
.ce-product-card {
    /* Inherits all styling from components.css */
}

.ce-product-image {
    /* Same as product-card-image */
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
    aspect-ratio: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ce-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.ce-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.ce-product-card:hover .ce-product-image img {
    transform: scale(1.05);
}

.ce-product-badges {
    /* Same as your existing badge wrapper */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0;
}

.ce-product-content {
    /* Same as product-card-content */
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ce-product-footer {
    /* Same as product-card-footer */
    padding: 0 1.25rem 1.25rem;
}

/* Mobile adjustments for content */
@media (max-width: 767px) {
    .ce-product-content {
        padding: 1rem;
    }
    
    .ce-product-footer {
        padding: 0 1rem 1rem;
    }
}