/* Product Showcase CSS - Exact measurements from Figma Design */
/* Reusable component for product showcases with banner and cards */

/* Product Showcase Section */
.product-showcase {
    /* padding: 12px 240px 12px 240px; */
    padding: 12px 16px 12px;
    background: #F3F3F3;
}

.showcase-container {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* overflow-x: hidden;
    overflow-y: visible; */
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
}

/* Showcase Title */
.showcase-title {
    font-family: 'SF Pro', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 40px;
    color: #3D3D3D;
    text-align: center;
    margin: 0;
}

/* Showcase Content */
.showcase-content {
    display: flex;
    /* gap: 16px; */
    gap: 18px;
    width: 100%;
    /* padding: 8px 0 16px 0; */
    padding: 0px 0 0px 0;
    overflow: visible;
}

/* Left Banner */
.showcase-banner {
    width: 318px;
    min-height: 421px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    align-self: stretch;
    background: #F5F5F5; /* Background color khi ảnh nhỏ hơn container */
}

.banner-main-img,
.banner-overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 12px;
}

/* Right Product Cards */
.showcase-products {
    flex: 1;
    display: flex;
    gap: 18px;
    overflow: visible;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* Product Showcase Card */
.product-showcase-card {
    /* flex: 1; */
    /* min-width: 0; */
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow:0px 2px 4px rgba(0, 0, 0, 0.04),
                0px 4px 8px rgba(16, 24, 40, 0.03);
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.product-showcase-card:hover {
    box-shadow: 0px 8px 8px -8px rgba(0, 0, 0, 0.12),
                0px 8px 24px 12px rgba(16, 24, 40, 0.04),
                0px 4px 40px -4px rgba(16, 24, 40, 0.06);
    z-index: 10;
}

/* Khi hover vào icon VAT, tăng z-index của card */
.product-showcase-card:has(.vat-icon:hover) {
    z-index: 10000;
}

/* Product Badge - Top Left Corner */
.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 15px 2px 12px;
    border-radius: 12px 0 32px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;

    /* Default values - can be overridden with CSS variables */
    background: var(--badge-bg, #4564ED);
    color: var(--badge-color, #FFFFFF);
}

.product-badge-text {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 590;
    line-height: 18px;
    white-space: nowrap;
}

.product-badge-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Preset badge styles */
.product-badge.badge-new {
    --badge-bg: #F24808;
    --badge-color: #FFFFFF;
}

.product-badge.badge-recommended {
    --badge-bg: #FF730A;
    --badge-color: #FFFFFF;
}

.product-badge.badge-hot {
    --badge-bg: #FF2156;
    --badge-color: #FFFFFF;
}

.product-badge.badge-sale {
    --badge-bg: #00C48C;
    --badge-color: #FFFFFF;
}

.product-badge.badge-best-seller {
    --badge-bg: #FFB800;
    --badge-color: #3D3D3D;
}

/* Custom badge - use inline style or CSS variables */
.product-badge.badge-custom {
    /* Custom colors set via inline style or CSS variables */
}

/* Show badge based on data attribute */
.product-showcase-card[data-badge="new"] .product-badge.badge-new,
.product-showcase-card[data-badge="recommended"] .product-badge.badge-recommended,
.product-showcase-card[data-badge="hot"] .product-badge.badge-hot,
.product-showcase-card[data-badge="sale"] .product-badge.badge-sale,
.product-showcase-card[data-badge="best-seller"] .product-badge.badge-best-seller,
.product-showcase-card[data-badge] .product-badge.badge-custom {
    display: flex;
}

/* Product Image */
.product-image {
    width: 100%;
    min-height: 204px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.product-image > img:not(.badge-almost-soldout) {
    width: 100%;
    min-height: 204px;
    object-fit: cover;
    object-position: 50% 50%;
}

/* Product Image Features - Only for product-showcase-grid section */
.product-showcase-grid .product-image > img:not(.badge-almost-soldout) {
    aspect-ratio: 1 / 1.1;
}

.product-showcase-grid .product-image-features {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.product-showcase-grid .feature-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    padding: 6px 4px;
}

.product-showcase-grid .feature-icon-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.product-showcase-grid .feature-icon-item span {
    font-family: 'SF Pro', sans-serif;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.3;
    color: #3D3D3D;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-width: 60px;
}

/* Almost Soldout Badge - Desktop & Tablet: 52x52px */
.badge-almost-soldout {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 52px;
    height: 52px;
    object-fit: contain;
    z-index: 10;
    display: none; /* Hidden by default */
}

/* Show badge when parent has data-badge="almost-soldout" or has class "show-badge" */
.product-showcase-card[data-badge="almost-soldout"] .badge-almost-soldout,
.product-showcase-card.show-badge .badge-almost-soldout {
    display: block;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 16px;
    justify-content: space-between;
    overflow: visible;
}

/* Product Details */
.product-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product Description */
.product-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* Product Title Container */
.product-title-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Product Title */
.product-title {
    font-family: 'SF Pro', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    color: #3D3D3D;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Product Title Content - contains title text and price */
.product-title-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Product Price Container */
.product-price-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    /* padding-top: 8px; */
    padding-bottom: 8px;
    overflow: visible;
}

.product-price-details {
    display: flex;
    flex-direction: column;
    /* gap: 4px; */
    overflow: visible;
    align-items: baseline; /* Align all child elements to baseline */
}

/* Product Price */
.product-price {
    display: flex;
    gap: 4px;
    align-items: baseline; /* Align to baseline for bottom alignment */
}

.price-amount {
    font-family: 'SF Pro', sans-serif;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.15;
    color: #4564ED;
}

.price-unit {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 12px;
    color: #3D3D3D;
    position: relative;
}

/* Product VAT */
.product-vat {
    display: flex;
    gap: 6px;
    align-items: center;
    position: relative;
}

.product-vat span {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #3D3D3D;
}

.vat-icon-wrapper {
    position: relative;
    top: 2px;
    display: inline-block;
}

.vat-icon,
.price-vat-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.vat-icon:hover,
.price-vat-icon:hover {
    opacity: 0.7;
}
/* VAT Tooltip for Product Showcase */
.vat-icon-wrapper .vat-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #3D3D3D;
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    white-space: normal;
    max-width: 280px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    pointer-events: auto;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    overflow-wrap: break-word; /* phá từ dài */
    word-wrap: break-word;     /* fallback cũ */
    word-break: break-word;    /* với từ quá dài */
    white-space: normal;
}

.vat-icon-wrapper .vat-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #3D3D3D;
}

.vat-icon:hover + .vat-tooltip,
.price-vat-icon:hover + .vat-tooltip,
.vat-icon-wrapper .vat-tooltip:hover,
.vat-icon-wrapper .vat-tooltip.active {
    opacity: 1;
    visibility: visible;
}

/* Product Old Price (for discount products) */
.product-old-price {
    display: flex;
    gap: 6px;
    align-items: center;
}

.old-price-amount {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #9CA3AF;
    text-decoration: line-through;
}

.discount-badge {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: #FF2156;
    background: #FFE5ED;
    padding: 0px 2px;
    border-radius: 4px;
    display: inline-block;
}

/* Product Features */
.product-features {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
    height: 60px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #D1D1D1 transparent;
}

.feature-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-right: 8px;
}

.feature-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.feature-item span {
    font-family: 'SF Pro', sans-serif;
    font-size: 12px;
    font-weight: 410;
    line-height: 18px;
    color: #3D3D3D;
    flex: 1;
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Buy Button */
/* .btn-buy {
    background: #4564ED;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-family: 'SF Pro', sans-serif;
    font-size: 14px;
    font-weight: 410;
    line-height: 20px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    display: block;
    text-decoration: none;
} */

.btn-buy:hover {
    background: #3550d8;
    box-shadow: 0px 4px 12px 0px rgba(69, 100, 237, 0.3);
}

/* View All Link */
.showcase-view-all {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'SF Pro', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: #4564ED;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-link .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) and (max-width: 1440px)  {
    .product-showcase-scroll .product-showcase-card .product-info {
        gap: 0;
    }
}

/* iPad mini (768-900px): Same layout as 1024px - Banner left, cards scroll right */
@media (min-width: 768px) and (max-width: 900px) {
    .product-showcase {
        /* padding: 12px 40px 12px 40px; */
        padding: 12px 16px 12px;
    }

    .showcase-container {
        /* padding: 20px; */
        padding: 16px;
        gap: 20px;
    }

    .showcase-title {
        font-size: 22px;
        line-height: 30px;
    }

    /* Banner left, products right with scroll - Same as 1024px */
    .showcase-content {
        display: flex !important;
        flex-direction: row !important;
        gap: 16px;
        overflow: visible;
    }

    .showcase-banner {
        /* width: 260px; */
        flex-shrink: 0;
        align-self: stretch;
    }

    /* Products scroll horizontal - Same as 1024px */
    .showcase-products,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner) {
        flex: 1;
        display: flex !important;
        overflow-x: auto;
        overflow-y: visible;
        gap: 14px;
        flex-wrap: nowrap !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent;
    }

    .showcase-products::-webkit-scrollbar,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar {
        height: 6px;
    }

    .showcase-products::-webkit-scrollbar-track,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-track {
        background: transparent;
    }

    .showcase-products::-webkit-scrollbar-thumb,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .showcase-products::-webkit-scrollbar-thumb:hover,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .product-showcase-card {
        flex: 0 0 240px !important;
        width: 240px;
    }

    .product-title {
        font-size: 15px;
    }

    .price-amount {
        font-size: 20px;
    }

    .product-info {
        padding: 12px;
    }
}

/* iPad Landscape (11" and 10.9") */
@media (min-width: 835px) and (max-width: 1194px) {
    .product-showcase {
        /* padding: 12px 50px 12px0px 50px; */
        padding: 12px 24px 12px;
    }

    .showcase-content {
        gap: 16px;
    }

    .showcase-banner {
        /* width: 280px; */
    }

    .showcase-products {
        gap: 14px;
    }

    .product-title {
        font-size: 16px;
    }

    .price-amount {
        font-size: 22px;
    }

    .product-info {
        padding: 14px;
    }

    .feature-item span {
        font-size: 11px;
        line-height: 16px;
    }
}

/* Tablet and Medium Desktop (901px-1440px) */
@media (min-width: 901px) and (max-width: 1440px) {
    .product-showcase {
        /* padding: 12px 60px 12px 60px; */
        padding: 12px 24px 12px;
    }

    .showcase-container {
        /* padding: 20px; */
        padding: 24px;
        gap: 20px;
    }

    .showcase-title {
        font-size: 24px;
        line-height: 32px;
    }

    /* Banner left, products right with scroll */
    .showcase-content {
        display: flex !important;
        flex-direction: row !important;
        gap: 18px;
    }

    .showcase-banner {
        /* width: 280px; */
        flex-shrink: 0;
        align-self: stretch;
    }

    /* Swiper for horizontal scroll */
    .swiper-showcase-products {
        flex: 1;
        display: flex !important;
        /* overflow-x: auto;
        overflow-y: visible; */
        gap: 16px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent;
    }

    .swiper-showcase-products::-webkit-scrollbar {
        height: 6px;
    }

    .swiper-showcase-products::-webkit-scrollbar-track {
        background: transparent;
    }

    .swiper-showcase-products::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .swiper-showcase-products::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .swiper-showcase-products .swiper-slide {
        /* flex: 0 0 260px !important;
        width: 260px !important; */
    }

    .product-showcase-card {
        width: 260px;
        height: auto;
    }

    .product-title {
        font-size: 16px;
    }

    .price-amount {
        font-size: 22px;
    }

    .product-info {
        padding: 14px;
    }
}

/* iPad Pro 12.9" and Medium Desktop */
@media (min-width: 1024px) and (max-width: 1440px) {
    .product-showcase {
        /* padding: 12px 60px 12px 60px; */
        padding: 12px 24px 12px;
    }

    .showcase-content {
        display: flex !important;
        flex-direction: row !important;
        gap: 18px;
        overflow: visible;
    }

    .showcase-banner {
        /* width: 300px; */
        flex-shrink: 0;
    }

    .showcase-products,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner) {
        flex: 1;
        display: flex !important;
        overflow-x: auto;
        overflow-y: visible;
        gap: 16px;
        flex-wrap: nowrap !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent;
    }

    .showcase-products::-webkit-scrollbar,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar {
        height: 6px;
    }

    .showcase-products::-webkit-scrollbar-track,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-track {
        background: transparent;
    }

    .showcase-products::-webkit-scrollbar-thumb,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 3px;
    }

    .showcase-products::-webkit-scrollbar-thumb:hover,
    .product-showcase-grid .showcase-content > div:not(.showcase-banner)::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    .product-showcase-card {
        flex: 0 0 280px !important;
        width: 280px;
    }

    .product-info {
        padding: 14px;
    }
}

/* Responsive Design */
@media (max-width: 1680px) {
    .product-showcase {
        /* padding: 12px 120px 12px 120px; */
        padding: 12px 24px 12px;
    }
}

@media (max-width: 1440px) {
    .product-showcase {
        /* padding: 12px 80px 12px 80px; */
        padding: 12px 16px 12px;
    }

    .showcase-content {
        gap: 16px;
    }

    .showcase-products {
        gap: 16px;
    }
}

@media (max-width: 1200px) {
    .product-showcase {
        /* padding: 12px 60px 12px 60px; */
    }

    .showcase-title {
        font-size: 24px;
        line-height: 32px;
    }

    .showcase-content {
        height: auto;
        flex-direction: column;
    }

    .showcase-banner {
        /* width: 100%; */
    }

    .showcase-products {
        flex-wrap: wrap;
        gap: 16px;
    }

    .product-showcase-card {
        flex-basis: calc(50% - 8px);
        height: auto;
    }
}

@media (max-width: 768px) {
    .product-showcase {
        padding: 12px 16px 12px;
    }

    .product-showcase {
        /* padding: 0 !important; */
    }

    .showcase-container {
        background: transparent !important;
        border-radius: 0 !important;
        padding: 16px !important;
        gap: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .showcase-content {
        width: 100% !important;
    }

    .showcase-title {
        /* font-size: 20px;
        line-height: 28px;
        font-weight: 700;
        text-align: center; */
    }

    /* Mobile: Banner on top, Cards on bottom */
    .showcase-content {
        flex-direction: column;
        gap: 16px;
    }

    /* Banner takes full width on top */
    .showcase-banner {
        border-radius: 12px;
        /* margin-right: 8px; */
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.03);
        order: -1; /* Ensures banner appears first */
    }

    .showcase-banner img {
        border-radius: 12px;
    }

    /* ===========================================
       SCROLL MODE - Swiper horizontal scroll
       =========================================== */
    .product-showcase-scroll .showcase-container {
        padding: 16px 0 !important;
    }

    .product-showcase-scroll .showcase-title {
        padding: 0 16px !important;
    }

    .product-showcase-scroll .showcase-content {
        /* padding: 0 16px !important; */
    }

    .product-showcase-scroll .swiper-showcase-products {
        /* width: 100vw !important;
        margin: 0 -16px !important;
        overflow: hidden !important;
        padding-left: 8px !important;
        padding-right: 16px !important; */
    }

    .product-showcase-scroll .swiper-slide {
        width: 253px !important;
    }

    /* Add margin to last slide for proper spacing */
    .product-showcase-scroll .swiper-slide:last-child {
        margin-right: 0 !important;
    }

    /* ===========================================
       GRID MODE: Remaining sections - 2 column grid with Swiper
       Keep Swiper but display as 2x2 grid with vertical scroll
       =========================================== */
    .product-showcase-grid .swiper-showcase-products {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding: 0 16px !important;
        display: block !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        height: auto !important;
    }

    .product-showcase-grid .swiper-showcase-products .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }

    .product-showcase-grid .swiper-showcase-products .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    /* Product cards - wider and shorter for grid mode */
    .product-showcase-grid .product-showcase-card {
        flex-basis: auto;
        width: 100%;
        min-height: auto;
        height: auto;
        border-radius: 12px;
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.03);
    }

    /* Product cards for scroll mode - original height */
    .product-showcase-scroll .product-showcase-card {
        flex-basis: auto;
        width: 100%;
        /* min-height: 421px; */
        height: auto;
        border-radius: 12px;
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.03);
    }

    /* Product image aspect ratio - shorter for grid */
    .product-showcase-grid .product-showcase-card .product-image {
        width: 100%;
        height: auto;
        max-height: 148px;
        overflow: hidden;
    }

    .product-showcase-grid .product-showcase-card .product-image img:not(.badge-almost-soldout) {
        aspect-ratio: 1 / 1.2;
        object-fit: cover;
        object-position: 50% 50%;
    }

    /* Product image for scroll mode */
    .product-showcase-scroll .product-showcase-card .product-image {
        width: 100%;
        max-height: 148px;
        overflow: hidden;
    }

    .product-showcase-scroll .product-showcase-card .product-image img {
        width: 100%;
        aspect-ratio: 1026 / 900;
        object-fit: cover;
    }

    /* Product info padding - compact for grid */
    .product-showcase-grid .product-showcase-card .product-info {
        padding: 6px 8px 8px 8px;
        gap: 6px;
    }

    .product-showcase-grid .product-showcase-card .product-price-container {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Product info for scroll mode */
    .product-showcase-scroll .product-showcase-card .product-info {
        padding: 8px 16px 16px 16px;
        /* gap: 10px; */
    }

    .product-showcase-scroll .product-showcase-card .product-price-container {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Show first 4 cards in GRID mode (2x2 grid) */
    .product-showcase-grid .swiper-showcase-products .swiper-slide:nth-child(-n+4) {
        display: block !important;
    }

    /* Hide extra cards for GRID mode only (from 5th onwards) */
    .product-showcase-grid .swiper-showcase-products .swiper-slide:nth-child(n+5) {
        display: none !important;
    }

    /* SCROLL mode shows all cards */
    .product-showcase-scroll .swiper-showcase-products .swiper-slide {
        display: block !important;
    }

    /* Product title - smaller for grid */
    .product-showcase-grid .product-showcase-card .product-title {
        font-size: 14px;
        line-height: 20px;
        font-weight: 700;
    }

    .product-showcase-scroll .product-showcase-card .product-title {
        font-size: 18px;
        line-height: 24px;
        font-weight: 700;
    }

    /* Price - smaller for grid */
    .product-showcase-grid .product-showcase-card .price-amount {
        font-size: 20px;
        line-height: 28px;
        font-weight: 700;
    }

    .product-showcase-scroll .product-showcase-card .price-amount {
        font-size: 20px;
        line-height: 1.15;
        font-weight: bold;
    }

    /* Features list - 12px Regular */
    .product-showcase-card .product-features {
        font-size: 12px;
        line-height: 16px;
        max-height: 80px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Custom Scrollbar for product features - Beautiful jQuery-inspired style */
    .product-showcase-card .product-features::-webkit-scrollbar {
        width: 6px;
    }

    .product-showcase-card .product-features::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 10px;
    }

    .product-showcase-card .product-features::-webkit-scrollbar-thumb {
        background: #D1D1D1;
        border-radius: 10px;
        transition: background 0.3s ease;
    }

    .product-showcase-card .product-features::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

    /* Firefox scrollbar */
    .product-showcase-card .product-features {
        scrollbar-width: thin;
        scrollbar-color: #D1D1D1 transparent;
    }

    /* Buy button - smaller for grid */
    /* .product-showcase-grid .product-showcase-card .btn-buy {
        font-size: 14px;
        line-height: 20px;
        font-weight: 510;
        padding: 8px 20px;
    } */

    /* .product-showcase-scroll .product-showcase-card .btn-buy {
        font-size: 14px;
        line-height: 20px;
        font-weight: 510;
        padding: 10px 20px;
    } */

    .product-showcase-card .btn-primary.btn--sm {
        padding: 10px 20px;
    }

    /* View all link */
    .showcase-view-all {
        margin-top: 4px;
    }
}

@media (max-width: 767px) {
    .product-showcase {
        /* padding: 12px 20px 12px 20px; */
        padding: 12px 16px 12px;
        overflow: hidden;
    }

    .showcase-container {
        padding: 16px;
        gap: 16px;
    }

    .showcase-title {
        font-size: 20px;
        line-height: 28px;
    }

    .showcase-banner {
        width: 100%;
        height: auto;
        /* max-height: 454px; */
        max-height: unset;
        min-height: unset;
        border-radius: 12px;
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.03);
    }

    .showcase-banner img {
        position: relative;
        height: auto;
    }

    .showcase-products {
        gap: 12px;
    }

    .product-showcase-card {
        flex-basis: 100%;
    }

    .product-image {
        max-height: 148px;
        overflow: hidden;
    }

    /* Badge Almost Soldout - Mobile: 48x48px */
    .badge-almost-soldout {
        width: 48px;
        height: 48px;
    }

    .product-showcase-grid .product-image-features {
        display: flex !important;
        position: absolute;
        right: 4px;
        gap: 4px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

    .product-showcase-grid .feature-icon-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 4px 3px;
    }

    .product-showcase-grid .feature-icon-item img {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        object-fit: contain;
    }

    .product-showcase-grid .feature-icon-item span {
        font-size: 8px;
        max-width: 45px;
        line-height: 1.1;
        text-align: center;
        display: block;
    }

    .product-title {
        font-size: 16px;
    }

    .price-amount {
        font-size: 20px;
    }

    .view-all-link {
        padding: 4px 16px;
    }

    .product-showcase-scroll .showcase-container {
        overflow: visible;
    }

    .product-showcase-scroll .swiper-showcase-products {
        overflow: visible;
        margin: 0 -16px 0;
    }

    .product-showcase-scroll .swiper-slide {
        display: flex !important;
        width: 253px !important;
        max-width: 253px !important;
        flex: 0 0 auto;
    }

    .product-showcase-scroll .swiper-slide:first-child {
        margin-left: 16px;
    }

    .product-showcase-scroll .swiper-slide:first-child {
        margin-right: 16px;
    }
}

@media (max-width: 480px) {

    .showcase-banner {
        /* padding: 12px 16px 12px 16px; */
        width: 100%;
        /* height: 454px; */
        /* max-height: 454px; */
        border-radius: 12px;
        box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08),
                    0px 4px 16px 10px rgba(16, 24, 40, 0.02),
                    0px 2px 32px -4px rgba(16, 24, 40, 0.03);
    }

    .product-image {
        max-height: 148px;
        overflow: hidden;
    }

    /* Badge Almost Soldout - Mobile: 48x48px */
    .badge-almost-soldout {
        width: 48px;
        height: 48px;
    }

    .product-showcase-grid .product-image-features {
        display: flex !important;
        position: absolute;
        right: 3px;
        gap: 3px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

    .product-showcase-grid .feature-icon-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 3px 2px;
    }

    .product-showcase-grid .feature-icon-item img {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        object-fit: contain;
    }

    .product-showcase-grid .feature-icon-item span {
        font-size: 7px;
        max-width: 40px;
        line-height: 1.1;
        text-align: center;
        display: block;
    }

    /* .btn-buy {
        width: 100%;
    } */

    .showcase-title {
        font-size: 20px;
        line-height: 28px;
    }

    /* Smaller gap on small mobile for scroll mode */
    .product-showcase-scroll .swiper-showcase-products {
        /* margin: 0 -12px !important; */
    }
}