/* Best Sellers Responsive Design - Desktop + Mobile */

/* ========================================
   ROOT VARIABLES & RESETS
   ======================================== */
.best-sellers-wrapper {
    --primary-orange: #FF6B35;
    --primary-orange-hover: #E55A2B;
    --gold: #FFD700;
    --red-accent: #FF4444;
    --dark-header: #2D2D2D;
    --text-primary: #000000;
    --text-secondary: #666666;
    --bg-light: #F8F9FA;
    --border-light: #E5E5E5;
    --white: #FFFFFF;
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */
.breadcrumb-nav {
    padding: 15px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--text-primary);
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-secondary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   HEADER SECTION
   ======================================== */
.bs-header {
    background: linear-gradient(135deg, var(--dark-header) 0%, #1a1a1a 100%);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
}

.bs-header-content {
    display: flex;
    align-items: center;
    gap: 40px;
    color: var(--white);
}


.bs-header-text {
    text-align: center;
}

.bs-main-title {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
    color: var(--white);
}

.bs-sub-title {
    font-size: 18px;
    margin: 5px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* ========================================
   DESKTOP DESCRIPTION
   ======================================== */
.bs-description {
    padding: 15px 20px;
    margin: 0 auto 20px auto;
    max-width: 1200px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.bs-info-icon {
    font-size: 14px;
    color: #007cba;
    flex-shrink: 0;
    margin-top: 1px;
    font-weight: bold;
    border: 1px solid #007cba;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
}

.bs-description p {
    margin: 0;
}

/* ========================================
   DESKTOP GRID LAYOUT
   ======================================== */
.bs-products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bs-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* ========================================
   DESKTOP PRODUCT CARDS
   ======================================== */
.bs-product-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bs-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange);
}

/* Ranking Badges */
.bs-rank-badge {
    position: absolute;
    top: -8px;
    left: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bs-rank-badge.rank-1 { background: var(--gold); color: #000; }
.bs-rank-badge.rank-2 { background: #D3DCEC; color: #000; }
.bs-rank-badge.rank-3 { background: #CD7F32; }
.bs-rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) { 
    background: #D2D2D2; 
    color: #000;
}

/* Product Image */
.bs-product-image {
    position: relative;
    aspect-ratio: 1;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

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

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

/* Campaign Badge */
.bs-campaign-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--red-accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Product Info */
.bs-product-info {
    text-align: left;
}

.bs-product-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-product-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bs-product-title a:hover {
    color: var(--primary-orange);
}

.bs-price-main {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}


/* Fire icon removed */

.bs-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 12px;
}

.bs-stars {
    display: flex;
    gap: 1px;
}

.bs-star {
    font-size: 12px;
    filter: grayscale(100%);
}

.bs-star.filled {
    filter: grayscale(0%);
}

.bs-rating-count {
    color: var(--text-secondary);
}

/* Cart Icon */
.bs-cart-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
}

.bs-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bs-add-cart:hover {
    background: var(--primary-orange-hover);
    transform: scale(1.1);
}

/* ========================================
   MOBILE LAYOUT - SAME AS DESKTOP GRID
   ======================================== */
.bs-products-list {
    display: none;
}

/* Mobile cards use same structure as desktop */
.bs-mobile-card {
    /* Will be styled in media queries to match desktop */
}

/* Mobile Image - Desktop Style */
.bs-mobile-image {
    position: relative;
    aspect-ratio: 1;
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
}

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

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

/* Mobile Ranking Badge - Desktop Style */
.bs-mobile-rank {
    position: absolute;
    top: -6px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bs-mobile-rank.rank-1 { background: var(--gold); color: #000; }
.bs-mobile-rank.rank-2 { background: #D3DCEC; color: #000; }
.bs-mobile-rank.rank-3 { background: #CD7F32; color: #fff; }
.bs-mobile-rank:not(.rank-1):not(.rank-2):not(.rank-3) { 
    background: #D2D2D2; 
    color: #000;
}

/* Mobile Campaign Badge - Desktop Style */
.bs-mobile-campaign {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--red-accent);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Mobile Product Info - Desktop Style */
.bs-mobile-info {
    text-align: left;
}

.bs-mobile-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-mobile-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bs-mobile-title a:hover {
    color: var(--primary-orange);
}

.bs-mobile-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.bs-mobile-social {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 10px;
}


.bs-mobile-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.bs-mobile-stars {
    display: flex;
    gap: 1px;
}

.bs-mobile-count {
    color: var(--text-secondary);
}

/* Mobile Cart Icon - Desktop Style */
.bs-mobile-cart-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
}

.bs-add-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bs-add-cart-btn:hover {
    background: var(--primary-orange-hover);
    transform: scale(1.1);
}

/* Products without rank */
.bs-no-rank .bs-rank-badge,
.bs-no-rank .bs-mobile-rank {
    display: none;
}

/* ========================================
   LOAD MORE SECTION
   ======================================== */
.bs-load-more-container {
    margin-top: 40px;
    text-align: center;
}

.bs-load-more-btn {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 96, 0, 0.2);
}

.bs-load-more-btn:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 96, 0, 0.3);
}

.bs-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bs-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ========================================
   FOOTER
   ======================================== */
.bs-footer {
    text-align: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bs-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-orange);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.bs-back-btn:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-1px);
}

/* ========================================
   WORDPRESS CONTAINER OVERRIDES
   ======================================== */
.wd-content-layout {
    padding: 0 !important;
}

.container, 
.container-fluid {
    padding-inline: 0 !important;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */

/* Tablet & Large Mobile */
@media (max-width: 1024px) {
    .bs-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }
    
    .desktop-grid {
        display: none !important;
    }
    
    /* Show mobile grid with same style as desktop */
    .bs-products-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 20px !important;
        background: #f8f9fa;
    }
    
    /* Use desktop card style for mobile */
    .bs-mobile-card {
        /* Same as desktop .bs-product-card */
        background: var(--white);
        border: 1px solid var(--border-light);
        border-radius: 8px;
        padding: 12px;
        position: relative;
        transition: all 0.3s ease;
        cursor: pointer;
        display: block;
        text-align: left;
    }
    
    .bs-mobile-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255, 96, 0, 0.15);
        border-color: var(--primary-orange);
    }
    
    /* Header adjustments */
    .bs-header {
        height: 100px;
    }
    
    .bs-main-title {
        font-size: 28px;
    }
    
    .bs-sub-title {
        font-size: 16px;
    }
    
    .bs-header-content {
        gap: 20px;
    }
    
}

/* Small Mobile (320px - 375px) */
@media (max-width: 375px) {
    .bs-products-list {
        padding: 12px !important;
        gap: 10px !important;
    }
    
    .bs-mobile-card {
        padding: 8px;
    }
    
    .bs-mobile-rank {
        width: 35px;
        height: 35px;
        font-size: 10px;
        top: -4px;
        left: 6px;
    }
    
    .bs-mobile-campaign {
        font-size: 8px;
        padding: 2px 4px;
        top: 4px;
        right: 4px;
    }
    
    .bs-mobile-title {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .bs-mobile-price {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .bs-mobile-social {
        font-size: 9px;
        margin-bottom: 6px;
    }
    
    .bs-mobile-cart-icon {
        width: 24px;
        height: 24px;
        bottom: 8px;
        right: 8px;
    }
    
    .bs-add-cart-btn {
        font-size: 12px;
    }
}

/* Large Mobile (375px - 768px) */
@media (min-width: 376px) and (max-width: 767px) {
    .bs-products-list {
        padding: 16px !important;
        gap: 12px !important;
    }
    
    .bs-mobile-card {
        padding: 10px;
    }
    
    .bs-mobile-rank {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .bs-mobile-title {
        font-size: 12px;
    }
    
    .bs-mobile-price {
        font-size: 14px;
    }
}

/* ========================================
   ANIMATIONS & PERFORMANCE
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animations */
.bs-product-card,
.bs-mobile-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.bs-product-card:nth-child(1) { animation-delay: 0.1s; }
.bs-product-card:nth-child(2) { animation-delay: 0.2s; }
.bs-product-card:nth-child(3) { animation-delay: 0.3s; }
.bs-product-card:nth-child(4) { animation-delay: 0.4s; }
.bs-product-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}