/* ================================================
   TOP SELLERS - FIXED ALL ISSUES
   ================================================ */

/* Container */
.sellers-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 24px;
    margin: 30px 50px 20px;
    background-color: #ffffff;
}

.top-container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.top-container .column {
    flex: 1;
    min-width: 300px;
    max-width: calc(50% - 12px);
}

.top-container .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a365d;
}

/* Swiper Setup - PROPER OVERFLOW */
.top-container .swiper {
    width: 100%;
    height: 370px;
    padding: 10px 5px;
    margin: -10px -5px;
}

.top-container .swiper-wrapper {
    align-items: center;
}

.top-container .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============ CATEGORY CARDS - NO CROP ============ */
.ts-card {
    width: 220px;
    height: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ts-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.ts-card:hover .ts-card-overlay {
    opacity: 1;
}

.ts-card-image {
    width: 100%;
    height: 100%;
    position: relative;
}

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

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

.ts-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 54, 93, 0.9), transparent);
    padding: 24px 12px 12px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.ts-card-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    display: block;
}

/* ============ PRODUCT CARDS ============ */
.ts-product {
    width: 220px;
    height: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ts-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Badges */
.ts-badge-topseller {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.ts-badge-discount {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Product Image */
.ts-product-image {
    width: 100%;
    height: 150px;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.ts-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    transition: transform 0.3s ease;
}

.ts-product:hover .ts-product-image img {
    transform: scale(1.08);
}

/* Product Info */
.ts-product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ts-product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    margin: 0;
    height: 34px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    order: 1;
}

/* Price Section - SIDE BY SIDE */
.ts-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    order: 2;
}

.ts-price-current {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a365d;
}

.ts-price-original {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.ts-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 18px;
    order: 3;
}

.ts-stars {
    color: #fbbf24;
    font-size: 0.75rem;
}

.ts-rating-num {
    color: #64748b;
    font-size: 0.7rem;
}

.ts-product-sold {
    color: #64748b;
    font-size: 0.7rem;
    height: 18px;
    line-height: 18px;
    order: 4;
}

/* ============ NAVIGATION ARROWS ============ */
.top-container .swiper-button-next,
.top-container .swiper-button-prev {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    color: #1a365d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.top-container .swiper-button-next:hover,
.top-container .swiper-button-prev:hover {
    background: #1a365d;
    color: #fff;
    border-color: #1a365d;
    transform: scale(1.12);
    box-shadow: 0 6px 18px rgba(26, 54, 93, 0.35);
}

.top-container .swiper-button-next::after,
.top-container .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 900;
}

/* ============ CHIPS SECTION ============ */
.chips-section {
    margin-top: 8px;
    position: relative;
    padding: 0 58px;
}

.chip-swiper {
    overflow: hidden;
}

.chip-swiper .swiper-slide {
    width: auto;
}

.chip {
    background: #dbeafe;
    color: #1a365d;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.chip:hover {
    background: #bfdbfe;
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.15);
}

.chip.active {
    background: #1a365d;
    color: #fff;
    border-color: #1a365d;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

/* Chips Navigation */
.chip-swiper .swiper-button-next,
.chip-swiper .swiper-button-prev {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    color: #1a365d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.chip-swiper .swiper-button-next:hover,
.chip-swiper .swiper-button-prev:hover {
    background: #1a365d;
    color: #fff;
    border-color: #1a365d;
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(26, 54, 93, 0.35);
}

.chip-swiper .swiper-button-next::after,
.chip-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 900;
}

.chip-swiper .swiper-button-next {
    right: 2px;
}

.chip-swiper .swiper-button-prev {
    left: 2px;
}

/* ============ SKELETON LOADERS ============ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card,
.skeleton-product {
    width: 220px;
    height: 320px;
    margin: 0 auto;
}

.skeleton-chip {
    width: 90px;
    height: 42px;
}

.skeleton-loader {
    display: block;
}

.actual-content {
    display: none;
}

.actual-content.loaded {
    display: block;
}

.skeleton-loader.hidden {
    display: none;
}

.products-swiper.loading-filter {
    opacity: 0.6;
    pointer-events: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .sellers-container {
        margin: 30px 30px 20px;
        padding: 20px;
    }
    
    .top-container .column {
        max-width: calc(50% - 12px);
    }
    
    .ts-card,
    .ts-product,
    .skeleton-card,
    .skeleton-product {
        width: 200px;
        height: 300px;
    }
    
    .ts-product-image {
        height: 135px;
    }
    
    .ts-product-name {
        font-size: 0.8rem;
        height: 32px;
    }
    
    .ts-price-current {
        font-size: 0.9rem;
    }
    
    .ts-price-original {
        font-size: 0.7rem;
    }
    
    .top-container .swiper {
        height: 350px;
    }
}

@media (max-width: 1024px) {
    .sellers-container {
        margin: 30px 20px 20px;
        padding: 18px;
    }
    
    .top-container .column {
        max-width: calc(50% - 12px);
    }
    
    .ts-card,
    .ts-product,
    .skeleton-card,
    .skeleton-product {
        width: 190px;
        height: 290px;
    }
    
    .ts-product-image {
        height: 130px;
    }
    
    .ts-product-name {
        font-size: 0.78rem;
        height: 31px;
    }
    
    .ts-price-current {
        font-size: 0.88rem;
    }
    
    .ts-stars {
        font-size: 0.7rem;
    }
    
    .ts-rating-num,
    .ts-product-sold {
        font-size: 0.68rem;
    }
    
    .top-container .swiper {
        height: 340px;
    }
}

@media (max-width: 768px) {
    .sellers-container,
    .top-container,
    .chips-section {
        display: none;
    }
}

@media (min-width: 769px) {
    .sellers-container {
        display: flex;
    }
    
    .top-container .column {
        max-width: calc(50% - 12px);
    }
}