/**
 * File Name: css/home.css
 * Project: eOnlineBazar
 * Author: Abdul Karim Sheikh
 * Description: Home Page Styles (Hero Slider, Dynamic Product Grid, Responsive Layout)
 * Note: ডুপ্লিকেট হেডার ও গ্লোবাল কোডগুলো ক্লিন করা হয়েছে (যা style.css-এ আছে)।
 */

/* ==========================================================================
   ১. হিরো ব্যানার (dynamic heights + responsive text)
   ========================================================================== */
#heroBannerSlider {
    --banner-height: 300px;
    --banner-mobile-height: 200px;
    --banner-h: 300;
    --banner-mh: 200;
    position: relative;
    z-index: 1; /* keep hero under sub-navbar category dropdowns (z-index 9999) */
    width: 100%;
    overflow: hidden;
    isolation: isolate;
}

#bannerSliderWrap {
    position: relative;
    width: 100%;
    height: var(--banner-height, 300px);
    overflow: hidden;
    background: #1a1a2e;
    container-type: size;
    container-name: hero-banner;
}

@media (max-width: 768px) {
    #bannerSliderWrap {
        height: var(--banner-mobile-height, 200px);
    }
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateX(100%);
}

.hero-banner-slide {
    overflow: hidden;
}

.hero-banner-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        transparent 100%
    );
}

.banner-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.banner-text-overlay .banner-content,
.banner-text-overlay .banner-cta {
    pointer-events: auto;
}

.banner-content--premium {
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
    inset: auto;
    position: relative;
    padding: 0;
    max-width: min(520px, 90%);
}

.banner-content--premium .banner-title {
    font-size: clamp(1.25rem, calc(var(--banner-h, 300) * 0.08 * 1px + 0.5vw), 2.25rem);
    animation: slideUp 0.6s ease;
}

.banner-content--premium .banner-subtitle {
    font-size: clamp(0.85rem, calc(var(--banner-h, 300) * 0.035 * 1px + 0.25vw), 1rem);
    margin-bottom: 20px;
}

.banner-content--premium .banner-cta {
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
}

.banner-content--premium .banner-cta:hover {
    background: #ea580c;
}

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

@media (max-width: 768px) {
    .banner-text-overlay {
        padding: 20px 16px 28px;
    }

    .banner-content--premium {
        max-width: 100%;
    }
}

.banner-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.banner-slide.prev {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

.banner-slide.fade-mode {
    transform: none !important;
}

.banner-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.banner-bg--solid {
    position: absolute;
    inset: 0;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--opacity, 0.3));
    z-index: 1;
    pointer-events: none;
}

.banner-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(0.25rem, 2.5cqh, 0.85rem);
    /* Side/bottom padding keeps copy clear of arrows + dots */
    padding:
        clamp(0.4rem, 4cqh, 1.1rem)
        clamp(2.75rem, 8cqw, 4.5rem)
        clamp(1.4rem, 10cqh, 2.4rem);
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.banner-title {
    margin: 0;
    max-width: 100%;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    /* Scales with banner height (cqh) and viewport width — prevents clipping on short slides */
    font-size: clamp(0.85rem, calc(var(--banner-h, 300) * 0.065 * 1px + 0.35vw), 2.35rem);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.banner-subtitle {
    margin: 0;
    max-width: min(42rem, 100%);
    font-weight: 400;
    line-height: 1.35;
    opacity: 0.9;
    font-size: clamp(0.7rem, calc(var(--banner-h, 300) * 0.032 * 1px + 0.2vw), 1.15rem);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: clamp(0.15rem, 1.5cqh, 0.5rem);
    padding: clamp(0.35rem, 2.2cqh, 0.75rem) clamp(0.9rem, 3cqw, 1.75rem);
    background: #f97316;
    color: #fff;
    border-radius: 999px;
    font-size: clamp(0.7rem, calc(var(--banner-h, 300) * 0.028 * 1px + 0.15vw), 0.95rem);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    max-width: 100%;
}

.banner-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

@media (max-width: 768px) {
    .banner-title {
        font-size: clamp(0.8rem, calc(var(--banner-mh, 200) * 0.08 * 1px + 0.5vw), 1.55rem);
    }
    .banner-subtitle {
        font-size: clamp(0.65rem, calc(var(--banner-mh, 200) * 0.045 * 1px + 0.35vw), 0.95rem);
    }
    .banner-cta {
        font-size: clamp(0.65rem, calc(var(--banner-mh, 200) * 0.04 * 1px + 0.25vw), 0.85rem);
    }
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: clamp(32px, 5cqh + 16px, 44px);
    height: clamp(32px, 5cqh + 16px, 44px);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: clamp(0.85rem, 3cqh, 1.1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.banner-arrow:hover {
    background: rgba(249, 115, 22, 0.7);
    border-color: transparent;
}

.banner-arrow-prev { left: 10px; }
.banner-arrow-next { right: 10px; }

.banner-dots {
    position: absolute;
    bottom: clamp(6px, 3cqh, 14px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.banner-dot.active {
    background: #f97316;
    width: 24px;
    border-radius: 4px;
}

.banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #f97316;
    z-index: 10;
    width: 0%;
    transition: width linear;
}

.banner-fallback {
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #1a1a2e;
    color: #fff;
    padding: 24px;
}

.banner-fallback h2 {
    margin: 0 0 8px;
    font-size: clamp(1.1rem, 4vw, 2rem);
    font-weight: 800;
}

.banner-fallback p {
    margin: 0;
    opacity: 0.85;
    font-size: clamp(0.8rem, 2.5vw, 1.05rem);
}


/* ==========================================================================
   ২. ডাইনামিক ক্যাটাগরি বাটন সেকশন (পেজের মাঝখানের ফিল্টার ট্যাব)
   ========================================================================== */
.category-tabs-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0 20px 0;
    flex-wrap: wrap;
}

.category-tab-btn {
    background: #ffffff;
    color: #333333;
    border: 1px solid #ddd;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-tab-btn:hover {
    background: #f7f7f7;
    border-color: #b1b1b1;
}

.category-tab-btn.active {
    background: #febd69; /* আমাজন গোল্ডেন কালার */
    color: #111;
    border-color: #f3a847;
    box-shadow: 0 2px 8px rgba(243, 168, 71, 0.4);
}

/* ==========================================================================
   ৩. প্রোডাক্ট মেইন কন্টেইনার এবং গ্রিড লেআউট
   ========================================================================== */
.products-container {
    margin-bottom: 30px;
    padding: 0 2px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 1px;
    border-bottom: 2px solid #eeeeee;
    padding: 5px 2px;
}

/* Catalog header: featured section title */
.catalog-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
    border-bottom: 2px solid #eeeeee;
    padding-bottom: 8px;
}

.catalog-header-row .section-title {
    margin: 0;
    border-bottom: none;
    padding: 0;
    flex: 1 1 auto;
}

/* ==========================================================================
   Catalog pagination (Home / Search) — Amazon-style controls
   ========================================================================== */
.catalog-page-size {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 13px;
    color: #565959;
    user-select: none;
}

.catalog-page-size__label {
    font-weight: 600;
    color: #0f1111;
    margin-right: 2px;
}

.catalog-page-size__sep {
    color: #bbb;
    font-weight: 400;
}

.catalog-page-size__opt {
    appearance: none;
    background: none;
    border: none;
    padding: 2px 4px;
    margin: 0;
    font: inherit;
    font-weight: 500;
    color: #007185;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1.3;
}

.catalog-page-size__opt:hover {
    color: #c7511f;
    text-decoration: underline;
}

.catalog-page-size__opt.is-active {
    color: #c45500;
    font-weight: 700;
    text-decoration: none;
    cursor: default;
}

.catalog-toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 18px;
}

.catalog-load-more-wrap {
    width: 100%;
    margin-top: 28px;
}

.catalog-load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(15, 17, 17, 0.12);
    font-size: 14px;
    font-weight: 500;
    color: #0f1111;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-load-more-btn:hover:not(:disabled) {
    background: #f7fafa;
    border-color: #d5d9d9;
    box-shadow: 0 2px 5px rgba(15, 17, 17, 0.18);
}

.catalog-load-more-btn:focus-visible {
    outline: 2px solid #007185;
    outline-offset: 2px;
}

.catalog-load-more-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.catalog-load-more-btn .fa-chevron-down {
    font-size: 12px;
    color: #565959;
}

.catalog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.catalog-pagination__dots {
    padding: 0 4px;
    color: #888;
}

.catalog-page-btn.page-btn,
.catalog-pagination .page-btn {
    min-width: 40px;
    padding: 9px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    transition: all 0.15s ease;
}

.catalog-pagination .page-btn:hover:not(:disabled) {
    border-color: #e47911;
    color: #e47911;
}

.catalog-pagination .page-btn.active {
    background: #232f3e;
    color: #fff;
    border-color: #232f3e;
}

.catalog-pagination .page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

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

.product-card.catalog-card-enter {
    animation: catalogCardFadeIn 0.35s ease both;
}

@media (max-width: 640px) {
    .catalog-header-row {
        align-items: flex-start;
    }

    .catalog-toolbar-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* ডেক্সটপ বা বড় ল্যাপটপে এক লাইনে ৪টি বা ৫টি করে স্ট্যান্ডার্ড লুক দেওয়া হলো (৭টি দিলে বেশি ছোট হয়ে যায়) */
.product-layout-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

/* ==========================================================================
   ৪. প্রফেশনাল প্রোডাক্ট কার্ড ডিজাইন shopping cart aria
   ========================================================================== */
.product-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.product-image-wrap,
.product-img-box {
    position: relative;
    width: 100%;
    height: 120px;
    aspect-ratio: 1 / 1;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    border-bottom: 1px solid #f5f5f5;
    padding: 6px;
    box-sizing: border-box;
    overflow: hidden;
}

.product-img-box img,
.product-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

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

.product-emoji-display {
    font-size: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    user-select: none;
} 

/* প্রোডাক্ট টেক্সট ও প্রাইস এরিয়া */
.product-info {
    padding: 10px 10px 6px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: clamp(11px, 1.5vw, 14px);
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
    line-height: 1.3;
    height: 33px; /* ২ লাইনের হাইট ফিক্সড করা হলো যাতে সব বক্স সমান থাকে */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.product-price-row {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center; /* টাকা এবং প্রাইস ঠিক মাঝখানে থাকবে */
    font-size: clamp(14px, 1.8vw, 17px);
    font-weight: 700;
    color: #B12704; /* আমাজন স্ট্যান্ডার্ড রেড কালার */
}

.currency {
    margin-right: 3px;
}

/* Add to Cart — full-width primary CTA on grid cards */
.product-card > .product-card-actions {
    display: block;
    width: calc(100% - 16px);
    margin: 0 8px 10px;
}

.product-card > .product-card-actions .add-to-cart-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 10px;
    background: #f97316;
    border: none;
    color: #fff;
    font-size: clamp(11px, 1.2vw, 13px);
    font-weight: 600;
    line-height: 1.25;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.product-card > .product-card-actions .add-to-cart-btn:hover {
    background: #ea580c;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.product-card > .product-card-actions .add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Legacy: direct child add button (older markup) */
.product-card > .add-to-cart-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 0 8px 10px;
    padding: 9px 10px;
    background: #f97316;
    border: none;
    color: #fff;
    font-size: clamp(11px, 1.2vw, 13px);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.product-card > .add-to-cart-btn:hover {
    background: #ea580c;
}

/* Wishlist heart button on product cards */
.wishlist-heart-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wishlist-heart-btn i {
    font-size: 16px;
    pointer-events: none;
}

.wishlist-heart-btn:hover {
    transform: scale(1.08);
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.wishlist-heart-btn.is-active {
    color: #ef4444;
    background: #fff5f5;
}

.wishlist-heart-btn.is-active i {
    animation: wishlistHeartPop 0.35s ease;
}

.wishlist-heart-btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

@keyframes wishlistHeartPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Store wishlist toast notifications */
.store-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.store-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.store-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.store-toast.success {
    background: linear-gradient(135deg, #111827, #1f2937);
}

.store-toast.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.store-toast i {
    font-size: 18px;
    flex-shrink: 0;
}

.product-fetch-loading,
.product-fetch-error {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    padding: 32px 24px;
    text-align: center;
    border-radius: 16px;
    background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
}

.product-fetch-loading {
    color: #6b7280;
    font-size: 15px;
}

.product-fetch-loading i {
    font-size: 28px;
    color: #f97316;
}

.product-fetch-error__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    color: #dc2626;
    font-size: 24px;
}

.product-fetch-error__title {
    margin: 0;
    font-size: 1.15rem;
    color: #111827;
}

.product-fetch-error__message {
    margin: 0;
    max-width: 420px;
    color: #6b7280;
    line-height: 1.5;
}

.product-fetch-error__retry {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.product-fetch-error__retry:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

/* ==========================================================================
   ৫. রেস্পন্সিভ মিডিয়া কোয়েরি (মোবাইল ও ট্যাবলেট স্ক্রিন নিয়ন্ত্রণ)
   ========================================================================== */

/* ➔ ১. ল্যান্ডস্কেপ ট্যাবলেট এবং ছোট ল্যাপটপ (সর্বোচ্চ ১০২৪px) */
@media screen and (max-width: 1024px) {
    .product-layout-grid {
        grid-template-columns: repeat(4, 1fr); /* এই স্ক্রিনে ৪টি করে প্রোডাক্ট সুন্দর দেখাবে */
        gap: 15px;
    }
}

/* ➔ ২. পোর্ট্রেট ট্যাবলেট এবং বড় স্ক্রিনের মোবাইল (সর্বোচ্চ ৭৬৮px) */
@media screen and (max-width: 768px) {
    /* প্রোডাক্ট লেআউট গ্রিড ফিক্স (ট্যাবলেটে এক লাইনে ৩টি প্রোডাক্ট) */
    .product-layout-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 12px;
    }
    
    /* সেকশন টাইটেল ও ক্যাটাগরি ট্যাব */
    .section-title { 
        font-size: 20px; 
    }
    .category-tabs-row { 
        margin: 15px 0; 
        gap: 10px;
        overflow-x: auto; /* ট্যাব বেশি হলে নিচে না ভেঙে ডানে স্ক্রল হবে */
        white-space: nowrap;
        padding-bottom: 5px;
    }
    .category-tab-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ➔ ৩. স্ট্যান্ডার্ড স্মার্টফোন ভিউ (সর্বোচ্চ ৫৪০px) */
@media screen and (max-width: 540px) {
    /* প্রোডাক্ট লেআউট গ্রিড ফিক্স (মোবাইলে এক লাইনে ২টি করে প্রোডাক্ট - স্ট্যান্ডার্ড নিয়ম) */
    .product-layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 6px;
    }

    .product-image-wrap,
    .product-img-box {
        height: 130px;
    }

    .product-info {
        padding: 8px 8px 4px;
    }

    .product-card > .product-card-actions {
        width: calc(100% - 12px);
        margin: 0 6px 8px;
    }

    .product-card > .product-card-actions .add-to-cart-btn,
    .product-card > .add-to-cart-btn {
        width: 100%;
        margin: 0;
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .product-info h3 {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 14px;
    }

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

/* ➔ ৪. আল্ট্রা-স্মল স্মার্টফোন ভিউ (সর্বোচ্চ ৩৬০px - যেমন ছোট বা পুরানো ফোন) */
@media screen and (max-width: 360px) {
    .product-layout-grid {
        grid-template-columns: repeat(2, 1fr); /* অতি ছোট মোবাইলেও ২টি থাকবে, কিন্তু সাইজ আরও নিখুঁত হবে */
        gap: 8px;
    }
    
    .product-img-box { 
        height: 110px; /* ছবি বেশি বড় হয়ে যাতে স্ক্রিন ভেঙে না যায় */
    } 
    
    /* টেক্সট সাইজ আরও একটু কম্প্যাক্ট করা হলো */
    .product-info h3 {
        font-size: 12px;
        /* নাম বেশি বড় হলে ভেঙে নিচে না গিয়ে ডট ডট (...) দেখাবে */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-price {
        font-size: 13px;
    }

    /* ক্যাটাগরি বাটনের ভেতরের প্যাডিং সংকুচিত করা */
    .category-tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

.flash-sale-banner {
    margin: 24px 0 18px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c2d12 0%, #ea580c 45%, #fbbf24 100%);
    color: #fff7ed;
    box-shadow: 0 16px 40px rgba(234, 88, 12, 0.25);
    overflow: hidden;
    position: relative;
}

.flash-sale-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    box-shadow: 0 16px 40px rgba(15, 52, 96, 0.35);
}

.flash-sale-section::before {
    content: '⚡';
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 120px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.flash-sale-section .flash-sale-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}

.flash-sale-section .flash-countdown .countdown-num,
.flash-sale-section .flash-sale-countdown__unit strong {
    font-size: 24px;
    font-weight: 800;
    color: #f97316;
    font-variant-numeric: tabular-nums;
}

.flash-sale-section .countdown-block,
.flash-sale-section .flash-sale-countdown__unit {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 50px;
}

.flash-sale-section .countdown-label,
.flash-sale-section .flash-sale-countdown__unit small {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flash-sale-section .countdown-sep,
.flash-sale-section .flash-sale-countdown__sep {
    font-size: 20px;
    font-weight: 800;
    color: #f97316;
}

.flash-sale-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s;
}

.flash-sale-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.flash-sale-card .product-name {
    color: #fff;
}

.flash-sale-card .product-price-row,
.flash-sale-card .product-price {
    color: #f97316;
}

.flash-sale-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 55%);
    pointer-events: none;
}

.flash-sale-banner__content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flash-sale-banner__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 6px;
}

.flash-sale-banner__copy h2 {
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.1;
    margin-bottom: 6px;
}

.flash-sale-banner__copy p {
    margin: 0;
    opacity: 0.92;
}

.flash-sale-banner__timer-wrap {
    text-align: center;
}

.flash-sale-banner__timer-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.flash-sale-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.flash-sale-countdown__unit {
    min-width: 72px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.flash-sale-countdown__unit strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.flash-sale-countdown__unit small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.85;
}

.flash-sale-countdown__sep {
    font-size: 24px;
    font-weight: 700;
    opacity: 0.8;
}

.product-price-row .price-original {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-price-row .flash-sale-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .flash-sale-banner {
        padding: 18px 16px;
    }

    .flash-sale-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .flash-sale-countdown__unit {
        min-width: 62px;
    }
}

/* ==========================================================================
   Premium homepage — section headers, scroll animations
   ========================================================================== */
.section-header-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: none;
    padding-bottom: 0;
}

.section-title-premium {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    position: relative;
    padding-bottom: 8px;
    margin: 0;
    border-bottom: none;
}

.section-title-premium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

.section-see-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
    transition: gap 0.2s;
}

.section-see-all:hover {
    gap: 8px;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }

