/* Featured Products Section Styles - Exactly Matching Recommended Section */

/* Featured Products Section */
.featured-products-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.featured-products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

/* MASSIVELY INCREASED: Container width for featured section specifically */
.featured-products-section .container {
    max-width: 1800px; /* MASSIVELY INCREASED from 1600px */
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.featured-title {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.featured-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 2px;
}

.featured-subtitle {
    font-size: 1.2rem;
    color: #636e72;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* MASSIVELY INCREASED: Auto-adjusting Product Grid - Much wider with much larger cards */
.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns on desktop */
    gap: 20px; /* KEEP: Same spacing between cards */
    margin-bottom: 3rem;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-width: 1750px; /* MASSIVELY INCREASED: Much wider grid */
    margin-left: auto;
    margin-right: auto;
    grid-auto-rows: min-content;
}

.featured-products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.featured-product-card {
    background: white;
    border-radius: 20px; /* INCREASED: Even more rounded corners */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* INCREASED: Much larger shadow */
    position: relative;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    min-height: 500px; /* MASSIVELY INCREASED: Much taller cards (was 450px) */
}

.featured-product-card:hover {
    transform: translateY(-12px); /* INCREASED: Even more dramatic hover lift */
    box-shadow: 0 20px 40px rgba(0,0,0,0.25); /* INCREASED: Much more dramatic hover shadow */
}

.featured-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,107,107,0.05), rgba(238,90,36,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.featured-product-card:hover::before {
    opacity: 1;
}

.featured-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1; /* Square images */
    flex-shrink: 0;
}

.featured-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-product-card:hover .featured-product-image {
    transform: scale(1.08);
}

.featured-badges {
    position: absolute;
    top: 20px; /* INCREASED: Much more spacing from edge */
    left: 20px;
    z-index: 2;
}

.featured-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 20px; /* INCREASED: Much larger padding */
    border-radius: 14px; /* INCREASED: Much larger border radius */
    font-size: 0.8rem; /* INCREASED: Larger font */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 5px 15px rgba(255,107,107,0.6); /* INCREASED: Much larger shadow */
    display: inline-block;
    margin-right: 8px;
}

.featured-badge.new {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.featured-badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.featured-badge.sale {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.featured-actions {
    position: absolute;
    top: 20px; /* INCREASED: Much more spacing from edge */
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* INCREASED: Larger gap between buttons */
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.featured-product-card:hover .featured-actions {
    opacity: 1;
    transform: translateX(0);
}

.featured-action-btn {
    width: 44px; /* INCREASED: Much larger buttons */
    height: 44px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* INCREASED: Much larger icons */
    color: #636e72;
    backdrop-filter: blur(10px);
}

.featured-action-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

.featured-action-btn.wishlist-btn:hover {
    background: #ff6b6b;
}

.featured-product-info {
    padding: 28px; /* MASSIVELY INCREASED: Much more padding inside cards */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-product-brand {
    color: #636e72;
    font-size: 0.9rem; /* INCREASED: Much larger brand text */
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.featured-product-name {
    font-size: 1.25rem; /* MASSIVELY INCREASED: Much larger product names */
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* height: 3.25em; INCREASED: Adjusted for much larger font */
}

.featured-product-price {
    margin-bottom: 1.2rem; /* INCREASED: Much more spacing */
}

.featured-current-price {
    font-size: 1.5rem; /* MASSIVELY INCREASED: Much larger price text */
    font-weight: 700;
    color: #ff6b6b;
}

.featured-old-price {
    font-size: 1.1rem; /* INCREASED: Much larger old price */
    color: #636e72;
    text-decoration: line-through;
    margin-left: 0.6rem;
}

.featured-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem; /* INCREASED: Much more spacing */
}

.featured-rating-stars {
    color: #ffc107;
    font-size: 1rem; /* INCREASED: Much larger stars */
}

.featured-rating-count {
    color: #636e72;
    font-size: 0.9rem; /* INCREASED: Much larger rating count */
}

.featured-add-to-cart {
    width: 100%;
    padding: 8px 5px; /* MASSIVELY INCREASED: Much larger button padding */
    background: #2d3436;
    color: white;
    border: none;
    border-radius: 12px; /* INCREASED: Much larger border radius */
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem; /* INCREASED: Much larger button text */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.featured-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.featured-add-to-cart:hover::before {
    left: 100%;
}

.featured-add-to-cart:hover {
    background: #ff6b6b;
    transform: translateY(-1px);
}

/* Loading States */
.featured-loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.featured-loading-spinner.active {
    display: flex;
}

.featured-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* View All Button */
.featured-view-all {
    text-align: center;
    margin-top: 3rem;
}

.featured-view-all-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(255,107,107,0.3);
    position: relative;
    overflow: hidden;
}

.featured-view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.featured-view-all-btn:hover::before {
    left: 100%;
}

.featured-view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255,107,107,0.4);
}

/* Dynamic Grid Adjustments for Fewer Products */
.featured-products-grid[data-count="1"] { justify-items: center; }
.featured-products-grid[data-count="2"] { justify-items: center; }
.featured-products-grid[data-count="3"] { justify-items: center; }
.featured-products-grid[data-count="4"] { justify-items: center; }
.featured-products-grid[data-count="5"] { justify-items: center; }
.featured-products-grid[data-count="6"] { justify-items: center; }

/* UPDATED: Responsive Design - Much wider layouts with larger cards */
@media (max-width: 1800px) {
    .featured-products-section .container {
        max-width: 1600px;
        padding: 0 1.5rem;
    }
    
    .featured-products-grid {
        max-width: 1550px;
        gap: 18px; /* KEEP: Same reduced spacing */
    }
}

@media (max-width: 1600px) {
    .featured-products-section .container {
        max-width: 1400px;
        padding: 0 1.5rem;
    }
    
    .featured-products-grid {
        max-width: 1350px;
        gap: 18px; /* KEEP: Same spacing */
    }
}

@media (max-width: 1400px) {
    .featured-products-section .container {
        max-width: 1200px;
        padding: 0 1.5rem;
    }
    
    .featured-products-grid {
        max-width: 1150px;
        gap: 16px; /* REDUCED: Smaller gap */
    }
}

@media (max-width: 1200px) {
    .featured-products-section .container {
        max-width: 1000px;
    }
    
    .featured-products-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 960px;
        gap: 16px; /* REDUCED: Smaller gap for larger cards */
    }
}

@media (max-width: 968px) {
    .featured-products-section .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .featured-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .featured-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        max-width: 100%;
    }
    
    .featured-title {
        font-size: 2.5rem;
    }
    
    .featured-product-info {
        padding: 22px;
    }
    
    .featured-action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .featured-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    .featured-title {
        font-size: 2rem;
    }
    
    .featured-subtitle {
        font-size: 1rem;
    }
    
    .featured-product-info {
        padding: 18px;
    }
    
    .featured-product-card {
        min-height: 420px;
    }
}

/* UPDATED: Special layouts for very few products - much wider layouts with much larger cards */
@media (min-width: 969px) {
    /* 1 product - center it nicely */
    .featured-products-grid[data-count="1"] {
        grid-template-columns: 1fr;
        max-width: 380px; /* INCREASED: Much larger single card */
    }
    
    /* 2 products - center them in a row */
    .featured-products-grid[data-count="2"] {
        grid-template-columns: repeat(2, 1fr);
        max-width: 780px; /* INCREASED: Much larger for 2 cards + gap */
    }
    
    /* 3 products - center them in a row */
    .featured-products-grid[data-count="3"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1180px; /* INCREASED: Much larger for 3 cards + gaps */
    }
    
    /* 4 products - display in a single row */
    .featured-products-grid[data-count="4"] {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1580px; /* INCREASED: Much larger for 4 cards + gaps */
    }
    
    /* 5 products - display in a single row */
    .featured-products-grid[data-count="5"] {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1750px; /* INCREASED: Near full width for 5 cards */
    }
    
    /* 6 products - display in a single row */
    .featured-products-grid[data-count="6"] {
        grid-template-columns: repeat(6, 1fr);
        max-width: 1750px; /* INCREASED: Full width for 6 cards */
    }
}

/* Professional spacing for small counts */
.featured-products-grid[data-count="1"],
.featured-products-grid[data-count="2"],
.featured-products-grid[data-count="3"],
.featured-products-grid[data-count="4"],
.featured-products-grid[data-count="5"],
.featured-products-grid[data-count="6"] {
    margin-bottom: 2rem;
}

/* Animation Delays for Staggered Effect */
.featured-product-card:nth-child(1) { animation-delay: 0ms; }
.featured-product-card:nth-child(2) { animation-delay: 100ms; }
.featured-product-card:nth-child(3) { animation-delay: 200ms; }
.featured-product-card:nth-child(4) { animation-delay: 300ms; }
.featured-product-card:nth-child(5) { animation-delay: 400ms; }
.featured-product-card:nth-child(6) { animation-delay: 500ms; }

/* Scroll Animation */
.featured-product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Special Effects */
.featured-product-card:hover .featured-product-name {
    color: #ff6b6b;
}

.featured-product-card:hover .featured-current-price {
    transform: scale(1.05);
}