/* =========================================================================
   MATSUMOTO MOBILE COMPATIBILITY & UI FIXES
   ========================================================================= */

@media (max-width: 1023px) {
    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: none !important;
    }

    #mobileDrawer {
        height: 100vh;
        height: 100dvh;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    #mobileDrawer,
    #drawerBackdrop {
        transition-duration: 0.01ms !important;
    }
}

/* Filter bar katalog tidak sticky: mengalir wajar bersama scroll halaman */
.sticky-filter,
#katalogFilterBar {
    position: relative !important;
    top: auto !important;
    z-index: 10 !important;
}

/* Filter Horizontal Scroll (Penggerak & Daya HP) di Layar HP */
.filter-scroll-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.filter-scroll-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.filter-scroll-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Badge Kategori Kartu Produk: DI POJOK KIRI BAWAH FOTO agar TIDAK BENTROK dengan tombol Bookmark/Zoom di kanan atas */
.product-category-badge {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    top: auto !important;
    right: auto !important;
    max-width: 80% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    pointer-events: none !important;
    z-index: 5 !important;
    background-color: rgba(24, 24, 27, 0.85) !important;
    color: #ffffff !important;
}

/* Tombol Aksi Kartu Produk: DI POJOK KANAN ATAS */
.product-card-actions {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 10 !important;
}

/* Tombol Clear Pencarian: WAJIB DI KANAN, JAUH DARI ICON SEARCH DI KIRI */
.search-clear-btn,
#headerSearchClear,
#drawerSearchClear,
#katalogSearchClear {
    position: absolute !important;
    right: 12px !important; /* Di kanan dalam input */
    left: auto !important;  /* Cegah menimpa icon search di kiri */
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 25 !important;
}

.search-clear-btn.is-visible,
#headerSearchClear.is-visible,
#drawerSearchClear.is-visible,
#katalogSearchClear.is-visible {
    display: flex !important;
}

/* Pencarian Header pada Layar HP */
@media (max-width: 639px) {
    #headerSearchInput {
        font-size: 11px;
    }
    #headerSearchSuggest {
        position: fixed !important;
        top: 4.25rem !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
        max-height: 65vh !important;
        z-index: 60 !important;
    }
}

/* =========================================================================
   HERO BANNER CAROUSEL (CARD MODEL TOKOPEDIA / QLIKE - RASIO 2:1)
   ========================================================================= */
.hero-slider-container {
    width: 100% !important;
    aspect-ratio: 2 / 1 !important; /* Standar banner 1200 x 600 px */
    height: auto !important;
    min-height: 0 !important;
    max-height: 600px !important;
    position: relative !important;
    overflow: hidden !important;
}

.hero-slider-track {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.hero-slider-track::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.hero-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 100% !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Dots Indikator (Garis Ramping Responsif) */
.slider-dot {
    width: 14px !important;
    height: 3px !important;
    border-radius: 9999px !important;
    background-color: rgba(255, 255, 255, 0.45) !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

@media (min-width: 640px) {
    .slider-dot {
        width: 24px !important;
        height: 4px !important;
    }
}

.slider-dot.active {
    background-color: #ffffff !important;
    width: 24px !important;
}

@media (min-width: 640px) {
    .slider-dot.active {
        width: 38px !important;
    }
}
