/* =========================================================
   IKLIP MOBILE FINAL V3.1
   Khusus halaman toko/pembeli. Dashboard admin tidak terpengaruh.
   ========================================================= */
:root{--ik-mobile-nav-height:72px}
html,body{max-width:100%;overflow-x:hidden}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0}
main,section,.container{min-width:0}
img,svg,video,canvas{max-width:100%}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
input,select,textarea,button{max-width:100%}

/* Perbaikan elemen umum di tablet */
@media(max-width:980px){
  .container{width:min(100% - 28px,1180px)}
  .footer-grid{grid-template-columns:1fr 1fr;gap:28px}
  .home-product-row-grid,.shop-flash-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .catalog-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .checkout-v2-layout,.payment-layout,.track-grid,.return-layout,.shipping-layout{grid-template-columns:1fr!important}
  .checkout-v2-summary,.cart-summary,.order-preview,.track-side,.return-side,.return-side-stack{position:static!important;top:auto!important}
  .pd-main-grid{grid-template-columns:1fr!important}
  .pd-gallery-column{max-width:720px;width:100%}
}

@media(max-width:700px){
  body{padding-bottom:calc(var(--ik-mobile-nav-height) + env(safe-area-inset-bottom));background:#fffaf8}
  .container{width:calc(100% - 24px)!important;margin-left:auto;margin-right:auto}
  .announcement{padding:7px 12px;font-size:9px;line-height:1.35}

  /* Header mobile */
  .site-header{position:sticky;top:0;z-index:80;background:rgba(255,250,248,.97);backdrop-filter:blur(15px)}
  .header-row{height:62px!important;gap:10px!important}
  .brand{gap:9px;min-width:0;max-width:calc(100% - 58px)}
  .brand-mark{width:38px!important;height:38px!important;flex:0 0 38px;font-size:20px!important}
  .brand>span:last-child{min-width:0}
  .brand strong{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .brand small,.desktop-nav,.cart-button span{display:none!important}
  .cart-button{min-width:42px;height:42px;padding:6px!important;justify-content:center;border-radius:50%!important;flex:0 0 42px}
  .cart-button:before{content:'▢';font-size:20px;line-height:1;color:#5f4c53}
  .cart-button b{position:absolute;margin:0 0 25px 27px;min-width:17px;height:17px;font-size:9px}

  /* Navigasi bawah selalu 4 menu dan aman untuk layar berponi */
  .mobile-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;min-height:var(--ik-mobile-nav-height);padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;z-index:100!important}
  .mobile-nav a{min-width:0;gap:2px!important;font-size:9px!important;line-height:1.15;text-align:center}
  .mobile-nav a>.mobile-nav-icon{font-size:19px!important}
  .mobile-nav b{right:16%!important;top:-2px!important}

  /* Form: mencegah zoom otomatis iPhone */
  input,select,textarea{font-size:16px!important}
  button,.btn,[type=submit],[type=button]{min-height:44px}
  textarea{min-height:105px}

  /* Beranda */
  .hero{padding:14px 0 22px!important}
  .hero-grid{grid-template-columns:1fr!important;border-radius:22px!important;min-height:0!important}
  .hero-copy{padding:30px 22px!important}
  .hero h1{font-size:38px!important;line-height:1.05}
  .hero-copy>p{font-size:14px!important;margin:16px 0!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr;gap:10px!important}
  .hero-actions .btn{width:100%;min-height:48px}
  .hero-visual{min-height:330px!important;background-position:center top}
  .hero-badge{left:14px!important;bottom:14px!important;padding:12px 15px!important}
  .trust-row{display:grid!important;grid-template-columns:1fr;gap:5px!important;margin-top:18px!important}
  .feature-strip{overflow:hidden}
  .feature-strip-grid{display:flex!important;overflow-x:auto;gap:8px!important;width:100%!important;padding:8px 12px!important;scroll-snap-type:x mandatory;scrollbar-width:none}
  .feature-strip-grid::-webkit-scrollbar,.home-category-row::-webkit-scrollbar,.pd-thumb-row::-webkit-scrollbar{display:none}
  .feature-strip-item{flex:0 0 200px!important;scroll-snap-align:start;padding:9px 2px!important}
  .feature-strip-icon{width:42px!important;height:42px!important;flex-basis:42px!important}
  .home-category-section{padding:30px 0 8px!important}
  .category-section-head{gap:10px!important;align-items:flex-end!important;margin-bottom:16px!important}
  .category-section-head h2{font-size:25px!important}
  .category-section-head p{font-size:11px!important;max-width:230px}
  .category-section-head>a{font-size:10px!important}
  .home-category-row{margin-right:-12px;padding-right:12px!important;gap:8px!important;scroll-snap-type:x proximity}
  .home-category-card{flex:0 0 82px!important;scroll-snap-align:start}
  .home-category-icon{width:68px!important;height:68px!important}
  .home-product-row,.shop-flash-sale{padding:32px 0 38px!important}
  .home-product-row-head,.shop-flash-head{align-items:flex-start!important;gap:8px!important;margin-bottom:15px!important}
  .home-product-row-head h2,.shop-flash-head h2{font-size:23px!important}
  .home-product-row-head p,.shop-flash-head p{font-size:10px!important;max-width:220px}
  .home-product-row-head>a,.shop-flash-head>a{font-size:10px!important}
  .home-product-row-grid,.shop-flash-grid,.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .home-row-product-card,.shop-flash-card,.product-card{border-radius:14px!important}
  .home-row-product-body,.shop-flash-body,.product-body{padding:10px!important}
  .home-row-product-body h3,.shop-flash-body h3,.product-body h3{font-size:12px!important;line-height:1.35;min-height:33px!important}
  .home-row-product-body>strong,.shop-flash-body strong,.product-bottom strong{font-size:12px!important}
  .flash-countdown{gap:5px!important}
  .flash-countdown span{min-width:49px!important;padding:6px!important;font-size:8px!important}
  .flash-countdown span b{font-size:12px!important}

  /* Katalog */
  .catalog-section{padding:18px 0 40px!important}
  .catalog-breadcrumbs{margin-bottom:14px!important;font-size:10px!important}
  .catalog-topbar{display:flex!important;flex-direction:column;align-items:stretch!important;gap:12px!important;margin-bottom:14px!important}
  .catalog-topbar h1{font-size:29px!important}
  .catalog-topbar p{font-size:12px!important}
  .catalog-sort{width:100%;justify-content:space-between}
  .catalog-sort select{flex:1;min-width:0!important;height:44px!important}
  .catalog-layout{grid-template-columns:1fr!important;gap:14px!important}
  .mobile-filter-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;border:1px solid #e4d8d3;background:#fff;color:#3c3035;border-radius:13px;padding:0 14px;font-weight:800;margin-bottom:10px}
  .mobile-filter-toggle span:last-child{font-size:18px;transition:.2s}
  .mobile-filter-toggle[aria-expanded=true] span:last-child{transform:rotate(180deg)}
  .catalog-filter.mobile-collapsible-filter{display:none!important;position:static!important;padding:15px!important;border-radius:15px!important;margin-bottom:12px}
  .catalog-filter.mobile-collapsible-filter.mobile-open{display:block!important}
  .catalog-category-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:2px 12px!important;max-height:220px!important}
  .catalog-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .catalog-product-card{border-radius:14px!important}
  .catalog-product-body{padding:10px!important}
  .catalog-product-body h3{font-size:12px!important;min-height:33px!important;margin:4px 0 6px!important}
  .catalog-product-price{font-size:12px!important}
  .catalog-product-meta{font-size:8px!important;display:block!important}
  .catalog-product-meta span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .catalog-product-meta span+span:before{display:none!important}
  .catalog-pagination{gap:6px!important;flex-wrap:wrap}
  .catalog-pagination a,.catalog-pagination span{padding:8px 11px!important;font-size:10px!important}

  /* Detail produk */
  .pd-section{padding:10px 0 34px!important}
  .pd-breadcrumb{font-size:9px!important;margin-bottom:12px!important}
  .pd-main-grid{grid-template-columns:1fr!important;gap:18px!important}
  .pd-main-photo{border-radius:17px!important;aspect-ratio:1/1.06!important}
  .pd-thumb-row{gap:7px!important;margin-top:8px!important}
  .pd-thumb{width:52px!important;flex-basis:52px!important;height:52px!important;border-radius:9px!important}
  .pd-info-column h1{font-size:28px!important}
  .pd-price-box{padding:15px 16px!important;border-radius:14px!important}
  .pd-price-box>strong{font-size:23px!important}
  .pd-color-option{width:38px!important;height:38px!important}
  .pd-size-option{height:40px!important;min-width:44px!important}
  .pd-action-row{position:sticky;bottom:calc(var(--ik-mobile-nav-height) + env(safe-area-inset-bottom) + 7px);z-index:35;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:12px -6px 0!important;padding:8px 6px;background:rgba(255,250,248,.96);backdrop-filter:blur(12px);border-radius:15px;box-shadow:0 10px 30px rgba(60,37,43,.12)}
  .pd-cart-button,.pd-buy-button{height:46px!important;font-size:10px!important;padding:0 6px}
  .pd-trust-row{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .pd-trust-row span{padding:9px 4px!important;font-size:8px!important;min-height:45px!important;line-height:1.25}
  .pd-detail-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:25px!important}
  .pd-content-card{padding:17px!important;border-radius:15px!important}
  .pd-content-card h2,.pd-review-head h2{font-size:20px!important}
  .pd-spec-card dl>div{grid-template-columns:78px 1fr!important;font-size:10px!important}
  .pd-review-section{margin-top:30px!important}
  .pd-review-head{flex-direction:column;align-items:flex-start!important;gap:5px!important}
  .pd-review-source-note{font-size:9px!important;white-space:normal!important}
  .pd-review-summary-grid{grid-template-columns:1fr!important;gap:10px!important}
  .pd-rating-card,.pd-customer-gallery{padding:16px!important;border-radius:15px!important}
  .pd-rating-big{font-size:44px!important}
  .pd-customer-gallery>div{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
  .pd-review-list{grid-template-columns:1fr!important;gap:10px!important}

  /* Keranjang */
  .cart-section{padding:24px 0 36px!important}
  .cart-layout{grid-template-columns:1fr!important;gap:14px!important}
  .cart-list,.cart-summary{padding:15px!important;border-radius:16px!important}
  .cart-item{grid-template-columns:68px minmax(0,1fr)!important;gap:10px!important;align-items:start!important}
  .cart-thumb{width:68px!important;height:84px!important;border-radius:10px!important}
  .cart-main h3{font-size:15px!important}
  .cart-controls,.cart-subtotal{grid-column:2!important;text-align:left!important}
  .cart-summary{position:static!important}

  /* Checkout */
  .checkout-v2-shell{width:100%!important;max-width:none!important;padding:10px 12px 30px!important}
  .checkout-v2-layout{grid-template-columns:1fr!important;gap:12px!important;border-radius:16px!important;overflow:visible!important}
  .checkout-v2-main,.checkout-v2-summary{padding:14px!important;min-width:0!important}
  .checkout-v2-summary{position:static!important;max-height:none!important}
  .checkout-v2-grid-2{grid-template-columns:1fr!important;gap:10px!important}
  .checkout-v2-card{border-radius:14px!important;padding:13px!important}
  .checkout-v2-section{padding:18px 0!important}
  .checkout-v2-cart-item{grid-template-columns:52px minmax(0,1fr) auto!important;gap:8px!important}
  .checkout-v2-cart-thumb{width:52px!important;height:62px!important}
  .checkout-v2-cart-list,.checkout-v2-recommendation-list{max-height:none!important}
  .checkout-v2-recommendation-list{display:flex!important;overflow-x:auto;gap:8px!important;padding-bottom:5px;scrollbar-width:none}
  .checkout-v2-recommendation-list>*{flex:0 0 245px}
  .checkout-v2-payment-option,.checkout-v2-shipping-option{padding:13px!important;border-radius:12px!important}
  .checkout-v2-voucher{grid-template-columns:1fr auto!important;gap:7px!important}
  .checkout-v2-confirm{width:100%!important;min-height:50px!important}
  .checkout-v2-total{font-size:21px!important}

  /* Halaman pembayaran */
  .payment-page{padding:18px 0 34px!important}
  .payment-shell{width:calc(100% - 24px)!important}
  .payment-layout{grid-template-columns:1fr!important;gap:12px!important}
  .payment-main-card,.payment-summary-card,.payment-upload-card,.payment-method-card{padding:16px!important;border-radius:16px!important}
  .payment-heading h1{font-size:29px!important}
  .payment-amount-card strong{font-size:25px!important}
  .payment-qris-wrap img,.qris-image{width:min(100%,280px)!important;height:auto!important;margin:auto}
  .payment-bank-card{grid-template-columns:55px 1fr!important;gap:10px!important}
  .payment-bank-logo{width:55px!important;min-width:55px!important}
  .payment-file-box{padding:14px!important}

  /* Cek status pesanan */
  .track-page{padding:18px 0 34px!important}
  .track-shell{width:calc(100% - 24px)!important}
  .track-intro{padding:22px 12px!important}
  .track-intro h1{font-size:31px!important}
  .track-search{grid-template-columns:1fr!important;gap:8px!important;padding:10px!important}
  .track-search button{width:100%}
  .track-card-head{padding:16px!important;flex-direction:column;align-items:flex-start!important;gap:9px!important}
  .track-grid{grid-template-columns:1fr!important}
  .track-main,.track-side{padding:16px!important}
  .phone-order-card{grid-template-columns:1fr!important;gap:8px!important}
  .phone-order-head{flex-direction:column;align-items:flex-start!important;gap:6px!important}
  .phone-order-action{width:100%}
  .phone-order-action a{width:100%;justify-content:center}
  .payment-proof-preview img{max-height:390px!important;object-fit:contain}
  .tracking-actions{display:grid!important;grid-template-columns:1fr!important}

  /* Retur pelanggan */
  .return-page,.return-shipping-page{padding:14px 0 34px!important}
  .return-shell,.return-shipping-shell{width:calc(100% - 24px)!important}
  .return-hero,.shipping-hero{padding:22px 18px!important;border-radius:18px!important}
  .return-hero h1,.shipping-hero h1{font-size:30px!important;line-height:1.1}
  .return-layout,.shipping-layout{grid-template-columns:1fr!important;gap:12px!important}
  .return-panel,.shipping-card,.tracking-panel,.refund-destination-panel{padding:16px!important;border-radius:16px!important}
  .return-type-grid,.return-reason-grid{grid-template-columns:1fr!important}
  .return-item-fields{grid-template-columns:1fr!important}
  .return-history-card{grid-template-columns:1fr!important;gap:8px!important}
  .return-status{justify-self:start!important}
  .copy-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .copy-actions a,.copy-actions button{width:100%;justify-content:center}
  .refund-receipt,.saved-tracking{overflow-wrap:anywhere}

  /* Halaman sukses dan footer */
  .success-section{padding:35px 0 50px!important}
  .success-card{padding:28px 17px!important;border-radius:20px!important}
  .success-card h1{font-size:32px!important}
  .site-footer{padding:38px 0 28px!important}
  .footer-grid{grid-template-columns:1fr!important;gap:20px!important}
  .footer-grid h3{font-size:24px!important}
  .footer-bottom{margin-top:25px!important;padding-top:17px!important;font-size:10px!important}

  /* Tabel atau konten lebar agar tidak merusak layar */
  table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  pre,code{white-space:pre-wrap;overflow-wrap:anywhere}
}

@media(max-width:390px){
  .container{width:calc(100% - 18px)!important}
  .hero h1{font-size:34px!important}
  .home-product-row-grid,.shop-flash-grid,.product-grid,.catalog-product-grid{gap:7px!important}
  .home-row-product-body,.shop-flash-body,.product-body,.catalog-product-body{padding:8px!important}
  .pd-cart-button,.pd-buy-button{font-size:9px!important}
  .pd-trust-row span{font-size:7px!important}
}

/* =========================================================
   V3.1.3 — NAVIGASI BAWAH MOBILE SEDERHANA & RAPI
   ========================================================= */
@media(max-width:700px){
  :root{--ik-mobile-nav-height:66px}
  body{padding-bottom:calc(var(--ik-mobile-nav-height) + env(safe-area-inset-bottom))!important}

  .mobile-nav{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    min-width:0!important;
    min-height:calc(var(--ik-mobile-nav-height) + env(safe-area-inset-bottom))!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:start!important;
    gap:0!important;
    margin:0!important;
    padding:5px 4px calc(5px + env(safe-area-inset-bottom))!important;
    background:#fff!important;
    border:0!important;
    border-top:1px solid #eadfdf!important;
    border-radius:0!important;
    box-shadow:0 -5px 18px rgba(52,35,41,.09)!important;
    overflow:visible!important;
    z-index:999!important;
  }

  .mobile-nav>a{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:56px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    margin:0!important;
    padding:2px 1px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#818696!important;
    font-family:inherit!important;
    font-size:10px!important;
    font-weight:600!important;
    line-height:1!important;
    letter-spacing:0!important;
    text-align:center!important;
    text-decoration:none!important;
    overflow:visible!important;
    transform:none!important;
    box-shadow:none!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  .mobile-nav>a:active{opacity:.7!important}
  .mobile-nav>a.active{color:#d98399!important;font-weight:800!important}
  .mobile-nav>a.active:before{display:none!important;content:none!important}

  .mobile-nav>a>.mobile-nav-icon{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    padding:0!important;
    border-radius:10px!important;
    background:transparent!important;
    color:inherit!important;
    font-size:0!important;
    line-height:1!important;
    overflow:hidden!important;
  }

  .mobile-nav>a.active>.mobile-nav-icon{background:#fff0f4!important}

  .mobile-nav>a>.mobile-nav-icon>svg{
    display:block!important;
    width:19px!important;
    height:19px!important;
    min-width:19px!important;
    min-height:19px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.75!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }

  .mobile-nav>a>.mobile-nav-label{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    color:inherit!important;
    font-size:9.5px!important;
    font-weight:inherit!important;
    line-height:12px!important;
    letter-spacing:-.1px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    text-align:center!important;
  }

  .mobile-nav>a>b{
    position:absolute!important;
    top:1px!important;
    right:calc(50% - 25px)!important;
    min-width:16px!important;
    height:16px!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    padding:0 4px!important;
    border:2px solid #fff!important;
    border-radius:999px!important;
    background:#d98399!important;
    color:#fff!important;
    font-size:8px!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:none!important;
  }

  .pd-action-row{bottom:calc(var(--ik-mobile-nav-height) + env(safe-area-inset-bottom) + 7px)!important}
}

@media(max-width:360px){
  .mobile-nav{padding-left:1px!important;padding-right:1px!important}
  .mobile-nav>a>.mobile-nav-label{font-size:8.8px!important;letter-spacing:-.25px!important}
  .mobile-nav>a>.mobile-nav-icon{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important}
  .mobile-nav>a>.mobile-nav-icon>svg{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important}
}
