.bestsellers {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #FDF6E3 0%, #F5F0E6 50%, #FDF6E3 100%);
    position: relative;
    overflow: hidden;
}

.bestsellers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.03"><polygon fill="%238B4513" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.container {
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    color: #8B4513;
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-icon {
    display: inline-block;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.section-subtitle {
    font-size: 1.3rem;
    color: #654321;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(139, 69, 19, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(212, 165, 116, 0.2);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(139, 69, 19, 0.2),
        0 5px 15px rgba(212, 165, 116, 0.3);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.product-badge.hot {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
}

.product-badge.new {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
}

.product-badge.popular {
    background: linear-gradient(45deg, #FFD93D, #FF9A3D);
    color: white;
}

.product-badge.value {
    background: linear-gradient(45deg, #6B5B95, #8B7BAA);
    color: white;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-overlay-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    color: #8B4513;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.product-card:hover .product-overlay-btn {
    bottom: 1rem;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.4rem;
    color: #654321;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-description {
    font-size: 0.9rem;
    color: #8B7BAA;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.8rem;
    color: #8B7BAA;
    font-weight: 600;
}

.product-price {
    font-size: 1.8rem;
    color: #B8860B;
    font-weight: 800;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature {
    background: rgba(212, 165, 116, 0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #8B4513;
    font-weight: 600;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

/* Product Detail Overlay */
.product-detail-overlay {
    position: fixed;
    top: 0;
    right: -45%;
    width: 45%;
    height: 100%;
    background: rgba(255, 253, 248, 0.98);
    backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    overflow-y: auto;
    border-left: 1px solid rgba(212, 165, 116, 0.3);
}

.product-detail-overlay.active {
    right: 0;
}

.overlay-content {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.close-overlay {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.close-overlay:hover {
    background: white;
    transform: rotate(90deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.close-icon {
    font-size: 1.2rem;
    color: #8B4513;
    font-weight: 700;
}

.overlay-product {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.overlay-image-container {
    text-align: center;
}

.overlay-image {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.overlay-details {
    flex: 1;
}

.overlay-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.overlay-title {
    font-size: 2.2rem;
    color: #654321;
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.overlay-description {
    font-size: 1.1rem;
    color: #8B7BAA;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.overlay-rating {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.overlay-features {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.overlay-price-container {
    margin-bottom: 2.5rem;
}

.overlay-price {
    font-size: 2.5rem;
    color: #B8860B;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.price-note {
    font-size: 0.9rem;
    color: #8B7BAA;
    font-weight: 600;
}

.overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 20px;
}

.whatsapp-btn, .wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.whatsapp-btn::before, .wishlist-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.7s ease;
}

.whatsapp-btn:hover::before, .wishlist-btn:hover::before {
    left: 100%;
}

.whatsapp-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
}

.wishlist-btn {
    background: transparent;
    color: #8B4513;
    border: 2px solid #D4A574;
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.2);
}

.wishlist-btn:hover {
    background: rgba(212, 165, 116, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 165, 116, 0.3);
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover .btn-icon, .wishlist-btn:hover .btn-icon {
    transform: scale(1.2);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-overlay {
        width: 60%;
        right: -60%;
    }
}

@media (max-width: 768px) {
    .bestsellers {
        padding: 4rem 1rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .product-detail-overlay {
        width: 85%;
        right: -85%;
    }
    
    .overlay-content {
        padding: 2rem;
    }
    
    .overlay-title {
        font-size: 1.8rem;
    }
    
    .overlay-price {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bestsellers {
        padding: 3rem 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-overlay {
        width: 95%;
        right: -95%;
        padding: 1.5rem;
    }
    
    .overlay-product {
        gap: 1.5rem;
    }
    
    .overlay-image {
        height: 250px;
    }
    
    .overlay-title {
        font-size: 1.6rem;
    }
    
    .overlay-description {
        font-size: 1rem;
    }
    
    .overlay-price {
        font-size: 1.8rem;
    }
    
    .whatsapp-btn, .wishlist-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}