/* Featured Products Section */
.featured-products {
    padding: 2rem 0;
    background: #fff;
}

.featured-products h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #222;
    letter-spacing: 1px;
}

/* New 4x2 Featured Grid */
.featured-grid-4x2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 2rem;
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto;
    /* JS already limits to 8 items; keep shadows visible */
    overflow: visible;
    grid-auto-rows: minmax(auto, auto); /* Ensure rows adjust to content */
}

.featured-grid-4x2 .featured-card:nth-child(n+9) {
    display: none; /* Hide items beyond the 8th for a 4x2 visual */
}

@media (max-width: 1200px) { /* Adjust breakpoint as needed for responsiveness */
    .featured-grid-4x2 {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on smaller screens */
    }
    .featured-grid-4x2 .featured-card:nth-child(n+7) { /* Hide after 6th for 3x2 */
        display: none;
    }
}

@media (max-width: 768px) { /* Adjust breakpoint as needed for responsiveness */
    .featured-grid-4x2 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }
    .featured-grid-4x2 .featured-card:nth-child(n+5) { /* Hide after 4th for 2x2 */
        display: none;
    }
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.featured-image {
    position: relative;
    aspect-ratio: 1;
    background: #f8f8f8;
    overflow: hidden;
}

.featured-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: #C27BA0;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
}

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-btn:hover {
    background: #C27BA0;
    color: white;
}

.featured-info {
    padding: 1.5rem;
}

.featured-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #222;
    line-height: 1.4;
}

.featured-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.featured-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #C27BA0;
}

.featured-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.add-to-cart {
    background: #222;
    color: white;
}

.add-to-cart:hover {
    background: #C27BA0;
}

.quick-view {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.quick-view:hover {
    background: #f5f5f5;
    border-color: #C27BA0;
    color: #C27BA0;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.5rem;
    color: #C27BA0;
}

@media (max-width: 768px) {
    .featured-products {
        padding: 2rem 0;
    }
    
    .featured-products h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .featured-info {
        padding: 1rem;
    }
    
    .featured-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        text-align: center;
    }
}