.storefront-bottom-nav, .mobile-vehicle-panel, .mobile-home-intro, .mobile-home-categories { display: none; }
.chat-nudge-region { display: contents; }
.chat-nudge { display: flex; align-items: center; max-width: 320px; padding: 8px; background: #fff; border: 1px solid #dbe3e9; border-radius: 14px; box-shadow: 0 8px 24px #002b4920; }
.chat-nudge button { font-family: inherit; cursor: pointer; border: 0; min-height: 44px; }
.chat-nudge-open { display: flex; flex-direction: column; text-align: left; padding: 4px 8px; background: #fff; color: #002b49; }
.chat-nudge-title { font-size: 13px; font-weight: 700; }
.chat-nudge-text { font-size: 11px; color: #475569; }
.chat-nudge-close { min-width: 44px; background: #f1f5f9; color: #475569; border-radius: 8px; }
.chat-nudge button:focus-visible, .storefront-bottom-nav a:focus-visible, .mobile-home-categories a:focus-visible { outline: 2px solid #002b49; outline-offset: -2px; }

@media (max-width: 768px) {
  :root { --storefront-nav-height: calc(58px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(var(--storefront-nav-height) + 12px); }
  .site-shell { padding-bottom: calc(var(--storefront-nav-height) + 12px); }
  .storefront-bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0; height: var(--storefront-nav-height); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid #dbe3e9; z-index: 950; }
  .storefront-bottom-nav a { position: relative; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #475569; }
  .storefront-bottom-nav i { font-size: 18px; }
  .storefront-nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d62839; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  /* Keranjang cukup satu di ponsel: yang bawah memuat angkanya. */
  .header-cart-link { display: none; }
  .storefront-bottom-nav a[aria-current] { color: #002b49; font-weight: 700; background: #eef5f9; border-top: 3px solid #002b49; }
  .storefront-bottom-nav a:focus-visible { outline-offset: -3px; }
  .chat-widget { bottom: calc(var(--storefront-nav-height) + 12px + var(--storefront-keyboard, 0px)); right: 12px; z-index: 960; }
  .chat-widget:has(.chat-panel) .chat-toggle { display: none; }
  .chat-panel { display: flex; flex-direction: column; width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(var(--storefront-visual-height, 100dvh) - var(--storefront-nav-height) - 24px); }
  .chat-panel-head, .chat-panel-foot { flex-shrink: 0; }
  .chat-panel-foot { max-height: 65dvh; overflow-y: auto; }
  .chat-panel .chat-messages { flex: 1 1 auto; min-height: 0; height: auto; max-height: 280px; }
  .chat-close, .chat-send-btn { min-height: 44px; min-width: 44px; }
  .chat-input { min-height: 44px; font-size: 16px; min-width: 0; }
  .chat-wa-alt { min-height: 44px; color: #166534; }
  .storefront-home { padding-inline: 16px; }
  .mobile-vehicle-panel { display: block; margin: 12px 0 16px; background: #fff; border: 1px solid #dbe5ed; border-radius: 14px; overflow: hidden; }
  .mobile-home-intro { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; background: #f4f8fb; color: #002b49; text-decoration: none; }
  .mobile-intro-text { font-size: 14px; font-weight: 700; line-height: 1.2; color: #002b49; }
  .mobile-intro-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #005f8f; background: transparent; padding: 0; min-height: 0; }
  .mobile-intro-cta i { font-size: 10px; transition: transform .15s; }
  .mobile-home-intro:hover .mobile-intro-cta i, .mobile-home-intro:focus-visible .mobile-intro-cta i { transform: translateX(3px); }
  .mobile-home-intro:focus-visible { outline: 2px solid #002b49; outline-offset: -2px; }
  .mobile-home-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #e3ebf1; border-top: 1px solid #e3ebf1; }
  .mobile-home-categories a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 8px; background: #fff; border: 0; border-radius: 0; color: #002b49; text-align: center; text-decoration: none; transition: background-color .15s; }
  .mobile-home-categories a:hover, .mobile-home-categories a:focus-visible { background: #f0f6fa; }
  .mobile-home-categories a:active { background: #e2edf5; }
  .mobile-home-categories i { font-size: 30px; color: #002b49; }
  .mobile-home-categories svg { width: 38px; height: 38px; flex-shrink: 0; }
  .mobile-home-categories span { font-size: 11.5px; font-weight: 600; line-height: 1.25; }
  .home-vehicle-section { display: none; }
  .storefront-home .mt-slider { width: 100%; margin-left: 0; border-radius: 12px; }
  .storefront-home .mt-slider-wrapper { padding-top: 12px; margin-bottom: 12px; }
  .storefront-home .mt-slide-responsive-img { max-height: 260px; object-fit: contain; }
  .storefront-home .mt-reassurance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .storefront-home .mt-reassure-item { padding: 10px 8px; gap: 8px; border-radius: 10px; }
  .storefront-home .mt-reassure-icon { width: 28px; height: 28px; }
  .storefront-home .mt-reassure-icon i { font-size: 14px; }
  .storefront-home .mt-reassure-item strong { font-size: 11px; }
  .storefront-home .mt-reassure-item div > span { display: none; }
  .storefront-home .mt-section { padding-top: 18px !important; padding-bottom: 18px !important; }
  .storefront-home .mt-section-head { gap: 8px; margin-bottom: 12px; padding-bottom: 8px; }
  .storefront-home .mt-section-title { font-size: 16px; text-transform: none; }
  .storefront-home .mt-section-link { flex-shrink: 0; min-height: 44px; color: #002b49; font-size: 11px; padding-inline: 8px; }
  .storefront-home .mt-promo-banner:not(.has-photo) { padding: 16px; min-height: 130px; }
  .storefront-home .mt-promo-banner:not(.has-photo) h3 { font-size: 20px; }
  .storefront-home .mt-promo-banner .pb-link { min-height: 44px; display: inline-flex; align-items: center; }
  .storefront-home .mt-slider-arrow { width: 44px; height: 44px; background: #002b49; }
  .storefront-home .mt-slider-dots { bottom: 0; gap: 0; }
  .storefront-home .mt-slider-dots button { width: 44px; height: 44px; border-radius: 0; background: radial-gradient(circle, #fff 4px, transparent 5px); }
  .storefront-home .mt-slider-dots button.active { background: radial-gradient(circle, #002b49 5px, transparent 6px); }
  .storefront-home .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-home .mt-carousel-slide { min-width: 0; flex-basis: calc(50% - 9px); }
  .hamburger, .mobile-search-btn { min-width: 44px; min-height: 44px; }
  .mobile-search { padding-inline: 16px; padding-bottom: 12px; }
  .mobile-search-form { box-sizing: border-box; width: 100%; margin-bottom: 0; }
  .pdp-admin-float { bottom: calc(var(--storefront-nav-height) + 12px) !important; }
}
@media (prefers-reduced-motion: reduce) { .chat-nudge, .mobile-home-intro, .mobile-intro-cta i, .mobile-home-categories a { transition: none !important; }  }

@media (max-width: 600px) {
  .container.catalog-page, .container.about-page-wrapper { padding-inline: 10px; margin-bottom: 20px; }
}

@media (max-width: 768px) {
  .scroll-top-btn { right: 18px; bottom: calc(var(--storefront-nav-height) + 76px); width: 44px; height: 44px; }
}

/* Keranjang tab biasa; panah kecil di atasnya untuk kembali ke atas */
@media (max-width: 768px) {
  .site-shell { padding-bottom: calc(var(--storefront-nav-height) + 56px); }
  .storefront-bottom-nav a[aria-current] { background: transparent; border-top: 0; }
  .storefront-bottom-nav a[aria-current]::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: #002b49; }
  /* Navbar putih solid; tab panah naik dari bawah (tenggelam ke bawah saat hilang) */
  .storefront-bottom-nav {
    background: #fff;
    border-top: 1px solid #dbe3e9;
    box-shadow: 0 -3px 12px rgba(0, 43, 73, .06);
  }
  /* Wadah memotong tab di garis atas navbar, jadi tab terlihat tenggelam ke balik bar */
  .storefront-nav-up-wrap { position: absolute; left: 50%; top: -34px; width: 88px; height: 34px; transform: translateX(-50%); overflow: hidden; pointer-events: none; z-index: 10; }
  .storefront-nav-tab-up {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%) translateY(26px);
    opacity: 0;
    pointer-events: none;
    width: 88px;
    height: 22px;
    padding: 7px 0 0;
    margin: 0;
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 22' preserveAspectRatio='none'%3E%3Cpath d='M-1 22C12 22 18 21 24 15C29 10 33 1 44 1S59 10 64 15C70 21 76 22 89 22Z' fill='%23fff'/%3E%3Cpath d='M-1 21.5C12 21.5 18 20.5 24 14.5C29 9.5 33 .5 44 .5S59 9.5 64 14.5C70 20.5 76 21.5 89 21.5' fill='none' stroke='%23dbe3e9' stroke-width='1'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
    color: #047bb5;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 -3px 4px rgba(0, 43, 73, .08));
    z-index: 10;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .24s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .storefront-bottom-nav.has-up .storefront-nav-tab-up {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .storefront-nav-tab-up::after { content: ''; position: absolute; inset: -12px 10px 0 10px; }
  .storefront-nav-tab-up i { transition: transform .2s ease; }
  .storefront-nav-tab-up:active i { transform: translateY(-2px); }
  .storefront-nav-tab-up:focus-visible { outline: 2px solid #002b49; outline-offset: 2px; border-radius: 14px 14px 0 0; }
  @media (prefers-reduced-motion: reduce) {
    .storefront-nav-tab-up, .storefront-nav-tab-up i { transition: none; }
  }
  .storefront-nav-up[hidden] { display: none; }
  .storefront-nav-up:active { transform: translateX(-50%) scale(.94); }
  .storefront-nav-up:focus-visible { outline: 3px solid #002b49; outline-offset: 3px; }
  /* Panel chat berhenti di atas panah, jadi panah tetap bisa ditekan saat chat terbuka */
  .chat-widget:has(.chat-panel) { bottom: calc(var(--storefront-nav-height) + 48px + var(--storefront-keyboard, 0px)); }
  .chat-panel { max-height: calc(var(--storefront-visual-height, 100dvh) - var(--storefront-nav-height) - 72px); }
}

@media (max-width: 768px) { .desktop-scroll-top { display: none; } }

@media (max-width: 768px) {
  .mobile-home-categories a { justify-content: flex-start; }
  .mobile-home-categories a > span { min-height: 2.6em; display: flex; align-items: flex-start; justify-content: center; }
  .mobile-home-categories .mobile-vehicle-hint { display: none; }
}
@media (max-width: 768px) { .mobile-home-categories i { height: 38px; display: flex; align-items: center; justify-content: center; } }
