/* Bestsellers Section - Premium Design */

.bestsellers {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.bestsellers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.bestsellers::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float-bg 60s linear infinite;
    pointer-events: none;
}

@keyframes float-bg {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.bestsellers .container {
    position: relative;
    z-index: 2;
}

.bestsellers .section-title h2 {
    color: white;
    font-size: 2.5rem;
}

.bestsellers .section-title h2::after {
    background: linear-gradient(90deg, #06b6d4, #0ea5e9, #3b82f6);
}

.bestsellers .section-title p {
    color: rgba(255, 255, 255, 0.7);
}

/* Bestsellers Header */
.bestsellers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.bestsellers-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    backdrop-filter: blur(10px);
    animation: glow-badge 2s ease-in-out infinite alternate;
}

@keyframes glow-badge {
    0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
    100% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.4); }
}

.bestsellers-badge i {
    font-size: 1.2rem;
    animation: fire 0.5s ease-in-out infinite alternate;
}

@keyframes fire {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* Bestsellers Slider */
.bestsellers-slider {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.bestsellers-track {
    display: flex;
    gap: 25px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Premium Card Design */
.bestseller-card {
    flex: 0 0 calc(20% - 20px);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.bestseller-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.bestseller-card:hover {
    transform: translateY(-20px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(6, 182, 212, 0.2);
}

.bestseller-card:hover::before {
    opacity: 1;
}

/* Premium Rank Badge */
.bestseller-rank {
    position: absolute;
    top: -5px;
    right: 15px;
    width: 50px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.4rem;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    padding-bottom: 10px;
}

.bestseller-rank.gold {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bestseller-rank.silver {
    background: linear-gradient(180deg, #e5e7eb 0%, #9ca3af 50%, #6b7280 100%);
    box-shadow: 0 10px 30px rgba(156, 163, 175, 0.5);
}

.bestseller-rank.bronze {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.5);
}

.bestseller-rank:not(.gold):not(.silver):not(.bronze) {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

/* Card Image */
.bestseller-image {
    height: 200px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.bestseller-image img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bestseller-card:hover .bestseller-image img {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Sold Count - Premium */
.sold-count {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.sold-count i {
    color: #fbbf24;
}

/* Card Info */
.bestseller-info {
    padding: 22px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.bestseller-category {
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.bestseller-info h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
    line-height: 1.5;
}

.bestseller-info h3 a {
    color: white;
    transition: color 0.3s ease;
}

.bestseller-info h3 a:hover {
    color: #38bdf8;
}

.bestseller-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bestseller-price .current {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bestseller-price .old {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    text-decoration: line-through;
}

/* Premium Add to Cart Button */
.bestseller-cart-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.bestseller-cart-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bestseller-cart-btn i {
    position: relative;
    z-index: 1;
}

.bestseller-cart-btn:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.5);
}

.bestseller-cart-btn:hover::before {
    opacity: 1;
}

/* Premium Slider Navigation */
.bestsellers-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.bestsellers-nav button {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bestsellers-nav button:hover {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .bestseller-card {
        flex: 0 0 calc(25% - 19px);
    }
}

@media (max-width: 992px) {
    .bestseller-card {
        flex: 0 0 calc(33.333% - 17px);
    }
    
    .bestsellers-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .bestsellers .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .bestseller-card {
        flex: 0 0 calc(50% - 13px);
    }
    
    .bestseller-image {
        height: 160px;
    }
    
    .bestseller-rank {
        width: 40px;
        height: 55px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .bestsellers {
        padding: 50px 0;
    }
    
    .bestseller-card {
        flex: 0 0 85%;
    }
    
    .bestsellers-track {
        gap: 15px;
    }
}
