/* ===== Category Spotlight Sections ===== */
/* Base styles for all spotlight sections */
.category-spotlight-section {
    margin: 3rem 0;
    padding: 0 1rem;
    position: relative;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.category-spotlight-section .spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.category-spotlight-section .spotlight-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
    position: relative;
    padding-left: 1rem;
    font-weight: 600;
}

.category-spotlight-section .spotlight-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background: #0066cc;
    border-radius: 2px;
}

.category-spotlight-section .spotlight-view-all {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.category-spotlight-section .spotlight-view-all:hover {
    color: #004499;
    text-decoration: underline;
}

.category-spotlight-section .spotlight-view-all::after {
    content: '→';
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.category-spotlight-section .spotlight-view-all:hover::after {
    transform: translateX(3px);
}

/* Products container - using flex for better horizontal scrolling */
.spotlight-products {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    gap: 1.5rem;
}

/* Hide scrollbar but keep functionality */
.spotlight-products::-webkit-scrollbar {
    display: none;
}

/* Product card styles */
.spotlight-products .spotlight-product-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 250px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
}

.spotlight-products .spotlight-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

.spotlight-products .spotlight-product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

.spotlight-products .spotlight-product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f9f9f9;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: transform 0.3s ease;
}

.spotlight-products .spotlight-product-card:hover img {
    transform: scale(1.03);
}

.spotlight-products .spotlight-product-card h3 {
    font-size: 1rem;
    margin: 0.75rem 1rem 0.5rem;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-products .spotlight-price {
    margin: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.spotlight-products .spotlight-original-price {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.spotlight-products .spotlight-current-price {
    font-size: 1.1rem;
    color: #e63946;
    font-weight: 600;
}

.spotlight-products .spotlight-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e63946;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* prevents full-width stretching */
}

/* Add to Cart Form */
.spotlight-products .add-to-cart-form {
    margin: 1rem;
    margin-top: auto;
    text-align: center;
}

.spotlight-products .spotlight-no-products {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
    width: 100%;
}

/* Category-specific accent colors */
.printers-spotlight .spotlight-header h2::before {
    background: #8a2be2; /* Purple for printers */
}

.computers-spotlight .spotlight-header h2::before {
    background: #2e8b57; /* Green for computers */
}

.monitors-spotlight .spotlight-header h2::before {
    background: #1e90ff; /* Blue for monitors */
}

.cameras-spotlight .spotlight-header h2::before {
    background: #ff6b6b; /* Coral red for cameras */
}

/* ===== Category Banner Styles ===== */
.category-banner {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 300px;
    background: #f8f9fa;
}

.category-banner .banner-content {
    flex: 1;
    padding: 2.5rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.category-banner .banner-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

.category-banner .banner-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #555;
    max-width: 500px;
}

.category-banner .banner-cta {
    display: inline-block;
    background: #0066cc;
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #0066cc;
    text-align: center;
    max-width: 200px;
}

.category-banner .banner-cta:hover {
    background: transparent;
    color: #0066cc;
    transform: translateY(-2px);
}

.category-banner .banner-image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.category-banner .banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-banner:hover .banner-image img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .spotlight-products .spotlight-product-card {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .category-spotlight-section {
        padding: 0 1.5rem;
    }
    
    .category-spotlight-section .spotlight-header h2 {
        font-size: 1.6rem;
    }
    
    .spotlight-products .spotlight-product-card {
        width: 200px;
    }
    
    .category-banner {
        flex-direction: column;
        min-height: auto;
    }
    
    .category-banner .banner-content {
        padding: 2rem;
        text-align: center;
        order: 2;
    }
    
    .category-banner .banner-image {
        min-height: 250px;
        order: 1;
    }
    
    .category-banner .banner-cta {
        align-self: center;
    }
}

@media (max-width: 768px) {
    .spotlight-products .spotlight-product-card {
        width: 180px;
    }
    
    .spotlight-products .spotlight-product-card img {
        height: 140px; /* reduced */
        padding: 0.6rem;
    }

    .spotlight-products .spotlight-discount-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        top: 6px;
        right: 6px;
    }
    
    .category-spotlight-section .spotlight-header h2 {
        font-size: 1.4rem;
    }
    
    .category-banner {
        min-height: 220px;
    }
    
    .category-banner .banner-content {
        padding: 1.5rem;
    }
    
    .category-banner .banner-content h3 {
        font-size: 1.6rem;
    }
    
    .category-banner .banner-content p {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .spotlight-products {
        gap: 0.8rem;
    }

    .spotlight-products .spotlight-product-card {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }

    .spotlight-products .spotlight-product-card img {
        height: 100px; /* reduced */
        padding: 0.6rem;
    }

    .spotlight-products .spotlight-discount-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
        border-radius: 3px;
        top: 5px;
        right: 5px;
    }

    .category-spotlight-section {
        padding: 0 1rem;
    }

    .category-spotlight-section .spotlight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .category-spotlight-section .spotlight-header h2 {
        font-size: 1.2rem;
    }

    .spotlight-products .spotlight-product-card h3 {
        font-size: 0.85rem;
    }

    .spotlight-products .spotlight-current-price {
        font-size: 0.95rem;
    }

    .category-banner {
        min-height: 160px;
    }

    .category-banner .banner-content {
        padding: 1rem;
    }

    .category-banner .banner-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }

    .category-banner .banner-content p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .category-banner .banner-image {
        min-height: 140px;
        max-height: 160px;
    }
}

