/* Test deploy v3 — sukses pakai Git workflow! */

/*
Theme Name: ACE SHOP
Theme URI: https://aceshop.store
Author: ACE SHOP
Description: Theme custom untuk ACE SHOP — toko HP & gadget. Dark elegant + gold accent, mobile-first design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: aceshop
Tags: e-commerce, dark, mobile-first, woocommerce
*/

/* ============== RESET & BASE ============== */
  *,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
  :root{
    --bg:#0a0a0a;
    --bg-2:#141414;
    --bg-3:#1c1c1c;
    --bg-card:#1f1f1f;
    --line:#2a2a2a;
    --text:#ffffff;
    --text-dim:#9a9a9a;
    --gold:#d4af37;
    --gold-2:#b8941f;
    --danger:#e74c3c;
    --success:#27ae60;
    --shadow:0 10px 40px rgba(0,0,0,.5);
    --radius:16px;
    --radius-sm:12px;
  }
  /* Force overflow-x hidden everywhere — iOS Safari sometimes
   * ignores overflow-x on body alone when an inner element
   * exceeds 100% width. Adding it at html level + width:100% +
   * position:relative gives reliable containment across Safari
   * versions. !important guards against later cascade overrides
   * (some WC plugins set overflow:auto on body). */
  html,body{
    background:var(--bg);color:var(--text);
    overflow-x:hidden !important;
    width:100%;
    position:relative;
  }
  body{
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    line-height:1.5;font-size:15px;
    max-width:480px;margin:0 auto;
    min-height:100vh;
    padding-bottom:90px;
    background:var(--bg);
    /* Prevents the iOS Safari elastic-scroll horizontal bounce
     * that exposes the page-behind background when the user
     * swipes left/right on the content. */
    overscroll-behavior-x:contain;
  }
  img{max-width:100%;display:block}
  button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
  a{color:inherit;text-decoration:none}
  input,textarea,select{font-family:inherit}

  /* ============== TOP HEADER ============== */
  /* Mobile-first sizing — tightened to fit 3 icons (bell + chat +
   * cart) without horizontal overflow. Older versions had wider
   * gaps + bigger icons designed for 2-icon header; adding the
   * notification bell required this trim. Desktop overrides at
   * @media (min-width:768px) restore the comfortable spacing. */
  .top-header{
    position:sticky;top:0;z-index:50;
    background:var(--bg);
    padding:10px 12px;
    display:flex;align-items:center;gap:6px;
    border-bottom:1px solid var(--bg-3);
    /* Explicit width to prevent the flex container from growing
     * beyond viewport on iOS Safari, where flex children with
     * intrinsic min-content widths (like icon SVGs) can otherwise
     * push the container past its parent's bounds. */
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .logo-wrap{
    display:flex;align-items:center;gap:6px;flex-shrink:0;
  }
  .logo-icon{
    width:36px;height:36px;border-radius:9px;
    background:#fff;
    display:flex;align-items:center;justify-content:center;
    overflow:hidden;
    box-shadow:0 2px 8px rgba(255,255,255,.15);
  }
  .logo-icon img{width:100%;height:100%;object-fit:contain;padding:3px}
  .logo-text{
    font-size:11px;font-weight:800;letter-spacing:.5px;
    color:#fff;line-height:1;
  }
  .logo-text span{color:var(--gold)}
  .search-box{
    flex:1;
    min-width:0; /* allow shrinking below intrinsic content width */
    background:var(--bg-3);
    border-radius:50px;
    padding:8px 14px;
    display:flex;align-items:center;
    border:1px solid transparent;
    transition:border-color .2s;
  }
  .search-box:focus-within{border-color:var(--gold)}
  .search-box input{
    flex:1;min-width:0;background:none;border:none;outline:none;
    color:var(--text);font-size:12px;
  }
  .search-box input::placeholder{color:var(--text-dim)}
  .icon-btn{
    width:34px;height:34px;border-radius:50%;
    background:var(--bg-3);
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;position:relative;
    transition:background .2s;
  }
  .icon-btn:active{background:var(--bg-card)}
  .icon-btn svg{width:16px;height:16px;stroke:var(--text);stroke-width:2;fill:none}

  /* On very narrow screens (< 380px) hide the ACE SHOP wordmark
   * to give the search input some breathing room — the card
   * logo alone is recognizable enough. */
  @media (max-width:379.98px){
    .logo-text{display:none}
    .top-header{gap:4px;padding:8px 10px}
    .icon-btn{width:32px;height:32px}
  }
  .badge-dot{
    position:absolute;top:6px;right:6px;
    background:var(--gold);color:#000;
    min-width:16px;height:16px;border-radius:50%;
    font-size:10px;font-weight:800;
    display:flex;align-items:center;justify-content:center;
    padding:0 4px;
  }

  /* ============== HERO BANNER (CAROUSEL) ============== */
  .hero-section{padding:14px 16px}
  .carousel{
    position:relative;
    border-radius:var(--radius);
    overflow:hidden;
    aspect-ratio:16/9;
    background:#000;
  }
  .carousel-track{
    display:flex;
    width:100%;height:100%;
    transition:transform .5s ease;
  }
  .carousel-slide{
    flex:0 0 100%;
    width:100%;height:100%;
    background:#000;
  }
  .carousel-slide img{
    width:100%;height:100%;
    object-fit:cover;
    display:block;
  }
  .banner-dots{
    display:flex;gap:6px;justify-content:center;
    margin-top:10px;
  }
  .dot{
    width:6px;height:6px;border-radius:50%;
    background:var(--bg-3);transition:all .3s;
  }
  .dot.active{width:18px;border-radius:50px;background:var(--gold)}

  /* ============== SECTION TITLE ============== */
  .section{padding:18px 16px 8px}
  .section-title{
    font-size:20px;font-weight:800;color:#fff;
    margin-bottom:14px;letter-spacing:-.3px;
  }

  /* ============== MARKETPLACE PAGE ============== */
  .ace-mp-page-sub{
    color:var(--text-dim,#9ca3af);
    font-size:13px;
    margin:-6px 0 16px;
    line-height:1.5;
  }
  .ace-mp-cards{
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .ace-mp-card{
    display:block;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:12px;
    padding:14px;
    text-decoration:none;
    color:inherit;
    transition:border-color .15s,transform .15s;
  }
  .ace-mp-card:hover{
    border-color:rgba(212,175,55,.4);
    transform:translateY(-2px);
  }
  .ace-mp-card-head{
    display:flex;
    align-items:center;
    gap:12px;
  }
  .ace-mp-card-icon{
    width:48px;
    height:48px;
    flex-shrink:0;
    border-radius:50%;
    overflow:hidden;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .ace-mp-card-icon img{
    width:100%;
    height:100%;
    object-fit:contain;
  }
  .ace-mp-card-icon-fallback{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:20px;
    font-weight:800;
  }
  .ace-mp-card-meta{flex:1;min-width:0}
  .ace-mp-card-platform{
    font-size:15px;
    font-weight:700;
    color:#fff;
    line-height:1.2;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ace-mp-card-store{
    font-size:11.5px;
    color:var(--text-dim,#9ca3af);
    text-transform:uppercase;
    letter-spacing:.5px;
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ace-mp-card-chev{
    color:var(--text-dim,#9ca3af);
    flex-shrink:0;
    transition:color .15s,transform .15s;
  }
  .ace-mp-card:hover .ace-mp-card-chev{
    color:var(--gold,#d4af37);
    transform:translateX(2px);
  }
  .ace-mp-card-stats{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--bg-3);
  }
  .ace-mp-stat{
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:12px;
    color:var(--text-dim,#9ca3af);
  }
  .ace-mp-stat-icon{
    color:var(--gold,#d4af37);
    flex-shrink:0;
  }
  .ace-mp-stat-value{
    color:#fff;
    font-weight:700;
  }
  .ace-mp-stat-label{
    color:var(--text-dim,#9ca3af);
  }
  .ace-mp-card-badges{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
  }
  .ace-mp-card-badge{
    height:24px;
    width:auto;
    max-width:120px;
    object-fit:contain;
    border-radius:4px;
  }
  .ace-mp-empty{
    color:var(--text-dim,#9ca3af);
    text-align:center;
    padding:30px 16px;
    font-size:13px;
    line-height:1.6;
  }

  /* Desktop: 2 marketplace cards per row (left + right). Switches
   * the flex column-stack to a 2-col grid; gap stays balanced
   * vertically and horizontally. Mobile keeps the single-column
   * stack so the badges + stats row don't get cramped. */
  @media (min-width: 768px) {
    .ace-mp-cards {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }
  }

  /* ============== FLOATING SCROLL BAR (desktop-only) ============== */
  /* Native-style custom scrollbar pinned to the right edge: arrow
   * button at top, draggable thumb in the middle, arrow at bottom.
   * Click on track jumps to that position; click on thumb starts
   * a drag. JS in footer.php drives the geometry. */
  .ace-scroll-bar {
    display: none;
    position: fixed;
    top: 12px;
    bottom: 12px;
    right: 6px;
    width: 18px;
    z-index: 99997; /* one less than livechat (99998) */
    flex-direction: column;
    align-items: stretch;
  }
  .ace-scroll-bar.is-hidden { display: none !important; }

  .ace-scroll-bar .ace-scroll-btn {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: rgba(35, 35, 35, .85);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #aaa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color .12s, border-color .12s, background .12s;
  }
  .ace-scroll-bar .ace-scroll-btn:hover {
    color: var(--gold, #d4af37);
    border-color: rgba(212, 175, 55, .5);
    background: rgba(35, 35, 35, .95);
  }
  .ace-scroll-bar .ace-scroll-btn:active {
    background: rgba(212, 175, 55, .25);
  }

  .ace-scroll-track {
    flex: 1;
    margin: 4px 0;
    background: rgba(20, 20, 20, .7);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .ace-scroll-thumb {
    position: absolute;
    left: 1px;
    right: 1px;
    top: 0;
    min-height: 30px;
    background: rgba(220, 220, 220, .55);
    border-radius: 3px;
    cursor: grab;
    transition: background .12s;
  }
  .ace-scroll-thumb:hover { background: rgba(255, 255, 255, .75); }
  .ace-scroll-thumb.is-dragging,
  .ace-scroll-thumb:active {
    background: var(--gold, #d4af37);
    cursor: grabbing;
  }

  @media (min-width: 768px) {
    .ace-scroll-bar { display: flex; }
  }

  /* ============== MOBILE BACK-TO-TOP BUTTON ============== */
  /* Floats horizontally centered just above the bottom bar (the WC
   * bottom-nav, or the single-product action bar when the bottom-nav
   * is hidden). Translucent dark fill with a thin gold border — visible
   * enough to find but subtle enough not to compete with the content.
   * Desktop hides this since the right-edge scrollbar already handles
   * the same need. */
  .ace-back-to-top {
    position: fixed;
    left: 50%;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 70; /* above bottom-nav (60), below livechat (99998) */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 20, 20, .55);
    color: var(--gold, #d4af37);
    border: 1px solid rgba(212, 175, 55, .35);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    /* Animation: subtle slide-up + fade. Default state pulls the
     * button 12px below resting position (still under the same
     * horizontal -50% transform), is-visible snaps it into place. */
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .2s ease, background .15s ease;
  }
  .ace-back-to-top.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  .ace-back-to-top:hover,
  .ace-back-to-top:active {
    background: rgba(212, 175, 55, .85);
    color: #0a0a0a;
  }
  .ace-back-to-top:active {
    transform: translate(-50%, 0) scale(.92);
  }

  /* Desktop hides this — the right-edge scrollbar already handles
   * up/down navigation there. */
  @media (min-width: 768px) {
    .ace-back-to-top { display: none !important; }
  }

  /* ============== SEARCH RESULTS HEADER ============== */
  .ace-search-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
  }
  .ace-search-head .section-title{
    flex:1;
    min-width:0;
    margin-bottom:6px;
  }
  .ace-search-clear{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:6px 12px;
    border-radius:50px;
    background:var(--bg-3);
    color:var(--text-dim,#9ca3af);
    font-size:12px;
    font-weight:600;
    text-decoration:none;
    flex-shrink:0;
    transition:background .15s,color .15s;
  }
  .ace-search-clear:hover{
    background:var(--gold,#d4af37);
    color:#000;
  }
  .ace-search-meta{
    font-size:13px;
    color:var(--text-dim,#9ca3af);
    margin-bottom:14px;
  }
  .ace-search-empty{
    text-align:center;
    padding:40px 16px;
    color:var(--text-dim,#9ca3af);
  }
  .ace-search-empty p{margin:0 0 14px;font-size:14px}
  .ace-search-back-btn{
    display:inline-block;
    background:var(--gold,#d4af37);
    color:#000;
    border-radius:8px;
    padding:10px 22px;
    font-size:13px;
    font-weight:700;
    text-decoration:none;
  }
  .ace-search-back-btn:hover{opacity:.9}

  /* ============== CATEGORIES GRID ============== */
  /* iOS Safari grid layout fix: explicit width:100% on the grid
   * container + min-width:0 on every child. Without these, grid
   * children with intrinsic-sized content (long category names
   * like "Aksesoris HP" + 44px icon) compute their min-content
   * width as wider than 1fr, which Safari resolves by inflating
   * the 1fr columns past their nominal share — visually pushes
   * the right column past viewport. */
  .cat-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .cat-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  .cat-card{
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:var(--radius);
    padding:14px;
    display:flex;align-items:center;gap:12px;
    transition:all .2s;
    overflow:hidden; /* clip any oversized child (icon/text) */
    min-width:0;
  }
  .cat-card:active{transform:scale(.97);background:var(--bg-3)}
  .cat-icon{
    width:44px;height:44px;border-radius:12px;
    background:var(--bg-3);
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .cat-icon svg{width:22px;height:22px;stroke:#fff;stroke-width:2;fill:none}
  .cat-icon svg.filled{fill:#fff;stroke:none}
  .cat-name{
    font-size:14px;font-weight:700;color:#fff;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }

  /* ============== PRODUCTS ============== */
  .products{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    padding:0 16px;
  }
  .product{
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:var(--radius);
    overflow:hidden;
    transition:all .2s;
    display:flex;flex-direction:column;
  }
  .product:active{transform:scale(.98)}
  .product-img{
    aspect-ratio:1;
    background:#fff;
    display:flex;align-items:center;justify-content:center;
    font-size:80px;position:relative;
  }
  .product-badge{
    position:absolute;top:8px;left:8px;
    background:var(--gold);color:#000;
    padding:3px 8px;border-radius:6px;
    font-size:10px;font-weight:800;letter-spacing:.5px;
  }
  .product-info{padding:10px 12px 12px;flex:1;display:flex;flex-direction:column}
  .product-name{
    font-size:13px;font-weight:600;color:#fff;
    margin-bottom:4px;line-height:1.3;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden;min-height:34px;
  }
  .product-price{
    font-size:15px;font-weight:800;color:var(--gold);
    margin-top:auto;
  }
  .product-old{
    font-size:11px;color:var(--text-dim);
    text-decoration:line-through;display:block;font-weight:500;
  }
  .add-mini{
    position:absolute;bottom:8px;right:8px;
    width:32px;height:32px;border-radius:50%;
    background:var(--gold);color:#000;
    display:flex;align-items:center;justify-content:center;
    font-size:20px;font-weight:700;
    box-shadow:0 4px 12px rgba(212,175,55,.4);
    transition:transform .2s;
  }
  .add-mini:active{transform:scale(.9)}

  /* ============== BOTTOM NAV ============== */
  .bottom-nav{
    position:fixed;bottom:0;left:50%;transform:translateX(-50%);
    width:100%;max-width:480px;
    background:var(--bg-2);
    border-top:1px solid var(--bg-3);
    padding:10px 8px calc(10px + env(safe-area-inset-bottom));
    display:flex;justify-content:space-around;
    z-index:60;
    box-shadow:0 -10px 30px rgba(0,0,0,.4);
  }
  .nav-tab{
    display:flex;flex-direction:column;align-items:center;gap:4px;
    padding:6px 10px;border-radius:12px;
    color:var(--text-dim);transition:all .2s;
    flex:1;max-width:80px;position:relative;
  }
  .nav-tab svg{width:22px;height:22px;stroke:currentColor;stroke-width:2;fill:none;transition:all .2s}
  .nav-tab span{font-size:11px;font-weight:600}
  .nav-tab.active{color:#fff;background:var(--bg-3)}
  .nav-tab.active svg{stroke:var(--gold)}
  .nav-tab .nav-badge{
    position:absolute;top:2px;right:8px;
    background:var(--gold);color:#000;
    min-width:16px;height:16px;border-radius:50%;
    font-size:10px;font-weight:800;
    display:flex;align-items:center;justify-content:center;padding:0 4px;
  }

  /* ============== PRODUCT DETAIL PAGE ============== */
  .detail-back{
    position:sticky;top:69px;z-index:40;
    background:rgba(10,10,10,.95);backdrop-filter:blur(10px);
    padding:10px 16px;
    display:flex;align-items:center;gap:12px;
    border-bottom:1px solid var(--bg-3);
  }
  .back-btn{
    width:36px;height:36px;border-radius:50%;
    background:var(--bg-3);
    display:flex;align-items:center;justify-content:center;
    font-size:18px;color:var(--text);
  }
  .detail-back-title{font-size:14px;font-weight:600;color:var(--text-dim)}
  .detail-image-wrap{
    margin:14px 16px;
    background:#fff;border-radius:var(--radius);
    aspect-ratio:1;display:flex;align-items:center;justify-content:center;
    overflow:hidden;position:relative;
  }
  .detail-image-wrap img{width:80%;height:80%;object-fit:contain}
  .detail-image-wrap .emoji-fallback{font-size:160px}

  /* Thumbnail strip below main image — bottom margin separates gallery from info */
  .detail-thumbs{
    display:flex;align-items:center;gap:8px;
    margin:14px 16px 24px;
  }
  .thumb-track{
    display:flex;gap:8px;
    overflow-x:auto;scroll-behavior:smooth;
    flex:1;padding:2px;
    scrollbar-width:none;
  }
  .thumb-track::-webkit-scrollbar{display:none}
  .thumb-item{
    flex:0 0 64px;height:64px;
    background:#fff;
    border:2px solid transparent;border-radius:10px;
    padding:4px;cursor:pointer;
    transition:border-color .2s, transform .15s;
    overflow:hidden;
  }
  .thumb-item:hover{transform:translateY(-1px)}
  .thumb-item.active{border-color:var(--gold)}
  .thumb-item img{
    width:100%;height:100%;object-fit:contain;
    margin:0 !important;
  }
  .thumb-arrow{
    width:32px;height:32px;flex-shrink:0;
    border-radius:50%;
    background:var(--bg-2);border:1px solid var(--bg-3);
    color:#fff;font-size:18px;line-height:1;
    display:flex;align-items:center;justify-content:center;
    cursor:pointer;
    transition:background .2s, border-color .2s;
  }
  .thumb-arrow:hover{background:var(--bg-3);border-color:var(--gold)}
  .detail-info{padding:0 16px 24px}

  /* ============ STATS ROW (above title) ============ */
  .detail-stats{
    position:relative;
    display:flex;align-items:center;gap:8px;
    font-size:12px;color:var(--text-dim);
    margin:0 0 10px;flex-wrap:wrap;
  }
  .detail-stat-item{display:inline-flex;align-items:center;gap:5px}
  .detail-stat-item strong{color:#fff;font-weight:700}
  .detail-stat-label{color:var(--text-dim)}
  .detail-stat-sub{color:var(--text-dim)}
  .detail-stat-star{color:var(--gold);font-size:14px;line-height:1}
  .detail-stat-sep{color:var(--text-dim);opacity:.5;padding:0 2px}
  .detail-stat-info{
    margin-left:auto;
    width:24px;height:24px;
    border-radius:50%;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    color:var(--text-dim);
    cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;
    padding:0;
    transition:color .15s, border-color .15s, background .15s;
  }
  .detail-stat-info:hover,
  .detail-stat-info[aria-expanded="true"]{
    color:var(--gold);border-color:var(--gold);
  }
  /* Share button matches the info button visually but sits next to
   * it (margin-left:0 so the info icon's margin-left:auto pushes
   * both to the right edge of the stats row together). */
  .detail-stat-share{
    width:24px;height:24px;
    border-radius:50%;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    color:var(--text-dim);
    cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;
    padding:0;
    margin-left:6px;
    transition:color .15s, border-color .15s, background .15s, transform .1s;
  }
  .detail-stat-share:hover{
    color:var(--gold);border-color:var(--gold);
  }
  .detail-stat-share:active{ transform:scale(.92); }
  .detail-stat-popup{
    position:absolute;
    top:calc(100% + 8px);right:0;
    background:var(--bg-2);
    border:1px solid var(--gold);
    border-radius:10px;
    padding:12px 14px;
    font-size:12px;line-height:1.55;
    color:#d0d0d0;
    width:280px;max-width:calc(100vw - 32px);
    z-index:50;
    box-shadow:0 8px 24px rgba(0,0,0,.5);
    display:none;
  }
  .detail-stat-popup.show{display:block}
  .detail-stat-popup::before{
    content:'';
    position:absolute;
    top:-6px;right:9px;
    width:10px;height:10px;
    background:var(--bg-2);
    border-left:1px solid var(--gold);
    border-top:1px solid var(--gold);
    transform:rotate(45deg);
  }
  .detail-name{
    font-size:19px;font-weight:700;color:#fff;
    margin-bottom:12px;line-height:1.4;
    letter-spacing:-0.2px;
  }
  .detail-price{
    font-size:26px;font-weight:800;color:var(--gold);
    margin-bottom:18px;letter-spacing:-0.3px;
  }
  .detail-card{
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:14px;padding:16px;margin-bottom:12px;
  }
  .detail-card-label{
    font-size:14px;color:var(--text-dim);
    display:flex;align-items:center;gap:8px;
  }
  .detail-card-label strong{color:#fff;font-weight:700}
  .detail-section-title{
    font-size:11px;font-weight:800;color:var(--text-dim);
    letter-spacing:1.2px;margin-bottom:12px;
    text-transform:uppercase;
  }
  .variant-grid{display:flex;flex-wrap:wrap;gap:10px}
  .variant-chip{
    padding:12px 20px;
    background:var(--bg-3);border:1.5px solid var(--bg-3);
    border-radius:10px;font-size:12px;font-weight:700;
    color:#fff;cursor:pointer;transition:all .2s;
    text-transform:uppercase;letter-spacing:.6px;
  }
  .variant-chip:hover{border-color:rgba(212,175,55,.5)}
  .variant-chip.active{
    border-color:var(--gold);color:var(--gold);
    background:rgba(212,175,55,.08);
    box-shadow:0 0 0 1px var(--gold) inset;
  }
  .detail-desc{
    font-size:13px;line-height:1.65;color:#d0d0d0;
    white-space:pre-line;
  }
  .detail-action-bar{
    position:fixed;bottom:0;left:50%;transform:translateX(-50%);
    width:100%;max-width:480px;
    background:var(--bg-2);
    border-top:1px solid var(--bg-3);
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    display:flex;gap:8px;
    z-index:60;
    box-shadow:0 -10px 30px rgba(0,0,0,.4);
  }
  .action-mini{
    flex:0 0 auto;
    background:var(--bg-3);
    border-radius:14px;
    padding:10px 14px;
    display:flex;flex-direction:column;align-items:center;gap:2px;
    color:#fff;min-width:60px;
  }
  .action-mini svg{width:18px;height:18px;stroke:currentColor;stroke-width:2;fill:none}
  .action-mini span{font-size:10px;font-weight:600}
  .action-buy{
    flex:1;
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;border-radius:14px;
    font-weight:800;font-size:14px;
    display:flex;align-items:center;justify-content:center;
  }
  .action-buy:active{transform:scale(.98)}
  /* Force respect for the [hidden] attribute on action buttons —
   * default display:flex above otherwise wins specificity over
   * the user-agent stylesheet's [hidden]{display:none}. Used by
   * theme.js to swap Beli Sekarang ↔ Ingatkan Saya based on
   * variation stock. */
  .action-buy[hidden]{ display:none !important; }

  /* On single product page, replace bottom-nav with the product action bar
     so Pesan / + Keranjang / Beli Sekarang sit where Home/Kategori normally do.
     (Desktop hides .bottom-nav globally already, this rule covers mobile.) */
  body.single-product .bottom-nav,
  body.single-product nav.bottom-nav{
    display:none !important;
  }

  /* Same on checkout FORM page: the only meaningful next action
   * is the Checkout button in the order summary, not Home/Kategori
   * — so kill the bottom-nav.
   *
   * EXCEPT the order-received / thank-you page (which also has the
   * .woocommerce-checkout body class but ALSO carries
   * .woocommerce-order-received). On that page the buyer has
   * finished checking out and needs to navigate normally —
   * Home/Pesanan/Akun/Cart are exactly the next steps after
   * "Selesaikan Pembayaran". */
  body.woocommerce-checkout:not(.woocommerce-order-received) .bottom-nav,
  body.woocommerce-checkout:not(.woocommerce-order-received) nav.bottom-nav{
    display:none !important;
  }

  /* Mobile: tabs section after the layout */
  .detail-tabs-section{
    margin:0 16px 20px;
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:12px;padding:14px;
  }
  .detail-tabs-nav{
    display:flex;gap:2px;
    border-bottom:1px solid var(--bg-3);
    margin:-14px -14px 14px;padding:0 6px;
    overflow-x:auto;scrollbar-width:none;
  }
  .detail-tabs-nav::-webkit-scrollbar{display:none}
  .detail-tab{
    background:transparent;border:none;
    border-bottom:2px solid transparent;
    color:var(--text-dim);
    padding:12px 14px;
    font-size:13px;font-weight:700;
    letter-spacing:.4px;cursor:pointer;
    white-space:nowrap;
    transition:color .2s, border-color .2s;
    margin-bottom:-1px;
  }
  .detail-tab:hover{color:#fff}
  .detail-tab.active{color:var(--gold);border-bottom-color:var(--gold)}
  .detail-tab-count{
    display:inline-block;
    background:var(--bg-3);color:#fff;
    font-size:10px;font-weight:700;
    padding:2px 7px;border-radius:8px;
    margin-left:4px;vertical-align:middle;
  }
  .detail-tab.active .detail-tab-count{background:var(--gold);color:#000}
  .detail-tab-pane{display:none}
  .detail-tab-pane.active{display:block}

  /* ============ DISKUSI ============ */
  .diskusi-empty{
    color:var(--text-dim);font-size:13px;
    text-align:center;padding:24px 0;
  }
  .diskusi-notice{
    padding:10px 14px;border-radius:10px;
    font-size:13px;margin-bottom:14px;
  }
  .diskusi-notice.ok{background:rgba(50,160,80,.12);color:#7fdb9a;border:1px solid rgba(50,160,80,.4)}
  .diskusi-notice.err{background:rgba(220,80,80,.12);color:#f08080;border:1px solid rgba(220,80,80,.4)}
  .diskusi-list{list-style:none;padding:0;margin:0 0 18px}
  .diskusi-item{
    display:flex;gap:12px;
    padding:12px 0;
    border-bottom:1px solid var(--bg-3);
  }
  .diskusi-item:last-child{border-bottom:none}
  .diskusi-avatar img{
    width:36px;height:36px;border-radius:50%;
    display:block;
  }
  .diskusi-body{flex:1;min-width:0}
  .diskusi-meta{
    font-size:12px;color:var(--text-dim);
    margin-bottom:4px;
  }
  .diskusi-meta strong{color:#fff;font-weight:700;margin-right:8px}
  .diskusi-text{font-size:13px;line-height:1.55;color:#d0d0d0}
  .diskusi-text p{margin:0 0 6px}
  .diskusi-form{
    background:var(--bg);
    border:1px solid var(--bg-3);
    border-radius:12px;padding:14px;
    margin-top:8px;
  }
  .diskusi-form-row{
    display:flex;gap:8px;margin-bottom:8px;
  }
  .diskusi-form-row input{flex:1;min-width:0}
  .diskusi-form input[type="text"],
  .diskusi-form input[type="email"],
  .diskusi-form textarea{
    width:100%;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:8px;padding:10px 12px;
    color:#fff;font-size:13px;
    font-family:inherit;resize:vertical;
    box-sizing:border-box;
  }
  .diskusi-form input:focus,
  .diskusi-form textarea:focus{
    outline:none;border-color:var(--gold);
  }
  .diskusi-form-foot{
    display:flex;align-items:center;justify-content:space-between;
    gap:12px;margin-top:10px;flex-wrap:wrap;
  }
  .diskusi-form-as{font-size:12px;color:var(--text-dim)}
  .diskusi-form-as strong{color:#fff}
  .diskusi-submit{
    background:var(--gold);color:#000;
    border:none;border-radius:8px;
    padding:10px 22px;
    font-size:13px;font-weight:700;
    cursor:pointer;letter-spacing:.3px;
  }
  .diskusi-submit:hover{opacity:.9}

  /* ============ DISKUSI: ADMIN BADGE + REPLIES + ACTIONS ============ */
  .diskusi-admin-badge{
    display:inline-block;
    background:var(--gold);color:#000;
    font-size:10px;font-weight:800;
    padding:1px 6px;border-radius:6px;
    margin-right:6px;letter-spacing:.4px;
    text-transform:uppercase;
  }
  /* Distinct background for admin replies so the official answer
   * stands out visually inside a thread. */
  .diskusi-item-admin > .diskusi-body > .diskusi-text{
    color:#e8e8e8;
  }
  .diskusi-item-admin > .diskusi-body > .diskusi-meta strong{
    color:var(--gold);
  }

  /* Replies wrap — indented under the parent question. */
  .diskusi-replies-wrap{
    list-style:none;padding:0;margin:0;
    border-bottom:1px solid var(--bg-3);
  }
  .diskusi-replies{
    list-style:none;padding:0;margin:0 0 0 48px;
    border-left:2px solid rgba(212,175,55,.25);
  }
  .diskusi-replies .diskusi-item{
    border-bottom:none;
    padding:8px 0 8px 12px;
  }
  .diskusi-replies .diskusi-avatar img{width:28px;height:28px}

  /* Inline action buttons (Balas / Hapus) — only rendered for admin. */
  .diskusi-actions{
    display:flex;gap:8px;margin-top:6px;
  }
  .diskusi-action-btn{
    background:transparent;
    border:1px solid var(--bg-3);
    color:var(--text-dim);
    border-radius:6px;
    padding:4px 10px;
    font-size:11px;font-weight:600;
    cursor:pointer;letter-spacing:.2px;
    transition:border-color .15s,color .15s;
  }
  .diskusi-action-btn:hover{
    border-color:var(--gold);color:var(--gold);
  }
  .diskusi-action-btn-danger:hover{
    border-color:#ef4444;color:#ef4444;
  }

  /* Inline admin reply form that pops under a question on Balas. */
  .diskusi-admin-reply-form{
    margin-top:8px;
    background:var(--bg);
    border:1px solid var(--bg-3);
    border-radius:8px;
    padding:10px;
  }
  .diskusi-admin-reply-form textarea{
    width:100%;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:6px;padding:8px 10px;
    color:#fff;font-size:13px;
    font-family:inherit;resize:vertical;
    box-sizing:border-box;min-height:60px;
  }
  .diskusi-admin-reply-form textarea:focus{
    outline:none;border-color:var(--gold);
  }
  .diskusi-admin-reply-foot{
    display:flex;justify-content:flex-end;gap:8px;
    margin-top:8px;
  }
  .diskusi-admin-reply-foot .diskusi-submit{
    padding:6px 14px;font-size:12px;
  }

  /* ============ ULASAN (display + order-page form) ============ */
  .ulasan-list{list-style:none;padding:0;margin:0 0 18px}
  .ulasan-item{
    display:flex;gap:12px;
    padding:12px 0;border-bottom:1px solid var(--bg-3);
  }
  .ulasan-item:last-child{border-bottom:none}
  .ulasan-avatar img{width:36px;height:36px;border-radius:50%;display:block}
  .ulasan-body{flex:1;min-width:0}
  .ulasan-meta{font-size:12px;color:var(--text-dim);margin-bottom:4px;line-height:1.5}
  .ulasan-meta strong{color:#fff;font-weight:700;margin-right:8px}
  .ulasan-verified{
    color:#7fdb9a;font-size:11px;margin-right:8px;
    background:rgba(50,160,80,.1);
    padding:1px 6px;border-radius:6px;
  }
  .ulasan-time{color:var(--text-dim)}
  .ulasan-stars{margin:2px 0 6px;line-height:1}
  .ulasan-star{color:var(--bg-3);font-size:14px;margin-right:1px}
  .ulasan-star.filled{color:var(--gold)}
  .ulasan-text{font-size:13px;line-height:1.55;color:#d0d0d0}
  .ulasan-text p{margin:0 0 6px}
  .ulasan-info-cta{
    margin-top:16px;padding:12px 14px;
    background:var(--bg);border:1px solid var(--bg-3);
    border-radius:10px;
    font-size:12px;color:var(--text-dim);line-height:1.5;
  }
  .ulasan-info-cta a{color:var(--gold);text-decoration:underline}

  /* Order page review section */
  .ulasan-section{margin-top:24px}
  .ulasan-section-title{
    font-size:16px;font-weight:700;color:#fff;
    margin:0 0 14px;
  }
  .ulasan-item-form{
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:12px;padding:14px;margin-bottom:12px;
  }
  .ulasan-item-head{
    display:flex;align-items:center;gap:12px;margin-bottom:12px;
  }
  .ulasan-item-img img{
    width:48px;height:48px;border-radius:8px;
    object-fit:cover;display:block;
  }
  .ulasan-item-name{font-size:13px;font-weight:700;color:#fff;flex:1;min-width:0}
  .ulasan-item-name a{color:#fff;text-decoration:none}
  .ulasan-item-name a:hover{color:var(--gold)}
  .ulasan-status{
    font-size:13px;color:#7fdb9a;
    padding:8px 0;
  }
  .ulasan-empty{color:var(--text-dim);font-size:13px;padding:14px 0}
  .ulasan-notice{
    padding:10px 14px;border-radius:10px;
    font-size:13px;margin-bottom:14px;
  }
  .ulasan-notice.ok{background:rgba(50,160,80,.12);color:#7fdb9a;border:1px solid rgba(50,160,80,.4)}
  .ulasan-notice.err{background:rgba(220,80,80,.12);color:#f08080;border:1px solid rgba(220,80,80,.4)}

  .ulasan-rating-input{
    display:flex;align-items:center;gap:10px;
    margin-bottom:10px;flex-wrap:wrap;
  }
  .ulasan-rating-label{font-size:13px;color:var(--text-dim)}
  .ulasan-stars-pick{
    display:inline-flex;flex-direction:row-reverse;
  }
  .ulasan-stars-pick input[type="radio"]{
    position:absolute;opacity:0;pointer-events:none;
  }
  .ulasan-stars-pick label{
    cursor:pointer;color:var(--bg-3);
    font-size:26px;line-height:1;
    padding:0 3px;
    transition:color .15s;
  }
  .ulasan-stars-pick label:hover,
  .ulasan-stars-pick label:hover ~ label,
  .ulasan-stars-pick input[type="radio"]:checked ~ label{
    color:var(--gold);
  }
  .ulasan-form textarea{
    width:100%;box-sizing:border-box;
    background:var(--bg);border:1px solid var(--bg-3);
    border-radius:8px;padding:10px 12px;
    color:#fff;font-size:13px;font-family:inherit;
    margin-bottom:10px;resize:vertical;
  }
  .ulasan-form textarea:focus{outline:none;border-color:var(--gold)}
  .ulasan-submit{
    background:var(--gold);color:#000;
    border:none;border-radius:8px;
    padding:10px 22px;
    font-size:13px;font-weight:700;
    cursor:pointer;letter-spacing:.3px;
  }
  .ulasan-submit:hover{opacity:.9}

  /* ============ ULASAN PHOTO UPLOAD ============ */
  .ulasan-photos{
    display:flex;flex-wrap:wrap;gap:8px;
    margin-bottom:12px;align-items:flex-start;
  }
  .ulasan-photo-add{
    display:inline-flex;align-items:center;gap:8px;
    padding:10px 14px;
    border:1px dashed var(--bg-3);border-radius:8px;
    background:var(--bg);color:#9aa0a6;
    cursor:pointer;font-size:12px;
    transition:border-color .15s,color .15s;
  }
  .ulasan-photo-add:hover{
    border-color:var(--gold);color:var(--gold);
  }
  .ulasan-photo-add svg{flex-shrink:0}
  .ulasan-photo-add-text{display:flex;align-items:center;gap:6px}
  .ulasan-photo-counter{
    font-size:11px;opacity:.7;font-weight:600;
  }
  .ulasan-photos-preview{
    display:flex;flex-wrap:wrap;gap:8px;
  }
  .ulasan-photo-tile{
    position:relative;width:64px;height:64px;
    border-radius:8px;overflow:hidden;
    background:var(--bg-2);border:1px solid var(--bg-3);
  }
  .ulasan-photo-tile img{
    width:100%;height:100%;object-fit:cover;display:block;
  }
  .ulasan-photo-rm{
    position:absolute;top:2px;right:2px;
    width:20px;height:20px;border-radius:50%;
    background:rgba(0,0,0,.7);color:#fff;
    border:none;cursor:pointer;
    font-size:14px;line-height:1;
    display:flex;align-items:center;justify-content:center;
    padding:0;
  }
  .ulasan-photo-rm:hover{background:#ef4444}

  /* ============ ULASAN GALLERY (di review list) ============ */
  .ulasan-gallery{
    display:flex;flex-wrap:wrap;gap:6px;
    margin-top:8px;
  }
  .ulasan-gallery-thumb{
    display:block;width:72px;height:72px;
    border-radius:8px;overflow:hidden;
    background:var(--bg-2);border:1px solid var(--bg-3);
    transition:transform .15s,border-color .15s;
  }
  .ulasan-gallery-thumb:hover{
    transform:scale(1.05);
    border-color:var(--gold);
  }
  .ulasan-gallery-thumb img{
    width:100%;height:100%;object-fit:cover;display:block;
  }

  /* ============ WC REVIEWS DARK THEME ============ */
  .detail-tab-pane[data-pane="ulasan"] #reviews{color:#d0d0d0}
  .detail-tab-pane[data-pane="ulasan"] #comments > h2{
    font-size:14px;color:var(--text-dim);
    text-transform:uppercase;letter-spacing:.6px;
    margin:0 0 12px;font-weight:800;
  }
  .detail-tab-pane[data-pane="ulasan"] .commentlist{list-style:none;padding:0;margin:0 0 20px}
  .detail-tab-pane[data-pane="ulasan"] .commentlist li{
    padding:12px 0;border-bottom:1px solid var(--bg-3);
    list-style:none;
  }
  .detail-tab-pane[data-pane="ulasan"] .commentlist li:last-child{border-bottom:none}
  .detail-tab-pane[data-pane="ulasan"] .commentlist .comment_container{
    display:flex;gap:12px;background:none;border:none;padding:0;
  }
  .detail-tab-pane[data-pane="ulasan"] .commentlist img.avatar{
    width:40px;height:40px;border-radius:50%;
    padding:0;border:none;background:none;position:static;
  }
  .detail-tab-pane[data-pane="ulasan"] .comment-text{
    flex:1;border:none;background:none;padding:0;margin:0;
  }
  .detail-tab-pane[data-pane="ulasan"] .comment-text .meta{
    font-size:12px;color:var(--text-dim);margin-bottom:4px;
  }
  .detail-tab-pane[data-pane="ulasan"] .comment-text .meta strong{color:#fff}
  .detail-tab-pane[data-pane="ulasan"] .comment-text p{margin:0 0 4px;font-size:13px;line-height:1.55}
  .detail-tab-pane[data-pane="ulasan"] .star-rating{color:var(--gold);margin-bottom:4px}
  .detail-tab-pane[data-pane="ulasan"] .woocommerce-noreviews,
  .detail-tab-pane[data-pane="ulasan"] p.no-comments{
    color:var(--text-dim);font-size:13px;
    text-align:center;padding:18px 0;
  }
  .detail-tab-pane[data-pane="ulasan"] #review_form_wrapper{margin-top:18px}
  .detail-tab-pane[data-pane="ulasan"] #review_form #reply-title,
  .detail-tab-pane[data-pane="ulasan"] #review_form #respond > h3{
    font-size:14px;color:#fff;margin:0 0 10px;font-weight:700;
  }
  .detail-tab-pane[data-pane="ulasan"] #review_form .comment-form-rating label,
  .detail-tab-pane[data-pane="ulasan"] #review_form .comment-notes,
  .detail-tab-pane[data-pane="ulasan"] #review_form label{
    color:var(--text-dim);font-size:13px;display:block;margin-bottom:4px;
  }
  .detail-tab-pane[data-pane="ulasan"] #review_form input[type="text"],
  .detail-tab-pane[data-pane="ulasan"] #review_form input[type="email"],
  .detail-tab-pane[data-pane="ulasan"] #review_form textarea{
    width:100%;
    background:var(--bg);
    border:1px solid var(--bg-3);
    border-radius:8px;padding:10px 12px;
    color:#fff;font-size:13px;font-family:inherit;
    box-sizing:border-box;
  }
  .detail-tab-pane[data-pane="ulasan"] #review_form input:focus,
  .detail-tab-pane[data-pane="ulasan"] #review_form textarea:focus{
    outline:none;border-color:var(--gold);
  }
  .detail-tab-pane[data-pane="ulasan"] #review_form .form-submit input[type="submit"],
  .detail-tab-pane[data-pane="ulasan"] #review_form .form-submit button{
    background:var(--gold);color:#000;
    border:none;border-radius:8px;
    padding:10px 22px;
    font-size:13px;font-weight:700;
    cursor:pointer;letter-spacing:.3px;
  }
  .detail-tab-pane[data-pane="ulasan"] .stars a{color:var(--text-dim)}
  .detail-tab-pane[data-pane="ulasan"] .stars a:hover,
  .detail-tab-pane[data-pane="ulasan"] .stars a.active,
  .detail-tab-pane[data-pane="ulasan"] .stars:hover a{color:var(--gold)}
  .detail-tab-pane[data-pane="ulasan"] .must-log-in{
    color:var(--text-dim);font-size:13px;padding:14px;
    background:var(--bg);border:1px solid var(--bg-3);border-radius:10px;
  }
  .detail-tab-pane[data-pane="ulasan"] .must-log-in a{color:var(--gold)}

  /* ============== BELI SEKARANG MARKETPLACE PICKER ============== */
  .ace-buy-modal{
    position:fixed;inset:0;z-index:300;
    display:flex;align-items:flex-end;justify-content:center;
    padding:0;
  }
  .ace-buy-modal[hidden]{display:none}
  .ace-buy-modal-backdrop{
    position:absolute;inset:0;
    background:rgba(0,0,0,.65);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
  }
  .ace-buy-modal-panel{
    position:relative;
    background:linear-gradient(180deg, #1a1a1a 0%, var(--bg-2) 100%);
    border:1px solid var(--bg-3);
    border-radius:20px 20px 0 0;
    padding:18px 18px 22px;
    width:100%;max-width:440px;
    max-height:85vh;overflow-y:auto;
    box-shadow:0 -10px 40px rgba(0,0,0,.5);
    animation:aceBuyIn .22s cubic-bezier(.32,.72,.36,1.04);
  }
  @keyframes aceBuyIn{
    from{transform:translateY(100%)}
    to{transform:translateY(0)}
  }
  .ace-buy-modal-head{
    display:flex;align-items:center;justify-content:space-between;
    margin:0 0 4px;
  }
  .ace-buy-modal-title{
    font-size:17px;font-weight:800;color:#fff;
    margin:0;letter-spacing:-.2px;
  }
  .ace-buy-modal-close{
    width:34px;height:34px;border-radius:50%;
    background:var(--bg-3);border:none;
    color:var(--text-dim);
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .15s, color .15s;
  }
  .ace-buy-modal-close:hover{background:#3a3a3a;color:#fff}
  .ace-buy-modal-sub{
    font-size:12px;color:var(--text-dim);
    margin:0 0 16px;
  }
  .ace-buy-list{
    display:flex;flex-direction:column;gap:8px;
  }

  /* Item wrapper holds the row + optional badges strip together as one card */
  .ace-buy-item{
    background:var(--bg-3);
    border:1px solid transparent;
    border-radius:14px;
    overflow:hidden;
    transition:border-color .15s, background .15s;
  }
  .ace-buy-item:hover{
    border-color:var(--ace-mp-brand, var(--gold));
    background:#252525;
  }

  /* Row inside item: [icon] [platform / store] [chevron] */
  .ace-buy-row{
    display:flex;align-items:center;gap:14px;
    padding:12px 14px;
    background:transparent;
    border:none;
    text-decoration:none;
    cursor:pointer;
    width:100%;text-align:left;
    transition:transform .12s;
    color:inherit;font-family:inherit;
  }
  .ace-buy-row:active{transform:scale(.985)}

  .ace-buy-icon{
    flex-shrink:0;
    width:44px;height:44px;border-radius:50%;
    background:#fff;
    display:flex;align-items:center;justify-content:center;
    overflow:hidden;
    box-shadow:0 0 0 2px var(--ace-mp-brand, transparent);
  }
  .ace-buy-icon img{
    width:100%;height:100%;object-fit:cover;display:block;
  }
  .ace-buy-icon-placeholder{
    font-size:18px;font-weight:800;
    color:var(--ace-mp-brand, var(--bg));
    text-transform:uppercase;
  }
  .ace-buy-icon-web{
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;
    box-shadow:0 0 0 2px var(--gold);
  }

  .ace-buy-text{
    flex:1;min-width:0;
    display:flex;flex-direction:column;gap:2px;
  }
  .ace-buy-platform{
    font-size:14px;font-weight:700;color:#fff;
    line-height:1.2;
  }
  .ace-buy-store{
    font-size:11.5px;color:var(--text-dim);
    line-height:1.3;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .ace-buy-chev{
    flex-shrink:0;
    color:var(--text-dim);
    transition:color .15s, transform .15s;
  }
  .ace-buy-item:hover .ace-buy-chev{
    color:var(--ace-mp-brand, var(--gold));
    transform:translateX(2px);
  }

  /* Badge strip — facility chips (Gratis Ongkir, Promo XTRA, dll) */
  .ace-buy-badges{
    display:flex;flex-wrap:wrap;gap:6px;
    padding:8px 14px 10px;
    background:rgba(0,0,0,.18);
    border-top:1px solid rgba(255,255,255,.05);
  }
  /* !important + max-width override the global img{max-width:100%;display:block}
   * rule which would otherwise stretch each badge to its natural size. Sized
   * so 3 badges (264×88, 3:1 aspect) fit on one row inside the popup. */
  .ace-buy-modal .ace-buy-badge{
    height:26px !important;
    width:auto !important;
    max-width:none !important;
    display:inline-block !important;
    border-radius:4px;
    flex-shrink:0;
    vertical-align:middle;
  }

  /* "atau" divider before Lanjut via Web */
  .ace-buy-divider{
    display:flex;align-items:center;gap:10px;
    margin:6px 0 2px;
    color:var(--text-dim);
    font-size:11px;font-weight:700;
    text-transform:uppercase;letter-spacing:1px;
  }
  .ace-buy-divider::before,
  .ace-buy-divider::after{
    content:'';flex:1;height:1px;background:var(--bg-3);
  }

  /* Lanjut via Web — gold-tinted item to set it apart from marketplace rows.
   * Style the wrapper so the bg + border match the new card layout. */
  .ace-buy-item-web{
    background:rgba(212,175,55,.08);
    border-color:rgba(212,175,55,.3);
  }
  .ace-buy-item-web:hover{
    background:rgba(212,175,55,.15);
    border-color:var(--gold);
  }
  .ace-buy-web .ace-buy-platform{color:var(--gold)}

  /* Desktop: center the modal panel instead of bottom-sheet */
  @media (min-width: 768px) {
    .ace-buy-modal{
      align-items:center;
      padding:20px;
    }
    .ace-buy-modal-panel{
      border-radius:18px;
      max-width:420px;
      animation-name:aceBuyInDesktop;
    }
    @keyframes aceBuyInDesktop{
      from{opacity:0;transform:translateY(20px) scale(.96)}
      to{opacity:1;transform:translateY(0) scale(1)}
    }
  }

  /* ============== SHARE MODAL ============== */
  .ace-share-modal{
    position:fixed;inset:0;z-index:300;
    display:flex;align-items:flex-end;justify-content:center;
    padding:0;
  }
  .ace-share-modal[hidden]{display:none}
  .ace-share-backdrop{
    position:absolute;inset:0;
    background:rgba(0,0,0,.65);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
  }
  .ace-share-panel{
    position:relative;
    background:linear-gradient(180deg, #1a1a1a 0%, var(--bg-2) 100%);
    border:1px solid var(--bg-3);
    border-radius:20px 20px 0 0;
    padding:18px 18px 22px;
    width:100%;max-width:440px;
    max-height:85vh;overflow-y:auto;
    box-shadow:0 -10px 40px rgba(0,0,0,.5);
    animation:aceShareIn .22s cubic-bezier(.32,.72,.36,1.04);
  }
  @keyframes aceShareIn{
    from{transform:translateY(100%)}
    to{transform:translateY(0)}
  }
  .ace-share-head{
    display:flex;align-items:center;justify-content:space-between;
    margin:0 0 8px;
  }
  .ace-share-title{
    font-size:17px;font-weight:800;color:#fff;
    margin:0;letter-spacing:-.2px;
  }
  .ace-share-close{
    width:34px;height:34px;border-radius:50%;
    background:var(--bg-3);border:none;
    color:var(--text-dim);
    cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .15s, color .15s;
  }
  .ace-share-close:hover{background:#3a3a3a;color:#fff}
  .ace-share-product{
    font-size:13px;
    color:var(--text-dim);
    margin:0 0 14px;
    line-height:1.4;
    overflow:hidden;
    text-overflow:ellipsis;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }

  /* Copy-link row */
  .ace-share-link-row{
    display:flex;
    gap:8px;
    margin-bottom:18px;
  }
  .ace-share-link-input{
    flex:1;min-width:0;
    background:var(--bg);
    border:1px solid var(--bg-3);
    border-radius:8px;
    padding:10px 12px;
    color:#fff;
    font-size:12px;
    font-family:inherit;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ace-share-link-input:focus{
    outline:none;
    border-color:var(--gold);
  }
  .ace-share-copy-btn{
    flex-shrink:0;
    background:var(--gold);
    color:#0a0a0a;
    border:none;
    border-radius:8px;
    padding:10px 14px;
    font-size:12px;font-weight:700;
    cursor:pointer;
    display:inline-flex;align-items:center;gap:6px;
    transition:filter .15s, background .15s;
  }
  .ace-share-copy-btn:hover{filter:brightness(1.1)}
  .ace-share-copy-btn.is-copied{
    background:#22c55e;
  }

  /* Divider */
  .ace-share-divider{
    text-align:center;
    margin:14px 0 12px;
    position:relative;
    color:var(--text-dim);
    font-size:10px;
    font-weight:700;
    letter-spacing:1.2px;
  }
  .ace-share-divider::before,
  .ace-share-divider::after{
    content:"";
    position:absolute;
    top:50%;
    width:30%;
    height:1px;
    background:var(--bg-3);
  }
  .ace-share-divider::before{left:0}
  .ace-share-divider::after{right:0}

  /* App grid: 3 cols mobile, 6 cols desktop. */
  .ace-share-apps{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
  }
  .ace-share-app{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    padding:8px 4px;
    border-radius:10px;
    background:transparent;
    text-decoration:none;
    color:#fff;
    transition:background .15s, transform .1s;
    cursor:pointer;
  }
  .ace-share-app:hover{ background:var(--bg-3); }
  .ace-share-app:active{ transform:scale(.95); }
  .ace-share-app-ico{
    width:44px;height:44px;
    border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .ace-share-app-name{
    font-size:11.5px;
    font-weight:600;
    color:#cfcfcf;
  }

  /* Desktop: center the modal panel instead of bottom-sheet */
  @media (min-width: 768px) {
    .ace-share-modal{
      align-items:center;
      padding:20px;
    }
    .ace-share-panel{
      border-radius:18px;
      max-width:420px;
      animation-name:aceShareInDesktop;
    }
    @keyframes aceShareInDesktop{
      from{opacity:0;transform:translateY(20px) scale(.96)}
      to{opacity:1;transform:translateY(0) scale(1)}
    }
    .ace-share-apps{
      grid-template-columns:repeat(6, 1fr);
    }
  }

  /* ============== CART PAGE ============== */
  .aceshop-cart-page{padding-bottom:200px} /* clear sticky footer + bottom-nav on mobile */

  .ace-cart-header{
    padding:18px 16px 12px;
    display:flex;align-items:center;gap:10px;
    border-bottom:1px solid var(--bg-3);
  }
  .ace-cart-icon{width:22px;height:22px;stroke:#fff;stroke-width:2;fill:none}
  .ace-cart-header h1{font-size:18px;font-weight:700;color:#fff;margin:0}

  .ace-cart-empty{text-align:center;padding:80px 20px;color:var(--text-dim)}
  .ace-cart-empty-icon{font-size:64px;margin-bottom:16px;opacity:.5}
  .ace-cart-empty h3{color:#fff;font-size:18px;margin-bottom:8px}
  .ace-cart-empty p{font-size:14px}
  .ace-cart-empty-cta{
    display:inline-block;margin-top:24px;
    padding:12px 28px;
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;border-radius:12px;
    text-decoration:none;font-weight:700;font-size:14px;
  }

  /* Custom checkbox */
  .ace-check{
    display:inline-flex;align-items:center;gap:8px;
    cursor:pointer;user-select:none;
    position:relative;
  }
  .ace-check input[type="checkbox"]{
    position:absolute;opacity:0;pointer-events:none;
    width:0;height:0;
  }
  .ace-check-box{
    display:inline-block;
    width:18px;height:18px;
    background:var(--bg-2);
    border:1.5px solid var(--bg-3);
    border-radius:4px;
    position:relative;
    transition:background .15s, border-color .15s;
    flex-shrink:0;
  }
  .ace-check input:checked + .ace-check-box,
  .ace-check input:indeterminate + .ace-check-box{
    background:var(--gold);border-color:var(--gold);
  }
  .ace-check input:checked + .ace-check-box::after{
    content:'';position:absolute;
    left:5px;top:1px;
    width:5px;height:10px;
    border:solid #000;border-width:0 2px 2px 0;
    transform:rotate(45deg);
  }
  .ace-check input:indeterminate + .ace-check-box::after{
    content:'';position:absolute;
    left:3px;top:7px;
    width:10px;height:2px;
    background:#000;
  }

  /* Cart table — header hidden on mobile, shown on desktop */
  .ace-cart-table{padding:14px 16px}
  .ace-cart-head{display:none}

  /* Each row: stacked card on mobile via grid-areas */
  .ace-cart-row{
    display:grid;
    grid-template-columns:24px 64px 1fr auto;
    grid-template-areas:
      "check thumb name action"
      "check thumb price total"
      "check thumb qty   qty";
    gap:6px 12px;
    padding:14px 0;
    border-bottom:1px solid var(--bg-3);
    align-items:start;
  }
  /* Grid placement is scoped to .ace-cart-row only — applying grid-area to
   * children of .ace-cart-head (which has no named areas) makes the browser
   * synthesize implicit areas and the labels end up floating in the wrong
   * place. Visual styling stays unscoped so it covers both header and body. */
  .ace-cart-row > .ace-cart-col-check{grid-area:check;align-self:center}
  .ace-cart-row > .ace-cart-col-thumb{grid-area:thumb}
  .ace-cart-row > .ace-cart-col-name{grid-area:name;min-width:0}
  .ace-cart-row > .ace-cart-col-price{grid-area:price}
  .ace-cart-row > .ace-cart-col-qty{grid-area:qty}
  .ace-cart-row > .ace-cart-col-total{grid-area:total}
  .ace-cart-row > .ace-cart-col-action{grid-area:action;justify-self:end}

  .ace-cart-col-price{font-size:13px;color:var(--gold);font-weight:700}
  .ace-cart-col-qty{font-size:12px;color:var(--text-dim)}
  .ace-cart-col-qty strong{color:#fff}
  .ace-cart-col-total{font-size:12px;color:var(--text-dim);text-align:right}
  .ace-cart-col-total strong{color:var(--gold)}
  .ace-cart-mob-label{color:var(--text-dim);font-weight:400}

  .ace-cart-thumb{
    display:flex;align-items:center;justify-content:center;
    width:64px;height:64px;background:#fff;border-radius:12px;
    overflow:hidden;
  }
  .ace-cart-thumb img{
    max-width:100%;max-height:100%;
    width:auto !important;height:auto !important;
    object-fit:contain;
  }
  .ace-cart-name{
    font-size:13px;font-weight:600;color:#fff;
    text-decoration:none;display:block;
    line-height:1.4;
    overflow:hidden;text-overflow:ellipsis;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  }
  .ace-cart-name:hover{color:var(--gold)}
  .ace-cart-var{
    font-size:11px;color:var(--text-dim);
    margin-top:3px;
  }
  .ace-cart-remove{
    color:var(--danger,#e53935);font-size:12px;
    font-weight:600;text-decoration:none;
  }
  .ace-cart-remove:hover{text-decoration:underline}

  /* Quantity stepper (− / value / +) */
  .ace-qty-stepper{
    display:inline-flex;align-items:center;
    border:1px solid var(--bg-3);
    border-radius:8px;
    background:var(--bg-2);
    overflow:hidden;
    transition:opacity .15s;
  }
  .ace-qty-stepper.busy{opacity:.5;pointer-events:none}
  .ace-qty-btn{
    width:30px;height:30px;
    background:transparent;border:none;
    color:#fff;font-size:16px;font-weight:700;
    cursor:pointer;line-height:1;
    display:flex;align-items:center;justify-content:center;
    transition:background .15s;
  }
  .ace-qty-btn:hover{background:var(--bg-3)}
  .ace-qty-btn:active{background:var(--bg)}
  .ace-qty-value{
    min-width:36px;text-align:center;
    color:#fff;font-size:14px;font-weight:700;
    padding:0 4px;
    border-left:1px solid var(--bg-3);
    border-right:1px solid var(--bg-3);
    line-height:30px;
  }

  /* Footer bar */
  .ace-cart-foot{
    position:fixed;
    bottom:80px;left:0;right:0;
    background:var(--bg-2);
    border-top:1px solid var(--bg-3);
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    z-index:55;
    box-shadow:0 -8px 24px rgba(0,0,0,.4);
    display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;
  }
  .ace-cart-foot-check{flex-shrink:0}
  .ace-cart-foot-check-label{font-size:13px;color:#fff}
  .ace-cart-foot-total{
    flex:1;min-width:0;
    text-align:right;
    display:flex;flex-direction:column;align-items:flex-end;gap:2px;
  }
  .ace-cart-foot-total-label{font-size:12px;color:var(--text-dim)}
  .ace-cart-foot-paren{color:var(--text-dim)}
  .ace-cart-foot-amount{
    color:var(--gold);font-size:18px;font-weight:800;
    line-height:1.1;
  }
  .ace-cart-foot-amount .woocommerce-Price-amount{color:inherit}
  .ace-cart-checkout-btn{
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;border:none;border-radius:12px;
    padding:13px 24px;
    font-weight:800;font-size:14px;
    cursor:pointer;letter-spacing:.3px;
    transition:opacity .2s, transform .15s;
  }
  .ace-cart-checkout-btn:hover{opacity:.92}
  .ace-cart-checkout-btn:active{transform:scale(.98)}
  .ace-cart-checkout-btn:disabled{
    opacity:.4;cursor:not-allowed;
    background:var(--bg-3);color:var(--text-dim);
  }

  /* ============== CART DRAWER ============== */
  .cart-drawer{
    position:fixed;top:0;right:-100%;width:100%;max-width:480px;
    height:100vh;background:var(--bg);
    z-index:200;transition:right .3s;
    display:flex;flex-direction:column;
  }
  .cart-drawer.open{right:50%;transform:translateX(50%)}
  @media(max-width:480px){
    .cart-drawer.open{right:0;transform:none}
  }
  .drawer-header{
    padding:16px;border-bottom:1px solid var(--bg-3);
    display:flex;align-items:center;justify-content:space-between;
    position:sticky;top:0;background:var(--bg);z-index:5;
  }
  .drawer-header h3{font-size:17px;font-weight:700}
  .close-btn{
    width:36px;height:36px;border-radius:50%;
    background:var(--bg-3);
    display:flex;align-items:center;justify-content:center;
    font-size:18px;color:var(--text);
  }
  .cart-items{flex:1;overflow-y:auto;padding:12px 16px}
  .cart-item{
    display:flex;gap:12px;padding:14px 0;
    border-bottom:1px solid var(--bg-3);
  }
  .cart-item-img{
    width:64px;height:64px;background:#fff;border-radius:12px;
    display:flex;align-items:center;justify-content:center;
    font-size:36px;flex-shrink:0;
  }
  .cart-item-info{flex:1;min-width:0}
  .cart-item-name{font-size:13px;font-weight:600;margin-bottom:4px;line-height:1.3}
  .cart-item-price{font-size:13px;color:var(--gold);font-weight:700}
  .qty-controls{display:flex;align-items:center;gap:10px;margin-top:8px}
  .qty-btn{
    width:28px;height:28px;border:1px solid var(--bg-3);border-radius:8px;
    display:flex;align-items:center;justify-content:center;font-size:16px;
    background:var(--bg-2);
  }
  .qty-btn:active{background:var(--gold);color:#000}
  .qty-num{font-size:13px;font-weight:700;min-width:20px;text-align:center}
  .remove-btn{color:var(--danger);font-size:11px;margin-left:auto;font-weight:600}
  .empty-state{
    text-align:center;padding:60px 20px;color:var(--text-dim);
  }
  .empty-state-icon{font-size:64px;margin-bottom:16px;opacity:.4}
  .empty-state h4{color:#fff;font-size:16px;margin-bottom:6px}
  .cart-footer{
    padding:16px;border-top:1px solid var(--bg-3);background:var(--bg-2);
  }
  .cart-total{
    display:flex;justify-content:space-between;align-items:center;
    margin-bottom:12px;
  }
  .cart-total span{color:var(--text-dim);font-size:13px}
  .cart-total strong{color:var(--gold);font-size:20px;font-weight:800}
  .btn{
    padding:14px 20px;border-radius:12px;font-weight:700;font-size:14px;
    transition:all .2s;display:flex;align-items:center;justify-content:center;gap:8px;
    width:100%;
  }
  .btn-primary{
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;
  }
  .btn-primary:active{transform:scale(.98)}

  /* ============== MODAL ============== */
  .modal-overlay{
    position:fixed;inset:0;background:rgba(0,0,0,.85);
    z-index:300;display:none;align-items:flex-end;justify-content:center;
    backdrop-filter:blur(8px);
  }
  .modal-overlay.open{display:flex;animation:fadeIn .2s}
  @keyframes fadeIn{from{opacity:0}to{opacity:1}}
  .modal{
    background:var(--bg-2);
    border-radius:24px 24px 0 0;
    width:100%;max-width:480px;
    max-height:90vh;overflow-y:auto;
    animation:slideUp .3s;
  }
  @keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
  .modal-handle{
    width:40px;height:4px;background:var(--bg-3);
    border-radius:50px;margin:10px auto 0;
  }
  .modal-header{
    padding:14px 16px;display:flex;justify-content:space-between;align-items:center;
    border-bottom:1px solid var(--bg-3);
  }
  .modal-header h3{font-size:17px;font-weight:700}
  .modal-body{padding:16px}
  .form-group{margin-bottom:14px}
  .form-group label{
    display:block;font-size:12px;color:var(--text-dim);
    margin-bottom:6px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;
  }
  .form-group input,.form-group textarea{
    width:100%;padding:12px 14px;background:var(--bg-3);
    border:1px solid var(--bg-3);border-radius:12px;color:#fff;
    font-size:14px;transition:border-color .2s;
  }
  .form-group input:focus,.form-group textarea:focus{
    outline:none;border-color:var(--gold);
  }
  .form-group textarea{min-height:70px;resize:vertical}
  .pay-options{display:grid;gap:8px}
  .pay-option{
    padding:12px;background:var(--bg-3);border:2px solid transparent;
    border-radius:12px;cursor:pointer;
    display:flex;align-items:center;gap:12px;transition:all .2s;
  }
  .pay-option:has(input:checked){border-color:var(--gold);background:rgba(212,175,55,.08)}
  .pay-option input{display:none}
  .pay-icon{font-size:22px;width:32px;text-align:center}
  .pay-info{flex:1}
  .pay-name{font-size:14px;font-weight:700;margin-bottom:2px}
  .pay-desc{font-size:11px;color:var(--text-dim)}
  .order-summary{
    background:var(--bg-3);padding:12px 14px;border-radius:12px;margin-bottom:14px;
  }
  .order-summary h4{font-size:12px;color:var(--gold);margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}
  .order-line{
    display:flex;justify-content:space-between;font-size:12px;
    padding:3px 0;color:var(--text-dim);
  }
  .order-line.total{
    border-top:1px solid var(--line);margin-top:6px;padding-top:8px;
    color:#fff;font-weight:700;font-size:14px;
  }
  .order-line.total strong{color:var(--gold)}


  /* ============== CHECKOUT METHOD CARDS ============== */
  .checkout-section{margin-bottom:18px}
  .checkout-section-title{
    font-size:16px;font-weight:800;color:#fff;
    margin-bottom:10px;
  }
  .order-product-card{
    background:var(--bg-3);border-radius:14px;
    padding:12px;display:flex;gap:12px;align-items:center;
  }
  .order-product-img{
    width:54px;height:54px;border-radius:10px;
    background:#fff;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    font-size:32px;
  }
  .order-product-info{flex:1;min-width:0}
  .order-product-name{
    font-size:13px;font-weight:700;color:#fff;
    margin-bottom:2px;line-height:1.3;
  }
  .order-product-variant{font-size:11px;color:var(--text-dim);margin-bottom:4px}
  .order-product-qty{font-size:12px;color:var(--text-dim);font-weight:600}
  .method-list{display:flex;flex-direction:column;gap:8px}
  .method-card{
    background:var(--bg-3);border:2px solid transparent;
    border-radius:14px;padding:12px;cursor:pointer;
    transition:all .2s;
  }
  .method-card.active{
    border-color:var(--gold);
    background:rgba(212,175,55,.06);
  }
  .method-row{display:flex;align-items:center;gap:12px}
  .method-logo{
    width:40px;height:40px;border-radius:50%;
    background:#fff;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    font-size:22px;font-weight:800;overflow:hidden;
  }
  .method-logo.shopee{background:#ee4d2d;color:#fff}
  .method-logo.tokped{background:#42b549}
  .method-logo.toko{background:#1e88e5;color:#fff}
  .method-info{flex:1;min-width:0}
  .method-name{font-size:14px;font-weight:800;color:#fff;line-height:1.2}
  .method-sub{font-size:11px;color:var(--text-dim);margin-top:2px}
  .method-toggle{
    width:54px;height:28px;border-radius:14px;
    background:var(--bg-2);
    display:flex;align-items:center;justify-content:center;
    color:var(--text-dim);font-size:18px;flex-shrink:0;
  }
  .method-card.active .method-toggle{background:var(--gold);color:#000}
  .method-note{
    font-size:10px;color:var(--text-dim);font-style:italic;
    margin-top:6px;text-align:right;line-height:1.3;
  }
  .method-badges{
    display:flex;flex-wrap:wrap;gap:6px;
    margin-top:8px;padding-top:8px;
    border-top:1px solid rgba(255,255,255,.05);
  }
  .badge-chip{
    padding:5px 10px;border-radius:50px;
    background:var(--bg-2);border:1px solid var(--bg-card);
    font-size:10px;font-weight:700;color:#fff;
    display:inline-flex;align-items:center;gap:4px;
  }
  .badge-chip .p-badge{
    width:14px;height:14px;border-radius:50%;
    background:var(--gold);color:#000;font-size:9px;
    display:inline-flex;align-items:center;justify-content:center;
    margin-left:2px;font-weight:900;
  }
  .checkout-buy-btn{
    position:sticky;bottom:0;
    margin:16px -16px -16px;padding:14px 16px calc(14px + env(safe-area-inset-bottom));
    background:var(--bg-2);
    border-top:1px solid var(--bg-card);
  }
  .pickup-form{display:none;margin-top:12px}
  .pickup-form.show{display:block}


  /* ============== CONFIRM PAGE ============== */
  .confirm-section{
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:14px;padding:14px;margin:0 16px 12px;
  }
  .confirm-section-title{
    font-size:12px;font-weight:800;color:var(--gold);
    letter-spacing:1px;margin-bottom:10px;
  }
  .confirm-product{
    display:flex;gap:10px;padding:8px 0;
    border-bottom:1px solid var(--bg-3);
  }
  .confirm-product:last-child{border-bottom:none}
  .confirm-product-img{
    width:48px;height:48px;border-radius:10px;
    background:#fff;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    font-size:28px;
  }
  .confirm-product-info{flex:1;min-width:0}
  .confirm-product-name{font-size:13px;font-weight:600;line-height:1.3}
  .confirm-product-meta{font-size:12px;color:var(--text-dim);margin-top:2px}
  .confirm-product-price{font-size:13px;color:var(--gold);font-weight:700;margin-top:2px}
  .confirm-total-row{
    display:flex;justify-content:space-between;
    padding-top:10px;margin-top:6px;
    border-top:1px solid var(--bg-3);
    font-weight:700;
  }
  .confirm-total-row strong{color:var(--gold);font-size:16px}
  .confirm-method-pill{
    display:inline-flex;align-items:center;gap:8px;
    background:rgba(212,175,55,.08);
    border:1px solid var(--gold);
    color:var(--gold);
    padding:8px 14px;border-radius:50px;
    font-size:13px;font-weight:700;
  }
  .confirm-action{
    position:fixed;bottom:0;left:50%;transform:translateX(-50%);
    width:100%;max-width:480px;
    background:var(--bg-2);border-top:1px solid var(--bg-3);
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    z-index:60;
  }


  /* ============== AKUN PAGE ============== */
  .account-page{padding:16px}
  .account-card{
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:14px;padding:14px;margin-bottom:12px;
  }
  .account-card-header{
    display:flex;align-items:center;justify-content:space-between;
    margin-bottom:12px;
  }
  .account-card-title{
    font-size:13px;font-weight:800;color:var(--gold);
    letter-spacing:1px;text-transform:uppercase;
  }
  .account-card-action{
    color:var(--gold);font-size:12px;font-weight:700;
    padding:4px 10px;border-radius:50px;
    background:rgba(212,175,55,.1);
  }
  .profile-avatar{
    width:80px;height:80px;border-radius:50%;
    background:linear-gradient(135deg,var(--gold),var(--gold-2));
    color:#000;font-size:36px;font-weight:900;
    display:flex;align-items:center;justify-content:center;
    margin:0 auto 12px;
    box-shadow:0 6px 20px rgba(212,175,55,.3);
  }
  .profile-name-display{
    text-align:center;font-size:18px;font-weight:800;color:#fff;
    margin-bottom:4px;
  }
  .profile-username-display{
    text-align:center;font-size:13px;color:var(--text-dim);
    margin-bottom:18px;
  }
  .address-item{
    background:var(--bg-3);border:1px solid var(--bg-3);
    border-radius:12px;padding:12px;margin-bottom:8px;
    display:flex;gap:10px;
  }
  .address-item:last-child{margin-bottom:0}
  .address-icon{
    width:36px;height:36px;border-radius:10px;
    background:rgba(212,175,55,.1);
    color:var(--gold);font-size:18px;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
  }
  .address-content{flex:1;min-width:0}
  .address-label{
    display:flex;align-items:center;gap:8px;
    font-size:13px;font-weight:700;color:#fff;
    margin-bottom:4px;
  }
  .address-tag{
    padding:2px 8px;border-radius:50px;
    background:var(--gold);color:#000;
    font-size:10px;font-weight:700;
  }
  .address-recipient{font-size:12px;color:var(--text-dim);margin-bottom:2px}
  .address-text{font-size:12px;color:#d0d0d0;line-height:1.4}
  .address-actions{display:flex;gap:6px;margin-top:8px}
  .address-btn{
    font-size:11px;font-weight:600;padding:5px 10px;
    border-radius:8px;background:var(--bg-2);
    color:#fff;border:1px solid var(--bg-card);
  }
  .address-btn.danger{color:var(--danger);border-color:rgba(231,76,60,.3)}
  .empty-addresses{
    text-align:center;padding:24px 12px;color:var(--text-dim);
    font-size:13px;
  }
  .empty-addresses .icon{font-size:36px;margin-bottom:8px;opacity:.5}
  .add-address-btn{
    width:100%;padding:12px;
    background:var(--bg-3);border:2px dashed var(--bg-card);
    border-radius:12px;color:var(--gold);
    font-size:13px;font-weight:700;
    margin-top:8px;
  }
  .add-address-btn:hover{border-color:var(--gold)}
  .logout-btn{
    width:100%;padding:14px;margin-top:8px;
    background:var(--bg-2);border:1px solid var(--bg-3);
    border-radius:14px;color:var(--danger);
    font-size:14px;font-weight:700;
  }

  /* ============== TOAST ============== */
  .toast{
    position:fixed;bottom:110px;left:50%;
    transform:translateX(-50%) translateY(20px);
    background:#1a1a1a;color:#fff;padding:12px 20px;
    border-radius:50px;border:1px solid var(--gold);
    box-shadow:var(--shadow);z-index:400;
    transition:opacity .3s, transform .3s, visibility .3s;
    font-size:13px;font-weight:600;
    max-width:90%;
    opacity:0;visibility:hidden;pointer-events:none;
    text-align:center;
  }
  .toast.show{
    transform:translateX(-50%) translateY(0);
    opacity:1;visibility:visible;
  }
  .toast.error{
    border-color:var(--danger);
    background:#1a0e0e;
    color:#ffd6d4;
  }

  /* ============== ACCOUNT/ORDERS PAGES ============== */
  .placeholder-page{
    text-align:center;padding:80px 20px;color:var(--text-dim);
  }
  .placeholder-page .icon{font-size:72px;margin-bottom:16px;opacity:.5}
  .placeholder-page h3{color:#fff;font-size:18px;margin-bottom:8px}
  .placeholder-page p{font-size:13px}

  /* ============== DESKTOP FRAME ============== */
  @media (min-width:481px){
    body{
      box-shadow:0 0 60px rgba(0,0,0,.5);
      min-height:100vh;
      border-left:1px solid var(--bg-3);
      border-right:1px solid var(--bg-3);
    }
  }

  /* Hide scrollbar */
  ::-webkit-scrollbar{width:0;background:transparent}

/* ============== WORDPRESS / WOOCOMMERCE OVERRIDES ============== */
.admin-bar .top-header{top:32px}
@media (max-width:782px){
  .admin-bar .top-header{top:46px}
}

/* Hide WooCommerce default page title (we use custom) */
.woocommerce-products-header__title.page-title,
.woocommerce-page .entry-title{display:none}

/* Override WooCommerce default product list — force grid + left alignment
   regardless of WC's .columns-N class which can otherwise apply width:48% etc. */
.woocommerce ul.products,
.woocommerce ul.products.columns-1,
.woocommerce ul.products.columns-2,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4,
.woocommerce ul.products.columns-5,
.woocommerce ul.products.columns-6{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 16px;
  margin:0 !important;
  list-style:none;
  justify-content:start !important;
  /* Pack items into earliest available cell. WC + some plugins
   * (YITH filter widget, WC Subscriptions, AJAX shop filters)
   * inject zero-height <li> elements before the first product
   * to hold loop state. Without dense, those invisible items
   * occupy cell 1 and push the first real product into cell 2
   * — visible bug on /product-category/* and /shop/ on mobile. */
  grid-auto-flow:dense !important;
}
/* Belt-and-suspenders: hide any non-product child the WC loop
 * dropped in (filter <li>, woocommerce_loop_add_to_cart helpers
 * rendered outside .product, etc.) so they can't claim a cell. */
.woocommerce ul.products > li:not(.product),
.woocommerce ul.products > li:empty {
  display:none !important;
}
/* Force the first VISIBLE product to start in column 1. Works
 * even if some invisible non-product element somehow slipped past
 * the rule above (defense in depth). */
.woocommerce ul.products > li.product:first-of-type {
  grid-column-start:1 !important;
}
/* Match WC default specificity (.columns-N adds an extra class selector,
   so we add it too) — otherwise WC's width:48% / margin:3.8% wins. */
.woocommerce ul.products li.product,
.woocommerce ul.products.columns-1 li.product,
.woocommerce ul.products.columns-2 li.product,
.woocommerce ul.products.columns-3 li.product,
.woocommerce ul.products.columns-4 li.product,
.woocommerce ul.products.columns-5 li.product,
.woocommerce ul.products.columns-6 li.product,
.woocommerce-page ul.products.columns-2 li.product,
.woocommerce-page ul.products.columns-3 li.product,
.woocommerce-page ul.products.columns-4 li.product{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:var(--radius);
  overflow:hidden;
  margin:0 !important;
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
  float:none !important;
  flex:none !important;
  justify-self:stretch !important;
}

/* ============== HOMEPAGE RECENT PRODUCTS (custom loop, avoids WC CSS) ============== */
/* iOS Safari grid layout fix — see .cat-grid comment for the
 * rationale. Product cards contain WC-generated <img> tags with
 * intrinsic width/height attributes (woocommerce_thumbnail is
 * 300×300 by default), which iOS Safari can compute as the
 * min-content width of the grid cell, expanding the 1fr columns
 * past their nominal half-share. min-width:0 on cards forces
 * Safari to honor the 1fr split. width:100% + box-sizing on the
 * grid prevents the padding from being added on top of the
 * computed width. */
.ace-products{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 16px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.ace-products > * {
  min-width: 0;
  max-width: 100%;
}
.ace-product-card{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;flex-direction:column;
  text-decoration:none;color:inherit;
  transition:transform .2s, border-color .2s;
}
.ace-product-card:active{transform:scale(.98);border-color:var(--gold)}
.ace-product-img{
  position:relative;background:#fff;
  aspect-ratio:1;
  display:flex;align-items:center;justify-content:center;
  padding:14px;
  /* Defensive: clip any image that overflows the box (iOS Safari
   * sometimes renders an <img> with intrinsic width="300" attr
   * at its raw size briefly before object-fit kicks in, causing
   * a flash of overflow). */
  overflow:hidden;
}
/* iOS Safari image centering — explicit object-position prevents
 * the image from being right-shifted within its container. WC's
 * get_image() output includes width="300" height="300" HTML
 * attributes; without explicit object-position:center, some iOS
 * Safari versions compute the image's "natural" position based on
 * those attrs and offset it inside the flex container.
 *
 * margin:auto + block display ensures the flex parent treats the
 * image as a centered block, not an inline element shifted by
 * font baseline whitespace (iOS Safari adds ~3-4px of phantom
 * baseline space below inline images in flex containers, which
 * doesn't apply to block images). */
.ace-product-img img{
  width:100%;height:100%;
  object-fit:contain;
  object-position:center center;
  margin:0 auto !important;
  display:block;
  /* Reset any WC-injected positioning. */
  position:static;
  left:auto;right:auto;top:auto;bottom:auto;
  transform:none;
}
.ace-product-info{padding:10px 12px 12px}
.ace-product-name{
  font-size:13px;font-weight:600;color:#fff;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:38px;
}
.ace-product-price{
  color:var(--gold);font-size:15px;font-weight:800;
  margin-top:6px;
}

/* Rating + sales-count meta row — shown under the price on
 * homepage Ready Stok, Semua Produk, shop archive, and search
 * results. Sales always renders (even "0 terjual") so card shape
 * stays consistent; rating only renders when > 0 so empty stars
 * don't look broken. */
.ace-product-meta{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  margin-top:6px;font-size:11px;color:#888;line-height:1.2;
}
.ace-product-rating{display:inline-flex;align-items:center;gap:3px}
.ace-stars{
  position:relative;display:inline-block;
  font-size:13px;letter-spacing:1.5px;line-height:1;
  height:1em;
}
.ace-stars-bg{
  color:rgba(212,175,55,0.25);
}
.ace-stars-fg{
  position:absolute;top:0;left:0;
  color:#d4af37;overflow:hidden;white-space:nowrap;
  text-shadow:0 0 3px rgba(212,175,55,0.4);
}
.ace-product-rating-num{
  color:#d4af37;font-weight:800;font-size:11px;
}
.ace-product-reviews{color:#666;font-size:10px}
.ace-product-meta-sep{color:#444;font-size:11px;margin:0 2px}
.ace-product-sales{color:#aaa;font-weight:500;font-size:11px}

/* Mirror onto the WC native loop card too (related/upsells use
 * .product-info / .product-price). */
.product-info .ace-product-meta{margin-top:4px}
.ace-product-img .product-badge{
  position:absolute;top:8px;left:8px;
  /* Bright red so SALE stands out from the gold theme + isn't
   * confused with the GARANSI RESMI pill. Higher z-index than
   * the gold corner triangle (which lives at z-index:3) so the
   * badge always sits on top if both are present. */
  background:linear-gradient(135deg,#ff4757,#e02020);
  color:#fff;
  font-size:10px;font-weight:900;padding:3px 9px;border-radius:6px;
  text-shadow:0 1px 1px rgba(0,0,0,0.3);
  box-shadow:0 2px 6px rgba(229,32,32,0.45);
  letter-spacing:0.4px;
  z-index:5;
}
/* Hide the gold corner triangle when the SALE badge is present
 * on the same card. The triangle's diagonal cut overlaps the
 * top-left badge area and clips the "S" of "SALE" — :has() lets
 * us scope this without adding a class via PHP. */
.ace-product-card:has(.ace-product-img .product-badge)::before,
a.product:has(.product-img .product-badge)::before{
  display:none;
}

/* Suppress the WC strikethrough <del> that normally wraps the
 * original regular price on sale products. The PHP filter strips
 * it too, but cart line items and mini-cart sometimes compose
 * price HTML through paths that bypass the filter, so this CSS
 * is the safety net.
 *
 * NB: <ins> CONTAINS the sale price (the one we want to keep
 * visible), so we don't hide it — we just kill the default
 * browser underline styling. */
.ace-product-price del,
.product-price del,
.product-detail-price del,
.woocommerce-Price-amount del,
.wc-block-components-product-price del,
.wc-block-cart-items del{
  display:none !important;
}
/* Remove the browser-default underline on <ins> tags that WC
 * wraps the sale price in, so the price reads cleanly. */
.ace-product-price ins,
.product-price ins,
.product-detail-price ins,
.woocommerce-Price-amount ins,
.wc-block-components-product-price ins,
.wc-block-cart-items ins,
.price ins{
  text-decoration: none !important;
  background: transparent !important;
}

/* ============================================================
 * Push notification subscribe modal
 *
 * Centered overlay with backdrop. Injected by
 * assets/push-subscribe.js when the user hasn't yet subscribed
 * AND the dismiss-until timestamp is in the past. Pops up on
 * every page load (or until user clicks "Tutup" with the "Jangan
 * tampilkan lagi hari ini" checkbox checked → suppresses until
 * local midnight tonight).
 * ============================================================ */
.aceshop-push-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.75);
  z-index:2147483640;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:aceshop-push-modal-fade .22s ease-out;
  -webkit-tap-highlight-color:transparent;
}
.aceshop-push-modal-overlay.is-leaving{
  animation:aceshop-push-modal-fade-out .2s ease-in forwards;
}
.aceshop-push-modal-card{
  background:#1a1a1a;
  border:1.5px solid rgba(212,175,55,0.4);
  border-radius:16px;
  padding:28px 24px 20px;
  max-width:380px;
  width:100%;
  text-align:center;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    0 0 30px rgba(212,175,55,0.18);
  color:#fff;
  font-family:inherit;
  animation:aceshop-push-modal-pop .24s ease-out;
}
.aceshop-push-modal-icon{
  font-size:42px;
  line-height:1;
  margin-bottom:10px;
}
.aceshop-push-modal-title{
  font-size:18px;
  font-weight:800;
  color:var(--gold, #d4af37);
  margin:0 0 10px;
  letter-spacing:0.2px;
}
.aceshop-push-modal-body{
  font-size:13.5px;
  line-height:1.55;
  color:#bbb;
  margin:0 0 14px;
}
.aceshop-push-modal-check{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:12.5px;
  color:#888;
  cursor:pointer;
  user-select:none;
  margin-bottom:18px;
}
.aceshop-push-modal-check input{
  accent-color:var(--gold, #d4af37);
  width:14px;height:14px;
  cursor:pointer;
}
.aceshop-push-modal-actions{
  display:flex;
  gap:8px;
}
.aceshop-push-modal-actions button{
  flex:1;
  font:inherit;
  padding:11px 16px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-size:14px;
  font-weight:800;
  transition:transform .12s, background .15s;
}
.aceshop-push-modal-deny{
  background:#2a2a2a;
  color:#bbb;
}
.aceshop-push-modal-deny:hover{ background:#333; color:#fff; }
.aceshop-push-modal-allow{
  background:linear-gradient(135deg, var(--gold, #d4af37), #b08820);
  color:#000;
}
.aceshop-push-modal-allow:hover{ transform:translateY(-1px); }
.aceshop-push-modal-allow:active{ transform:scale(.97); }

/* Lock the page scroll while modal is open. */
body.aceshop-push-modal-locked{ overflow:hidden; }

/* ============================================================
 * "Notifikasi" card on the My Account page
 *
 * Two states, swapped by push-subscribe.js:
 *
 *   Default (not subscribed)
 *     - Gold border, bell emoji, "Aktifkan notifikasi pesanan"
 *     - Click → open subscribe modal
 *
 *   .is-subscribed
 *     - Green border, animated checkmark icon, "Notifikasi sudah
 *       aktif", chevron stays so the user knows it's still
 *       interactive (clicking opens the unsubscribe confirmation)
 *     - Description copy below also swaps
 * ============================================================ */
.ace-notif-card-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:var(--bg-2);
  border:1px solid rgba(212,175,55,0.35);
  border-radius:14px;
  padding:16px 18px;
  margin-bottom:14px;
  text-decoration:none;
  color:inherit;
  transition:border-color .15s, background .15s;
}
.ace-notif-card-link:hover{ border-color:rgba(212,175,55,0.6) }
.ace-notif-row{ display:flex;align-items:center;gap:12px;min-width:0 }
.ace-notif-icon{
  width:42px;height:42px;flex:0 0 42px;
  border-radius:12px;
  background:linear-gradient(135deg,rgba(212,175,55,0.18),rgba(212,175,55,0.05));
  display:flex;align-items:center;justify-content:center;
  color:var(--gold);font-size:22px;
  transition:background .25s, color .25s;
}
.ace-notif-icon-default{ display:block }
.ace-notif-icon-check  { display:none }
.ace-notif-text{ min-width:0 }
.ace-notif-eyebrow{
  font-size:11px;letter-spacing:1px;text-transform:uppercase;
  color:var(--text-dim);font-weight:700;
}
.ace-notif-label{
  font-size:14px;font-weight:700;color:#fff;margin-top:2px;
}
.ace-notif-chevron{ color:var(--gold);font-size:18px }
.ace-notif-desc{
  font-size:11px;color:var(--text-dim);
  margin:-8px 4px 14px;line-height:1.55;
}

/* Subscribed state — green tint, animated check */
.ace-notif-card-link.is-subscribed{
  border-color:rgba(127,219,154,0.55);
}
.ace-notif-card-link.is-subscribed:hover{
  border-color:rgba(127,219,154,0.85);
}
.ace-notif-card-link.is-subscribed .ace-notif-icon{
  background:linear-gradient(135deg,rgba(127,219,154,0.20),rgba(127,219,154,0.06));
  color:#7fdb9a;
}
.ace-notif-card-link.is-subscribed .ace-notif-icon-default{ display:none }
.ace-notif-card-link.is-subscribed .ace-notif-icon-check  {
  display:block;
  animation:aceshop-notif-check-in .35s ease-out;
}
.ace-notif-card-link.is-subscribed .ace-notif-chevron{ color:#7fdb9a }
@keyframes aceshop-notif-check-in{
  from{ transform:scale(0); opacity:0; }
  60% { transform:scale(1.2); opacity:1; }
  to  { transform:scale(1); opacity:1; }
}

/* ============================================================
 * Unsubscribe confirmation modal — reuses the .aceshop-push-modal
 * overlay shell, but with red Matikan accent for destructive
 * intent. Loading + success states mirror the subscribe modal.
 * ============================================================ */
.aceshop-push-modal-card.is-danger{
  border-color:rgba(255,87,87,0.55);
}
.aceshop-push-modal-card.is-danger .aceshop-push-modal-title{
  color:#ff6b6b;
}
.aceshop-push-modal-disable{
  background:linear-gradient(135deg,#ff4757,#e02020) !important;
  color:#fff !important;
}
.aceshop-push-modal-disable:hover{ transform:translateY(-1px) }
.aceshop-push-modal-disable:active{ transform:scale(.97) }

/* Helper note inside the unsubscribe-success modal that explains
 * why the browser's own notification permission still reads as
 * "active" after we've removed the subscription server-side.
 * Distinct visual from the body copy — a softer info box, not
 * mistaken for the headline. */
.aceshop-push-perm-hint{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:12px 14px;
  margin-top:14px;
  text-align:left;
}
.aceshop-push-perm-hint-title{
  font-size:12px;font-weight:700;color:#bbb;
  margin-bottom:6px;
  display:flex;align-items:center;gap:6px;
}
.aceshop-push-perm-hint-body{
  font-size:11.5px;line-height:1.5;color:#888;
  margin:0;
}
.aceshop-push-perm-hint-body em{
  color:#ddd;font-style:normal;font-weight:600;
}

/* Loading state — small spinner inside the Aktifkan button. The
 * card itself dims slightly so the click feels processed. */
.aceshop-push-modal-card.is-loading{
  opacity:0.92;
}
.aceshop-push-modal-card.is-loading button{
  cursor:wait;
}
.aceshop-push-spinner{
  display:inline-block;
  width:14px;height:14px;
  border:2px solid rgba(0,0,0,0.25);
  border-top-color:#000;
  border-radius:50%;
  animation:aceshop-push-spin .7s linear infinite;
  vertical-align:middle;
  margin-right:8px;
}
.aceshop-push-allow-text{ vertical-align:middle }
@keyframes aceshop-push-spin{
  to { transform:rotate(360deg); }
}

/* Success state — card briefly turns green-bordered, checkmark
 * SVG draws itself with a circle that strokes around then a
 * check that strokes through. Pulled inspiration from the
 * "iCheckMark" pattern; entirely CSS-animated SVG, no GIF. */
.aceshop-push-modal-card.is-success{
  border-color:rgba(127,219,154,0.55);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    0 0 30px rgba(127,219,154,0.22);
}
.aceshop-push-modal-card.is-success .aceshop-push-modal-title{
  color:#7fdb9a;
}
.aceshop-push-success-icon{
  display:flex;
  justify-content:center;
  margin-bottom:10px;
}
.aceshop-push-success-icon svg{
  display:block;
}
.aceshop-push-success-circle{
  stroke:#7fdb9a;
  stroke-dasharray:166;
  stroke-dashoffset:166;
  animation:aceshop-push-circle-draw .55s ease-out forwards;
}
.aceshop-push-success-check{
  stroke:#7fdb9a;
  stroke-dasharray:60;
  stroke-dashoffset:60;
  animation:aceshop-push-check-draw .35s .45s ease-out forwards;
}
@keyframes aceshop-push-circle-draw{
  to { stroke-dashoffset:0; }
}
@keyframes aceshop-push-check-draw{
  to { stroke-dashoffset:0; }
}

/* Error state — small red helper text under the body copy. */
.aceshop-push-modal-error{
  color:#ff6b6b;
  font-size:12px;
  margin:-8px 0 14px;
  text-align:center;
}

@media (prefers-reduced-motion: reduce){
  .aceshop-push-spinner,
  .aceshop-push-success-circle,
  .aceshop-push-success-check{ animation:none !important; }
  .aceshop-push-success-circle{ stroke-dashoffset:0 !important; }
  .aceshop-push-success-check { stroke-dashoffset:0 !important; }
}

@keyframes aceshop-push-modal-fade{
  from{ opacity:0; }
  to  { opacity:1; }
}
@keyframes aceshop-push-modal-fade-out{
  from{ opacity:1; }
  to  { opacity:0; }
}
@keyframes aceshop-push-modal-pop{
  from{ transform:scale(.92); opacity:0; }
  to  { transform:scale(1);   opacity:1; }
}

@media (prefers-reduced-motion: reduce){
  .aceshop-push-modal-overlay,
  .aceshop-push-modal-card,
  .aceshop-push-modal-overlay.is-leaving{ animation:none !important; }
}

/* ============================================================
 * Three-line price stack on checkout / cart line items.
 *
 * Replaces WC Blocks' messy double-rendering (it draws the
 * sale prices both in the main price column AND a secondary
 * unit-price line, plus its own "Hemat" pill — three competing
 * elements per row). Our stack consolidates everything into
 * one clean column:
 *
 *     Harga Normal   ─── Rp 1.599.000  ← struck through, dim
 *     Hemat          ─── Rp 124.000 [-8%]  ← red callout
 *     Harga Promo    ─── Rp 1.475.000  ← bold gold (final)
 *
 * Injected by assets/checkout-savings.js for on-sale rows
 * only. Non-sale rows keep WC's default rendering.
 * ============================================================ */
.ace-price-stack{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-top:4px;
  min-width:160px;
  animation:ace-price-stack-in .35s ease-out;
}
.ace-price-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  font-size:12px;
  line-height:1.25;
}
.ace-price-label{
  color:#888;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.2px;
  flex:0 0 auto;
  white-space:nowrap;
}
.ace-price-value{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  text-align:right;
  white-space:nowrap;
}

/* Row 1: struck-through normal price, muted */
.ace-price-row.is-regular .ace-price-value del{
  color:#888;
  text-decoration:line-through;
  font-weight:600;
  font-size:12px;
}

/* Row 2: savings — red marketplace-style callout */
.ace-price-row.is-savings{
  /* Slightly tighter top/bottom rhythm so the red row reads
   * as a single block with the value chip. */
  align-items:center;
}
.ace-price-row.is-savings .ace-price-savings-amount{
  display:inline-block;
  padding:3px 9px 3px 9px;
  background:linear-gradient(135deg, #ff4757 0%, #e02020 60%, #c01010 100%);
  color:#fff;
  font-size:11.5px;
  font-weight:900;
  border-radius:6px 0 0 6px;
  letter-spacing:0.25px;
  text-shadow:0 1px 1px rgba(0,0,0,0.3);
  box-shadow:0 2px 6px rgba(229,32,32,0.32);
}
.ace-price-row.is-savings .ace-price-savings-pct{
  display:inline-block;
  padding:3px 8px 3px 7px;
  background:#b81010;
  color:#fff;
  font-size:10.5px;
  font-weight:900;
  border-radius:0 6px 6px 0;
  letter-spacing:0.3px;
  margin-left:-1px;
  box-shadow:0 2px 6px rgba(180,16,16,0.28);
}

/* Row 3: final promo price — bold gold, the headline value */
.ace-price-row.is-final{
  padding-top:3px;
  border-top:1px dashed rgba(212,175,55,0.18);
}
.ace-price-row.is-final .ace-price-label{
  color:var(--gold, #d4af37);
  font-weight:800;
  font-size:11.5px;
  text-transform:uppercase;
  letter-spacing:0.6px;
}
.ace-price-row.is-final .ace-price-value{
  color:var(--gold, #d4af37);
  font-weight:900;
  font-size:14px;
}

@keyframes ace-price-stack-in{
  from{ opacity:0; transform:translateY(2px); }
  to  { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .ace-price-stack{ animation:none !important; }
}

/* Mobile — slightly smaller for portrait phones, same structure. */
@media (max-width: 480px){
  .ace-price-stack{ min-width:140px; gap:4px }
  .ace-price-label{ font-size:10.5px }
  .ace-price-row{ font-size:11.5px }
  .ace-price-row.is-final .ace-price-value{ font-size:13px }
  .ace-price-row.is-savings .ace-price-savings-amount,
  .ace-price-row.is-savings .ace-price-savings-pct{ font-size:10.5px; padding:2.5px 7px }
}

/* Hide WC Blocks' native savings text everywhere (defense in
 * depth — JS already display:none's these inline; this catches
 * any variant the script's selector list missed). */
.wc-block-components-product-price__savings,
.wc-block-components-product-metadata__discount,
.wc-block-components-cart-item-description--discount,
.wc-block-components-formatted-money-amount.is-discount{
  display:none !important;
}

/* When a row has our injected .ace-price-stack, kill the WC-
 * native total-price column on the right (which is what was
 * still showing "Hemat Rp 124.000" floating in the top-right
 * corner) plus the secondary unit-price line. :has() shipped
 * in Chrome 105 / Safari 15.4 / Firefox 121 — covers every
 * browser that can run modern push notifications anyway. */
.wc-block-components-order-summary-item:has(.ace-price-stack) .wc-block-components-order-summary-item__total-price,
.wc-block-components-order-summary-item:has(.ace-price-stack) .wc-block-components-order-summary-item__individual-prices,
.wc-block-cart-items__row:has(.ace-price-stack) .wc-block-cart-item__price,
.wc-block-cart-items__row:has(.ace-price-stack) .wc-block-cart-item__total .wc-block-components-product-price{
  display:none !important;
}

/* Auto-computed discount-percentage badge ("-25%") appended to
 * every WC price rendered via get_price_html(). Sits inline to
 * the right of the price so it reads as "Rp 1.500.000 -25%" on
 * cards, detail pages, cart line items, mini-cart, anywhere.
 *
 * Inline-block + vertical-align middle so multi-line price
 * ranges ("Rp 8.750.000 – Rp 9.000.000") still align the badge
 * with the bottom-most price line. */
.ace-discount-badge{
  display:inline-block;
  vertical-align:middle;
  margin-left:8px;
  padding:2px 8px;
  background:linear-gradient(135deg, #ff4757 0%, #e02020 100%);
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:0.3px;
  border-radius:6px;
  line-height:1.5;
  box-shadow:
    0 2px 6px rgba(229, 32, 32, 0.4),
    0 0 0 1px rgba(255,100,100,0.5) inset;
  text-shadow:0 1px 1px rgba(0,0,0,0.3);
  white-space:nowrap;
}
/* On compact contexts (product card prices) the badge should not
 * push the price wrap to a new line — let WC's price element
 * grow naturally. */
.ace-product-price .ace-discount-badge,
.product-price .ace-discount-badge{
  font-size:10.5px;
  padding:2px 7px;
}
/* Single-product detail page — slightly larger so it reads at
 * the same weight as the headline price. */
.product-detail-price .ace-discount-badge,
.woocommerce-product-details__price .ace-discount-badge{
  font-size:13px;
  padding:3px 10px;
  margin-left:10px;
}

/* ================================================================
 * TERLARIS + BARU highlights
 *
 * .is-terlaris card root → gold/diamond shimmering frame + soft gold
 * halo ambient glow. Only the top-3 best-sellers (by combined manual +
 * native sales) get it, so the shine stays exclusive and the buyer
 * eye lands on the proven winners first.
 *
 * .ace-badge-terlaris → red→orange→gold animated flame pill, sits
 * just below the gold triangle on the top-left.
 *
 * .ace-badge-baru → cyan→mint pill for products published in the
 * last 14 days, sits just below the GARANSI RESMI pill on the
 * top-right. Both badges can coexist (a hot brand-new launch).
 * ================================================================ */
/* Uniform solid gold frame on TERLARIS cards — no gradient stops
 * in the static state. The padding-box / border-box layered
 * background trick fills only the 2px transparent border ring
 * with #d4af37 (single solid color). The card interior stays
 * var(--bg-2). */
.ace-product-card.is-terlaris,
a.product.is-terlaris{
  border: 2px solid transparent !important;
  background:
    linear-gradient(var(--bg-2, #141414), var(--bg-2, #141414)) padding-box,
    linear-gradient(#d4af37, #d4af37) border-box !important;
  box-shadow:
    0 0 18px rgba(255,215,0,0.22),
    0 0 38px rgba(255,170,0,0.11),
    0 6px 20px rgba(0,0,0,0.45) !important;
}
.ace-product-card.is-terlaris:hover,
a.product.is-terlaris:hover{
  box-shadow:
    0 0 28px rgba(255,215,0,0.45),
    0 0 56px rgba(255,170,0,0.22),
    0 10px 28px rgba(0,0,0,0.5) !important;
  transform: translateY(-3px);
}

/* Traveling shine comet — single element with elliptical radial-
 * gradient that's NATIVELY thick-middle / thin-ends. Glides along
 * the card's rounded-rectangle perimeter via CSS Motion Path,
 * keeping its long axis tangent to the path so it curves through
 * corners.
 *
 * Why offset-path instead of rotated mask: a uniform mask ring
 * forces uniform line thickness around the entire perimeter.
 * offset-path lets the comet's SHAPE — bright thick middle that
 * tapers to nothing at the ends — define what the user sees,
 * which is exactly what they asked for. */
.ace-shine-comet{
  position: absolute;
  /* Long elliptical body: 120px along the path, 14px across it.
   * The 14px thickness is intentionally a touch wider than the
   * 2px gold border — combined with the blur + drop-shadow halo
   * below, the visible "fat" middle of the line reads as ~20-30px
   * wide while the tails fade to nothing. */
  width: 120px;
  height: 14px;
  /* radial-gradient closest-side ellipse hugs the box's aspect.
   * Bright white core (0-15%) holds full intensity, then ramps
   * through cream → warm gold → transparent at the box edges.
   * The bright core extends the perceived thickness of the line. */
  background: radial-gradient(ellipse closest-side,
    #ffffff                  0%,
    rgba(255,255,255,0.95)  15%,
    rgba(255,250,205,0.85)  30%,
    rgba(255,215,100,0.55)  50%,
    rgba(255,170,0,0.20)    75%,
    transparent            100%);
  border-radius: 50%;
  /* Path: inset by 1px so the comet straddles the inside edge of
   * the 2px gold border. Half the body sits on the gold border
   * (the visible "lit border" effect), half on the card interior
   * adjacent to it (forms the inner glow leak). */
  offset-path: inset(1px round var(--radius, 12px));
  offset-rotate: auto;
  offset-anchor: center;
  offset-distance: 0%;
  animation: ace-shine-comet-run 4.5s linear infinite;
  /* Layered glow: a small blur softens the comet's edges so it
   * doesn't look like a hard pill, then three drop-shadows stack
   * the halo — bright white kernel + soft white mid + warm gold
   * outer wash. This is what makes the visible line read as
   * "tebal dan bersinar" (thick and glowing) rather than a flat
   * 14px ellipse. */
  filter:
    blur(2px)
    drop-shadow(0 0 5px  rgba(255,255,255,0.95))
    drop-shadow(0 0 12px rgba(255,255,255,0.55))
    drop-shadow(0 0 22px rgba(255,200,80,0.55))
    drop-shadow(0 0 36px rgba(255,170,0,0.30));
  /* Screen blend so the comet "burns" through whatever's behind
   * it — the gold border momentarily glows white-hot as the
   * comet passes. */
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 4;
}

@keyframes ace-shine-comet-run{
  to { offset-distance: 100%; }
}

/* TERLARIS pill — sits under the GARANSI RESMI pill on the
 * top-right (shares its slot with .ace-badge-baru; PHP renders
 * only one of the two — TERLARIS wins when both apply). */
.ace-badge-terlaris{
  position:absolute;
  top:36px; right:6px;
  display:inline-flex;align-items:center;gap:3px;
  padding:4px 9px 4px 7px;
  border-radius:7px;
  font-size:10px;font-weight:900;letter-spacing:0.6px;
  background: linear-gradient(135deg,
    #ff3838 0%,
    #ff6b00 35%,
    #ffb300 70%,
    #ffd700 100%);
  background-size: 200% 200%;
  color:#fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  box-shadow:
    0 3px 10px rgba(255,120,0,0.55),
    0 0 0 1px rgba(255,215,0,0.65) inset;
  z-index:5;
  pointer-events:none;
  white-space:nowrap;
  animation: ace-terlaris-flame 2.4s ease-in-out infinite;
}
.ace-badge-terlaris span{font-size:11px;line-height:1}
@keyframes ace-terlaris-flame{
  0%, 100% { background-position: 0% 0%; transform: scale(1) }
  50%      { background-position: 100% 100%; transform: scale(1.05) }
}

/* BARU pill — sits under the GARANSI RESMI pill on the top-right. */
.ace-badge-baru{
  position:absolute;
  top:36px; right:6px;
  display:inline-flex;align-items:center;gap:3px;
  padding:4px 9px 4px 7px;
  border-radius:7px;
  font-size:10px;font-weight:900;letter-spacing:0.6px;
  background: linear-gradient(135deg,
    #00d4ff 0%,
    #00ffa6 60%,
    #7cffb2 100%);
  color:#003322;
  text-shadow: 0 1px 1px rgba(255,255,255,0.35);
  box-shadow:
    0 3px 10px rgba(0,200,255,0.45),
    0 0 0 1px rgba(0,255,180,0.55) inset;
  z-index:5;
  pointer-events:none;
  white-space:nowrap;
  animation: ace-baru-pulse 2.6s ease-in-out infinite;
}
.ace-badge-baru span{font-size:11px;line-height:1}
@keyframes ace-baru-pulse{
  0%, 100% { transform: scale(1);    opacity:1 }
  50%      { transform: scale(1.06); opacity:.92 }
}

/* Mobile — slightly smaller badges so they don't crowd a 480px card.
 * Both badges share the same top-right slot (under GARANSI RESMI). */
@media (max-width: 480px){
  .ace-badge-terlaris,
  .ace-badge-baru{
    font-size:9px;
    padding:3px 7px 3px 6px;
    top:34px;
  }
}

/* Respect reduced-motion users — kill the animations but keep the
 * static gold ring + glow so the highlight still reads. */
@media (prefers-reduced-motion: reduce){
  .ace-product-card.is-terlaris,
  a.product.is-terlaris,
  .ace-shine-comet,
  .ace-badge-terlaris,
  .ace-badge-baru{ animation: none !important }
}

/* ============== DARK PREMIUM PRODUCT IMAGE TEMPLATE ==============
 *
 * Adds a consistent "store-branded" frame around every product
 * card without modifying the actual uploaded image files. Pure
 * CSS overlay using pseudo-elements, so all 200+ products (and
 * any new ones) inherit the same look instantly.
 *
 * Layers per card:
 *   1. Subtle gold border (full card) → glows on hover
 *   2. Diagonal gold corner accent (top-left of card)
 *   3. GARANSI RESMI pill badge (top-right of image)
 *   4. ACE SHOP wordmark watermark (bottom-right of image,
 *      semi-transparent gold so it doesn't fight the product)
 *   5. Inner ring on image area (subtle gold edge so the white
 *      product background reads as "framed" instead of bare)
 *   6. Gold accent line above the info section
 * ================================================================ */

.ace-product-card{
  /* Subtle gold default border + smooth gold halo on hover. */
  border:1.5px solid rgba(212,175,55,.22) !important;
  position:relative;
  transition:transform .2s, border-color .2s, box-shadow .25s;
}
.ace-product-card:hover{
  border-color:var(--gold) !important;
  box-shadow:0 10px 28px rgba(212,175,55,.18), 0 2px 6px rgba(0,0,0,.4);
  transform:translateY(-2px);
}

/* Diagonal gold corner accent — top-left. Pure CSS triangle via
 * a clipped pseudo-element so we get a real diagonal edge. */
.ace-product-card::before{
  content:'';
  position:absolute;top:0;left:0;
  width:46px;height:46px;
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-2,#a08020) 55%, transparent 100%);
  clip-path:polygon(0 0, 100% 0, 0 100%);
  z-index:3;
  pointer-events:none;
  opacity:.95;
}

/* GARANSI RESMI pill — top-right of the image area. Uses
 * pseudo-content so EVERY product gets the badge automatically,
 * with no PHP / template changes. */
.ace-product-img::before{
  content:'GARANSI RESMI';
  position:absolute;
  top:8px;right:8px;
  background:linear-gradient(135deg, var(--gold), #a08020);
  color:#000;
  font-size:9px;font-weight:900;letter-spacing:.6px;
  padding:3px 8px;border-radius:4px;
  z-index:3;
  box-shadow:0 2px 6px rgba(0,0,0,.35);
  text-shadow:0 1px 0 rgba(255,255,255,.18);
  white-space:nowrap;
}

/* ACE SHOP wordmark — bottom-right corner of image, semi-trans
 * gold so it reads as a branded watermark rather than a label.
 * White text-shadow makes it legible against light product bg. */
.ace-product-img::after{
  content:'ACE SHOP';
  position:absolute;
  bottom:6px;right:8px;
  color:rgba(140,100,20,.7);
  font-size:9px;font-weight:900;
  letter-spacing:1.5px;
  z-index:3;
  text-shadow:0 1px 0 rgba(255,255,255,.7);
  pointer-events:none;
}

/* Subtle gold inner ring on the image so the white product bg
 * doesn't look pasted-on against the dark card. */
.ace-product-img{
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.18), inset 0 -1px 0 rgba(212,175,55,.35);
}

/* Gold accent line dividing the image from the info card —
 * extra signal that this is a branded card. */
.ace-product-info{
  position:relative;
}
.ace-product-info::before{
  content:'';
  position:absolute;top:0;left:12%;right:12%;height:1px;
  background:linear-gradient(90deg, transparent 0%, rgba(212,175,55,.55) 50%, transparent 100%);
}

/* Apply the same treatment to WC's native loop markup (used when
 * the theme falls back to default WooCommerce templates). */
.woocommerce ul.products li.product{
  position:relative;
  border:1.5px solid rgba(212,175,55,.22) !important;
  transition:transform .2s, border-color .2s, box-shadow .25s;
}
.woocommerce ul.products li.product:hover{
  border-color:var(--gold) !important;
  box-shadow:0 10px 28px rgba(212,175,55,.18), 0 2px 6px rgba(0,0,0,.4);
  transform:translateY(-2px);
}
.woocommerce ul.products li.product::before{
  content:'';
  position:absolute;top:0;left:0;
  width:46px;height:46px;
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-2,#a08020) 55%, transparent 100%);
  clip-path:polygon(0 0, 100% 0, 0 100%);
  z-index:3;
  pointer-events:none;
  opacity:.95;
}
.woocommerce ul.products li.product::after{
  content:'GARANSI RESMI';
  position:absolute;
  top:8px;right:8px;
  background:linear-gradient(135deg, var(--gold), #a08020);
  color:#000;
  font-size:9px;font-weight:900;letter-spacing:.6px;
  padding:3px 8px;border-radius:4px;
  z-index:3;
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}
.woocommerce ul.products li.product a{display:block;color:inherit;text-decoration:none}
.woocommerce ul.products li.product img{
  margin:0 !important;background:#fff;
  aspect-ratio:1;object-fit:contain;padding:14px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  padding:10px 12px 4px;font-size:13px;font-weight:600;
  color:#fff !important;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:50px;
}
.woocommerce ul.products li.product .price{
  padding:0 12px 8px;
  color:var(--gold) !important;
  font-size:15px;font-weight:800;
}
.woocommerce ul.products li.product .price del{
  color:var(--text-dim);font-size:11px;font-weight:400;
}
.woocommerce ul.products li.product .button{
  margin:0 12px 12px;background:var(--bg-3) !important;
  color:#fff !important;border-radius:8px;font-size:12px !important;
  padding:8px 12px !important;font-weight:600;
}
.woocommerce ul.products li.product .button:hover{
  background:var(--gold) !important;color:#000 !important;
}
.woocommerce span.onsale{
  background:var(--gold) !important;color:#000 !important;
  border-radius:6px;font-size:10px;font-weight:800;
  padding:3px 8px;min-height:0;line-height:1.2;
}

/* Override WooCommerce single product page */
.single-product div.product{padding:0 16px}
.single-product div.product .woocommerce-product-gallery{
  background:#fff;border-radius:var(--radius);overflow:hidden;margin-bottom:14px;
}
.single-product div.product .product_title{
  font-size:22px;font-weight:800;color:#fff;margin-bottom:8px;
}
.single-product div.product .price{
  font-size:20px;font-weight:800;color:var(--gold);margin-bottom:14px;
}
.single-product div.product .stock{
  font-size:14px;color:var(--text-dim);margin-bottom:12px;
}
.single-product div.product .single_add_to_cart_button{
  background:linear-gradient(135deg,var(--gold),var(--gold-2)) !important;
  color:#000 !important;border-radius:12px !important;
  font-weight:800 !important;padding:14px 28px !important;
}
.single-product div.product .quantity .qty{
  background:var(--bg-3);color:#fff;border:1px solid var(--line);
  border-radius:8px;padding:10px;
}

/* WooCommerce notices */
.woocommerce-message,.woocommerce-info,.woocommerce-error{
  background:var(--bg-2);color:#fff;border-color:var(--gold);
  border-radius:12px;padding:14px;margin:0 16px 14px;
}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{color:var(--gold)}

/* Cart & Checkout pages */
.woocommerce-cart .cart_totals,
.woocommerce-checkout .checkout_coupon,
.woocommerce-checkout #order_review{
  background:var(--bg-2);border:1px solid var(--bg-3);
  border-radius:14px;padding:16px;margin:0 16px 14px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select{
  background:var(--bg-3);border:1px solid var(--bg-3);
  color:#fff;border-radius:10px;padding:12px 14px;
}
.woocommerce table.shop_table{
  background:var(--bg-2);border:1px solid var(--bg-3);
  border-radius:12px;overflow:hidden;margin:0 16px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td{color:#fff;border-color:var(--bg-3) !important}

/* ============== CHECKOUT (WC BLOCK CHECKOUT) ============== */
.wp-block-woocommerce-checkout,
.wc-block-checkout{
  color:var(--text);
}
.wc-block-checkout{padding:16px 0}
.wc-block-components-main{padding-right:8px}
.wc-block-components-sidebar{padding-left:8px}

/* Step cards */
.wc-block-components-checkout-step{
  background:var(--bg-2) !important;
  border:1px solid var(--bg-3) !important;
  border-radius:14px !important;
  padding:20px !important;
  margin:0 0 14px !important;
  box-shadow:none !important;
}
.wc-block-components-checkout-step::after{display:none !important}
.wc-block-components-checkout-step__heading{margin-bottom:14px !important}
.wc-block-components-checkout-step__title,
.wp-block-woocommerce-checkout h2,
.wp-block-woocommerce-checkout h3{
  color:#fff !important;
  font-size:16px !important;
  font-weight:700 !important;
  letter-spacing:-.1px;
  margin:0 0 10px !important;
}
.wc-block-components-checkout-step__description,
.wc-block-checkout__guest-checkout-notice{
  color:var(--text-dim) !important;
  font-size:13px !important;
}

/* Inputs / selects / textareas — padding-top is generous so the floating
 * label has room above the value when the field is filled. */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-textarea textarea,
.wc-block-components-combobox-control input,
.wc-block-components-combobox input,
.wc-block-components-form input[type="text"],
.wc-block-components-form input[type="email"],
.wc-block-components-form input[type="tel"],
.wc-block-components-form input[type="number"],
.wc-block-components-form select,
.wc-block-components-form textarea,
.wc-blocks-components-select__select,
.components-form-token-field__input{
  background:var(--bg) !important;
  border:1px solid var(--bg-3) !important;
  color:#fff !important;
  border-radius:10px !important;
  padding:22px 14px 8px !important;
  font-size:14px !important;
  font-family:inherit !important;
  box-shadow:none !important;
  height:auto !important;
  min-height:56px !important;
}
/* Floating label position so it sits in the top space we created above */
.wc-block-components-text-input{position:relative}
.wc-block-components-text-input label{
  position:absolute !important;
  top:18px !important;
  left:14px !important;
  font-size:14px !important;
  color:var(--text-dim) !important;
  pointer-events:none !important;
  transition:transform .15s, color .15s, font-size .15s !important;
  background:transparent !important;
  padding:0 !important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-text-input:focus-within label{
  transform:translateY(-12px) !important;
  font-size:11px !important;
  color:var(--gold) !important;
}
.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus,
.wc-block-components-form input:focus,
.wc-block-components-form select:focus,
.wc-block-components-form textarea:focus{
  border-color:var(--gold) !important;
  outline:none !important;
  box-shadow:0 0 0 1px var(--gold) inset !important;
}

/* Floating labels (WC Blocks pattern) */
.wc-block-components-text-input label,
.wc-block-components-combobox-control label,
.wc-block-components-checkbox label,
.wc-block-components-radio-control label{
  color:var(--text-dim) !important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-text-input:focus-within label{
  color:var(--gold) !important;
}
.wc-block-components-text-input::after{display:none !important}

/* Validation error */
.wc-block-components-validation-error{
  color:#f08080 !important;
  font-size:12px !important;
}

/* Country / state combobox dropdown */
.components-form-token-field__suggestions-list,
.wc-block-components-combobox-control__listbox{
  background:var(--bg-2) !important;
  border:1px solid var(--bg-3) !important;
  color:#fff !important;
}

/* Sidebar / order summary card */
.wp-block-woocommerce-checkout-totals-block,
.wc-block-components-sidebar{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  padding:20px;
}
.wp-block-woocommerce-checkout-order-summary-block{
  background:transparent !important;
  border:none !important;
  padding:0 !important;
}
.wc-block-components-order-summary{padding:0 !important;background:transparent !important}
.wc-block-components-order-summary-item{
  border-bottom:1px solid var(--bg-3) !important;
  padding:12px 0 !important;
}
.wc-block-components-order-summary-item:last-child{border-bottom:none !important}
.wc-block-components-order-summary-item__image img{
  border-radius:8px;background:#fff;
}
.wc-block-components-product-name,
.wc-block-components-order-summary-item__title{
  color:#fff !important;
  font-weight:600 !important;
  font-size:13px !important;
}
.wc-block-components-order-summary-item__quantity{
  background:var(--gold) !important;
  color:#000 !important;
  border:none !important;
  font-weight:700 !important;
}
.wc-block-components-product-metadata,
.wc-block-components-order-summary-item__description,
.wc-block-components-product-details{
  color:var(--text-dim) !important;
  font-size:12px !important;
}

/* Coupon collapsible */
.wc-block-components-totals-coupon,
.wc-block-components-panel{
  background:transparent !important;
  border-top:1px solid var(--bg-3) !important;
  padding:10px 0 !important;
}
.wc-block-components-panel__button,
.wc-block-components-totals-coupon__button{
  color:#fff !important;
  font-size:14px !important;
  font-weight:600 !important;
}
.wc-block-components-totals-coupon__form input{
  background:var(--bg) !important;
  border:1px solid var(--bg-3) !important;
  color:#fff !important;
  border-radius:8px !important;
}

/* Totals lines */
.wc-block-components-totals-item{
  color:#fff !important;
  font-size:14px !important;
  padding:8px 0 !important;
  border-bottom:none !important;
}
.wc-block-components-totals-item__label{
  color:var(--text-dim) !important;
}
.wc-block-components-totals-item__value{
  color:#fff !important;
  font-weight:600 !important;
}
.wc-block-components-totals-footer-item{
  font-size:18px !important;
  font-weight:800 !important;
  border-top:1px solid var(--bg-3) !important;
  padding-top:14px !important;
  margin-top:8px !important;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{
  color:#fff !important;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-formatted-money-amount,
.wc-block-components-totals-footer-item .woocommerce-Price-amount{
  color:var(--gold) !important;
  font-size:22px !important;
}

/* Payment radio cards — match the .ace-slot-shipping option style
 * (custom radio dot, gold border + light gold bg when checked, flex
 * layout with the label group beside the radio). */
.wc-block-components-radio-control__option{
  display:flex !important;
  align-items:flex-start !important;
  gap:12px !important;
  background:var(--bg) !important;
  border:1.5px solid var(--bg-3) !important;
  border-radius:10px !important;
  padding:14px !important;
  margin:0 0 10px !important;
  color:#fff !important;
  position:relative !important;
  cursor:pointer !important;
  transition:border-color .15s, background .15s !important;
}
.wc-block-components-radio-control__option:last-child{margin-bottom:0 !important}
.wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control__option--checked{
  border-color:var(--gold) !important;
  background:rgba(212,175,55,.06) !important;
}

/* Payment-method block specifically: each method ships wrapped in a
 * .wc-block-components-radio-control-accordion-option that holds the
 * radio row AND an expanded content panel (description, Tripay
 * picker, etc.). Default WC Blocks paints that wrapper with light
 * borders/backgrounds, which on the dark theme reads as a "white
 * box" around the option — Pilihan Pengiriman doesn't have this
 * because we built it from custom HTML.
 *
 * Promote the visual card up to the wrapper so the gold selected
 * border encompasses both the radio row and the expanded panel,
 * matching the .ace-ship-opt look exactly. The inner option +
 * accordion-content are then flattened so the wrapper owns the
 * entire frame. */
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option{
  background:var(--bg) !important;
  border:1.5px solid var(--bg-3) !important;
  border-radius:10px !important;
  margin:0 0 10px !important;
  padding:0 !important;
  overflow:hidden !important;
  transition:border-color .15s, background .15s !important;
}
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option:last-child{
  margin-bottom:0 !important;
}
/* Selected wrapper — gold frame around the full panel. Uses :has()
 * (Chrome 105+ / Safari 15.4+ / Firefox 121+) so we don't need a JS
 * shim to mirror the inner option's --checked class up to the
 * parent. Browsers without :has() fall back to the inner option's
 * gold border (kept below) which still flags the selected state. */
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option:has(.wc-block-components-radio-control__option--checked),
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option:has(.wc-block-components-radio-control__option-checked){
  border-color:var(--gold) !important;
  background:rgba(212,175,55,.06) !important;
}
/* Inner option (radio + label row) — wrapper owns the frame now,
 * so strip the inner border/background to avoid nested cards. */
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  margin:0 !important;
}
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option-checked,
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option--checked{
  background:transparent !important;
  border:0 !important;
}
/* Expanded content panel (description / Tripay picker) — sits flush
 * inside the wrapper with no border of its own. */
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-content{
  background:transparent !important;
  border:0 !important;
  padding:0 14px 14px !important;
  margin:0 !important;
}
.wc-block-components-radio-control__input,
.wc-block-components-radio-control__option > input[type="radio"]{
  appearance:none !important;
  -webkit-appearance:none !important;
  position:relative !important;
  margin:2px 0 0 !important;
  width:18px !important;
  height:18px !important;
  border:2px solid var(--bg-3) !important;
  border-radius:50% !important;
  background:transparent !important;
  cursor:pointer !important;
  flex-shrink:0 !important;
  transform:none !important;
  top:auto !important;
  left:auto !important;
}
.wc-block-components-radio-control__input:checked,
.wc-block-components-radio-control__option > input[type="radio"]:checked{
  border-color:var(--gold) !important;
}
.wc-block-components-radio-control__input:checked::after,
.wc-block-components-radio-control__option > input[type="radio"]:checked::after{
  content:'';
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%, -50%);
  width:8px;height:8px;
  border-radius:50%;
  background:var(--gold);
}
.wc-block-components-radio-control__option-layout,
.wc-block-components-radio-control__label-group{
  flex:1 !important;
  min-width:0 !important;
  margin-left:0 !important;
  padding-left:0 !important;
}
.wc-block-components-radio-control__label{
  color:#fff !important;
  font-size:14px !important;
  font-weight:700 !important;
  display:block !important;
  margin-bottom:2px !important;
}
.wc-block-components-radio-control__description{
  color:var(--text-dim) !important;
  font-size:12px !important;
  line-height:1.4 !important;
}

/* Style the payment block as a card matching the other ace-mobile-card
 * slots (dark bg, border, header, padding). */
.wp-block-woocommerce-checkout-payment-block{
  background:var(--bg-2) !important;
  border:1px solid var(--bg-3) !important;
  border-radius:14px !important;
  padding:18px !important;
  margin:0 0 14px !important;
}
.wp-block-woocommerce-checkout-payment-block .wc-block-components-checkout-step__title{
  font-size:15px !important;
  font-weight:700 !important;
  color:#fff !important;
  margin:0 0 12px !important;
}

/* Hide country selector — checkout is locked to Indonesia in functions.php */
.wc-block-components-country-input,
.wc-block-components-address-form__country,
[data-field-key="country"],
[data-fieldname="country"],
.wp-block-woocommerce-checkout-billing-address-block .wc-block-components-combobox:has([id*="country"]){
  display:none !important;
}

/* Place Order button — full width gold */
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.wc-block-components-checkout-place-order-button{
  background:linear-gradient(135deg, var(--gold), var(--gold-2)) !important;
  color:#000 !important;
  font-weight:800 !important;
  font-size:15px !important;
  padding:14px 24px !important;
  border-radius:12px !important;
  border:none !important;
  text-transform:none !important;
  letter-spacing:.3px !important;
  width:100% !important;
  height:auto !important;
  min-height:50px !important;
  cursor:pointer !important;
  box-shadow:none !important;
  transition:opacity .15s, transform .1s !important;
}
.wc-block-components-checkout-place-order-button:hover{opacity:.92 !important}
.wc-block-components-checkout-place-order-button:active{transform:scale(.985) !important}
.wc-block-components-checkout-place-order-button .wc-block-components-button__text{color:inherit !important}

/* Hide "Return to cart" link entirely (theme's bottom-nav already has Cart) */
.wc-block-components-checkout-return-to-cart-button,
.wp-block-woocommerce-checkout-actions-block .wc-block-components-button.wc-block-components-checkout-return-to-cart-button{
  display:none !important;
}

/* The real WC actions block stays in the DOM (so its React click handler
 * works) but is hidden — theme.js renders a mirror place-order button in
 * the sidebar that forwards clicks to it. */
.wp-block-woocommerce-checkout-actions-block{
  display:none !important;
}
.wc-block-checkout__actions{
  display:none !important;
}

/* The mirror button rendered into the totals/sidebar block. */
.ace-place-order-mirror{
  display:flex !important;
  width:100% !important;
  margin-top:16px !important;
  padding-top:14px !important;
  padding-bottom:14px !important;
  align-items:center !important;
  justify-content:center !important;
}
.wp-block-woocommerce-checkout-totals-block .ace-place-order-mirror,
.wc-block-components-sidebar .ace-place-order-mirror{
  margin-top:18px !important;
}

/* ============== CHECKOUT WIZARD (3-step guided flow) ============
 * Renders a stepper card before the payment block. When the wizard
 * is mounted (body.ace-wizard-active), the standalone scattered UI
 * for asuransi / voucher / saldo is hidden so the wizard is the
 * single source of truth. See assets/checkout-wizard.js. */
#ace-checkout-wizard{order:22 !important}
.ace-wiz{
  background:linear-gradient(135deg,#1a1a1a 0%,#0a0a0a 100%);
  border:1px solid #d4af37;
  border-radius:14px;
  padding:16px 18px;
  margin:14px 0;
  color:#fff;
}
.ace-wiz-head{display:flex;gap:12px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #2a2a2a;margin-bottom:12px}
.ace-wiz-icon{font-size:24px;line-height:1}
.ace-wiz-title{margin:0;font-size:15px;font-weight:800;color:#d4af37;letter-spacing:.3px}
.ace-wiz-subtitle{margin:2px 0 0;font-size:12px;color:#bbb;line-height:1.4}
.ace-wiz-step{padding:12px 0;border-bottom:1px solid #1a1a1a}
.ace-wiz-step:last-of-type{border-bottom:none}
.ace-wiz-step-head{display:flex;gap:10px;align-items:center}
.ace-wiz-step-num{
  width:26px;height:26px;border-radius:50%;
  background:#2a2a2a;color:#888;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:700;font-size:13px;flex-shrink:0;
  transition:background .15s,color .15s;
}
.ace-wiz-step[data-state=active] .ace-wiz-step-num{background:#d4af37;color:#000}
.ace-wiz-step[data-state=done] .ace-wiz-step-num{background:#4ade80;color:#000}
.ace-wiz-step[data-state=done] .ace-wiz-step-num::before{content:'✓'}
.ace-wiz-step[data-state=done] .ace-wiz-step-num{font-size:0}
.ace-wiz-step[data-state=done] .ace-wiz-step-num::before{font-size:14px}
.ace-wiz-step-titles{flex:1;min-width:0}
.ace-wiz-step-title{font-size:14px;font-weight:700;color:#fff}
.ace-wiz-step[data-state=locked] .ace-wiz-step-title{color:#666}
/* "Wajib" badge that sits next to "Asuransi Pengiriman" when shop
 * policy forces insurance ON (luar Jawa or cart > Rp 10jt). */
.ace-wiz-required-badge{
  display:inline-block;
  font-size:9.5px;font-weight:900;
  letter-spacing:0.6px;
  padding:2px 7px;
  margin-left:8px;
  border-radius:5px;
  background:linear-gradient(135deg,#ff4757,#e02020);
  color:#fff;
  text-shadow:0 1px 1px rgba(0,0,0,0.3);
  box-shadow:0 1px 3px rgba(229,32,32,0.4);
  vertical-align:middle;
}
.ace-wiz-step-summary{font-size:12px;color:#4ade80;margin-top:2px}
.ace-wiz-step-summary:empty{display:none}
/* (Per-step "Batalkan" buttons removed — see assets/checkout-wizard.js.
 * Reset goes through the "Mulai Ulang" button at the bottom of the
 * wizard which reloads the page and lets the server-side reset
 * handler clear all three pieces of state atomically.) */
.ace-wiz-step-body{margin-top:12px}
.ace-wiz-step-body[hidden]{display:none}
.ace-wiz-step-desc{font-size:12px;color:#aaa;line-height:1.5;margin:0 0 12px}
.ace-wiz-step-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.ace-wiz-btn{
  padding:9px 16px;border:none;border-radius:8px;cursor:pointer;
  font-weight:700;font-size:13px;letter-spacing:.2px;
  transition:opacity .15s,transform .1s;
}
.ace-wiz-btn:hover{opacity:.92}
.ace-wiz-btn:active{transform:scale(.97)}
.ace-wiz-btn-primary{background:#d4af37;color:#000}
.ace-wiz-btn-secondary{background:#2a2a2a;color:#fff;border:1px solid #3a3a3a}
.ace-wiz-btn-tiny{padding:5px 10px;font-size:11px;background:#d4af37;color:#000}

/* Voucher list inside step 2 — Shopee/Tokopedia-style ticket cards.
 * Each card has a perforated left edge (ticket stub illusion via
 * radial gradient mask), gold accent, and an obvious tap target. */
.ace-wiz-voucher-list{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.ace-wiz-voucher-row{
  position:relative;
  display:flex;align-items:center;gap:14px;
  width:100%;min-height:74px;
  padding:12px 14px 12px 56px;
  background:linear-gradient(135deg,#1a1410 0%,#0f0d08 60%,#1a1410 100%);
  border:1.5px solid #d4af37;border-radius:10px;
  cursor:pointer;text-align:left;color:#fff;
  font-family:inherit;
  box-shadow:0 2px 8px rgba(0,0,0,.3),inset 0 1px 0 rgba(212,175,55,.15);
  transition:transform .15s,box-shadow .15s,border-color .15s;
  overflow:hidden;
}
.ace-wiz-voucher-row::before{
  /* Left-edge "stub" with a gradient highlight + ticket icon */
  content:'🎟';
  position:absolute;
  top:0;left:0;bottom:0;width:46px;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;
  background:linear-gradient(135deg,#d4af37 0%,#a08020 100%);
  color:#000;
  border-right:2px dashed rgba(0,0,0,.4);
}
.ace-wiz-voucher-row::after{
  /* Subtle "klik" arrow on the right edge */
  content:'›';
  position:absolute;right:14px;top:50%;transform:translateY(-50%);
  font-size:22px;color:#d4af37;font-weight:900;line-height:1;
  transition:transform .15s;
}
.ace-wiz-voucher-row:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(212,175,55,.25),inset 0 1px 0 rgba(212,175,55,.3);
  border-color:#fff;
}
.ace-wiz-voucher-row:hover::after{transform:translateY(-50%) translateX(4px)}
.ace-wiz-voucher-row:active{transform:translateY(0)}
.ace-wiz-voucher-code{
  font-weight:900;color:#d4af37;
  font-size:14px;font-family:Menlo,Consolas,monospace;
  text-transform:uppercase;letter-spacing:.5px;
  text-shadow:0 0 8px rgba(212,175,55,.4);
}
/* Hidden by request — the code itself (GRATISONGKIR) is already
 * self-explanatory so the white "Gratis Ongkir" label below was
 * redundant. JS still renders the element so future coupons can
 * un-hide via a custom class if needed. */
.ace-wiz-voucher-label{display:none}
.ace-wiz-voucher-hint{font-size:11px;color:#bbb;margin-top:3px;line-height:1.4;padding-right:16px}
.ace-wiz-voucher-empty{
  padding:18px;text-align:center;color:#888;font-size:12px;
  background:#0a0a0a;border-radius:10px;border:1px dashed #2a2a2a;
}
.ace-wiz-voucher-manual{display:flex;gap:8px;margin-bottom:10px;align-items:stretch}
.ace-wiz-voucher-input{
  flex:1;background:#0a0a0a;border:1px solid #2a2a2a;color:#fff;
  padding:8px 12px;border-radius:8px;font-size:13px;min-width:0;
}
.ace-wiz-voucher-input:focus{outline:none;border-color:#d4af37}
.ace-wiz-voucher-msg{font-size:12px;padding:8px 10px;border-radius:6px;margin:6px 0;background:#1a1a1a}
.ace-wiz-voucher-msg.is-ok{background:rgba(74,222,128,.12);color:#4ade80;border:1px solid rgba(74,222,128,.3)}
.ace-wiz-voucher-msg.is-err{background:rgba(248,113,113,.12);color:#f87171;border:1px solid rgba(248,113,113,.3)}

/* Saldo input inside step 3 — drop every height / line-height
 * override on the input and let it take its intrinsic size, then
 * vertically center the input as a box inside the row via
 * align-self:center. The browser handles the text-Y inside the
 * input natively without any input-specific overrides, so the
 * font's true vertical metrics determine the final position
 * (no manual values to drift one way or the other). */
.ace-wiz-saldo-input{
  display:flex;align-items:center;
  background:#0a0a0a;border:1px solid #2a2a2a;border-radius:8px;
  overflow:hidden;max-width:260px;margin-bottom:10px;
  height:40px;
}
.ace-wiz-saldo-prefix{
  align-self:stretch;
  display:flex;align-items:center;justify-content:center;
  padding:0 12px;background:#2a2a2a;color:#888;
  font-size:13px;font-weight:700;
  box-sizing:border-box;
}
/* All previous adjustments lost to a WC Blocks rule with
 * !important: `.wc-block-components-form input[type="text"]`
 * sets padding:22px 14px 8px (floating-label style with 22px
 * reserved at top!) + min-height:56px. That's why the text kept
 * landing wherever the 22px top padding pushed it, and the row
 * was always taller than my height value.
 *
 * Bump specificity to match (class + element + class = 0,2,1)
 * AND add !important on every property we override. Source-order
 * tiebreak favors style.css (loaded after WC Blocks CSS) so the
 * tie goes to us. */
.ace-wiz-saldo-input input.ace-wiz-saldo-amount{
  flex:1 !important;
  align-self:center !important;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  color:#fff !important;
  font-family:Menlo,monospace !important;
  font-size:14px !important;
  font-weight:700 !important;
  padding:6px 10px !important;
  margin:0 !important;
  min-height:0 !important;
  height:auto !important;
  min-width:0 !important;
  outline:none !important;
  text-align:center !important;
  box-shadow:none !important;
  line-height:normal !important;
}
.ace-wiz-saldo-input > .ace-wiz-btn-tiny{
  align-self:stretch;
  display:flex;align-items:center;justify-content:center;
  padding:0 14px;font-size:11px;font-weight:800;
  border:none;border-radius:0;
  box-sizing:border-box;
}
.ace-wiz-saldo-msg{font-size:12px;padding:8px 10px;border-radius:6px;margin:6px 0;background:#1a1a1a}
.ace-wiz-saldo-msg.is-ok{background:rgba(74,222,128,.12);color:#4ade80;border:1px solid rgba(74,222,128,.3)}
.ace-wiz-saldo-msg.is-err{background:rgba(248,113,113,.12);color:#f87171;border:1px solid rgba(248,113,113,.3)}

/* Locked step appearance */
.ace-wiz-step[data-state=locked] .ace-wiz-step-head{opacity:.45}
.ace-wiz-step[data-state=locked] .ace-wiz-step-body{opacity:.45;pointer-events:none}

/* Completion banner + Mulai Ulang button removed — the outer
 * checkout stepper handles advancement to the payment step on
 * wizard completion via body.ace-wizard-done, so the in-card
 * banner became redundant. Restart now happens via a page
 * refresh, same flow as the rest of the stepper.
 * (Old selectors: .ace-wiz-complete, .ace-wiz-restart,
 *                  .ace-wiz-restart-hint) */

/* When wizard is active, hide the scattered UI it replaces — the
 * wizard becomes the single source of truth for asuransi /
 * voucher / saldo so the buyer can't switch back-and-forth and
 * trigger the coupon/saldo race-conditions that motivated this
 * whole feature. */
body.ace-wizard-active .ace-insurance-row,
body.ace-wizard-active #ace-saldo-checkout-mount,
body.ace-wizard-active .ace-slot-voucher,
body.ace-wizard-active .ace-promo-trigger,
body.ace-wizard-active .ace-promo-active-banner{
  display:none !important;
}

/* Lock the Place Order button until the wizard is complete. WC
 * Blocks renders the button as <button class="wc-block-components-checkout-place-order-button">.
 * Pointer-events:none means clicks are ignored; opacity makes the
 * disabled state obvious. */
body.ace-wizard-active:not(.ace-wizard-done) .wc-block-components-checkout-place-order-button,
body.ace-wizard-active:not(.ace-wizard-done) .ace-place-order-mirror button,
body.ace-wizard-active:not(.ace-wizard-done) .ace-checkout-bottom-bar button{
  opacity:.4 !important;
  pointer-events:none !important;
  cursor:not-allowed !important;
  position:relative;
}
body.ace-wizard-active:not(.ace-wizard-done) .wc-block-components-checkout-place-order-button::after,
body.ace-wizard-active:not(.ace-wizard-done) .ace-place-order-mirror button::after,
body.ace-wizard-active:not(.ace-wizard-done) .ace-checkout-bottom-bar button::after{
  content:'';
}

/* Checkout customizations applied on EVERY viewport:
 *  - Hide WC's contact info (email comes from logged-in profile).
 *  - Hide WC's address forms (replaced by .ace-slot-address card).
 *  - Hide WC's shipping methods (replaced by .ace-slot-shipping card). */
.wp-block-woocommerce-checkout-contact-information-block{display:none !important}
.wp-block-woocommerce-checkout-shipping-address-block,
.wp-block-woocommerce-checkout-billing-address-block{display:none !important}
.wp-block-woocommerce-checkout-pickup-options-block,
.wp-block-woocommerce-checkout-shipping-method-block,
.wp-block-woocommerce-checkout-shipping-methods-block{display:none !important}

/* Mobile: re-skin to single-column Shopee-style flow with sticky
 * bottom bar. The fields block becomes a flex column, custom slots
 * are interleaved with WC sub-blocks via order properties, the WC
 * totals/sidebar is hidden and the actions block is replaced by the
 * sticky bar. */
@media (max-width: 767px){
  .wp-block-woocommerce-checkout{
    display:flex !important;
    flex-direction:column !important;
    padding:0 14px !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
  }
  .wp-block-woocommerce-checkout-fields-block,
  .wc-block-checkout__main{
    display:flex !important;
    flex-direction:column !important;
    padding:0 !important;
  }

  /* Order: Address → Shipping → Product → Payment → Note →
   * Voucher → Rincian → Terms. The voucher slot sits *just above*
   * Rincian Pembayaran on mobile per user request — buyers expect
   * to grab a promo right before reviewing the final total. */
  .wp-block-woocommerce-checkout-express-payment-block{order:1 !important}
  .ace-slot-address{order:5 !important}
  .ace-slot-shipping{order:10 !important}
  .ace-slot-product{order:20 !important}
  #ace-saldo-checkout-mount{order:25 !important}
  .wp-block-woocommerce-checkout-payment-block{order:30 !important}
  .wp-block-woocommerce-checkout-additional-information-block,
  .wp-block-woocommerce-checkout-order-note-block{order:40 !important}
  .ace-slot-voucher{order:55 !important}
  .ace-slot-rincian{order:60 !important}
  .wp-block-woocommerce-checkout-terms-block{order:70 !important}
  .wp-block-woocommerce-checkout-actions-block{display:none !important}
  .wp-block-woocommerce-checkout-totals-block,
  .wc-block-components-sidebar{display:none !important}

  .wp-block-woocommerce-checkout > *,
  .wp-block-woocommerce-checkout-fields-block > *{
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  body.woocommerce-checkout{padding-bottom:108px !important}
  .ace-place-order-mirror{display:none !important}
}

/* Desktop: keep WC's natural 2-column layout (form left, sidebar
 * right with Ringkasan + Buat Pesanan). The custom Address card and
 * Pilihan Pengiriman still render in the form column above payment;
 * the redundant Tampilan Produk / Voucher / Rincian custom cards are
 * hidden because the sidebar already shows that data. The sticky
 * bottom bar is hidden — sidebar mirror Checkout button replaces it. */
@media (min-width: 768px){
  .ace-checkout-bottom-bar{display:none !important}
  .ace-slot-product,
  .ace-slot-rincian{display:none !important}
  /* Voucher slot stays visible on desktop — JS moves it from the form
   * column into the sidebar above the Ringkasan Pesanan card. The slot
   * itself is a transparent wrapper; the .ace-promo-trigger button
   * inside has its own card styling so it reads as a separate panel
   * stacked on top of the order summary. */
  .ace-slot-voucher{
    display:block !important;
    background:transparent;
    border:0;
    padding:0;
    margin:0 0 14px;
    box-shadow:none;
    width:100%;
  }
  /* Show Address card + Shipping options in their natural form-column
   * order (after billing/shipping address blocks, which are hidden). */
  .ace-slot-address,
  .ace-slot-shipping{display:block}
  /* Hide WC's actions block on desktop too — JS renders a mirror
   * Checkout button inside the sidebar (below totals) instead, so the
   * action sits next to the order summary like Shopee. */
  .wp-block-woocommerce-checkout-actions-block{display:none !important}
  /* Mirror visible only on desktop (mobile uses the sticky bar). */
  .ace-place-order-mirror{display:flex !important}

  /* Force the form column into a flex column so `order` properties
   * below take effect — without this, desktop falls back to natural
   * DOM order and the JS-appended slots end up at the bottom. */
  .wp-block-woocommerce-checkout-fields-block,
  .wc-block-checkout__main{
    display:flex !important;
    flex-direction:column !important;
  }
  /* Same order as mobile: Address → Shipping → Saldo → Payment → Note → Terms.
   * Product / Voucher / Rincian are hidden on desktop (sidebar shows
   * them), so they don't need order values here. */
  .ace-slot-address{order:5 !important}
  .ace-slot-shipping{order:10 !important}
  #ace-saldo-checkout-mount{order:25 !important}
  .wp-block-woocommerce-checkout-payment-block{order:40 !important}
  .wp-block-woocommerce-checkout-additional-information-block,
  .wp-block-woocommerce-checkout-order-note-block{order:50 !important}
  .wp-block-woocommerce-checkout-terms-block{order:70 !important}
}

/* ============== CUSTOM CHECKOUT SLOTS (all viewports) ============== */
.ace-mobile-card{
  display:block;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  margin:0 0 14px;
  padding:18px 18px;
  box-sizing:border-box;
}
.ace-mobile-card .ace-mc-header{
    font-size:15px;
    font-weight:700;
    color:#fff;
    margin:0 0 12px;
    letter-spacing:-.1px;
  }

  /* Address card */
  .ace-slot-address .ace-addr-card{
    color:#fff;
  }
  .ace-slot-address .ace-addr-name{
    font-size:14px;
    font-weight:700;
    color:#fff;
    margin-bottom:4px;
  }
  .ace-slot-address .ace-addr-sep{
    color:var(--text-dim);
    font-weight:400;
    margin:0 4px;
  }
  .ace-slot-address .ace-addr-detail,
  .ace-slot-address .ace-addr-region{
    font-size:13px;
    color:var(--text-dim);
    line-height:1.4;
  }
  .ace-slot-address .ace-addr-label{
    display:inline-block;
    background:rgba(212,175,55,.15);
    color:var(--gold);
    font-size:11px;
    font-weight:700;
    padding:3px 8px;
    border-radius:6px;
    text-transform:uppercase;
    letter-spacing:.5px;
    margin-bottom:8px;
  }
  .ace-slot-address .ace-addr-actions{
    display:flex;
    gap:14px;
    margin-top:10px;
    flex-wrap:wrap;
    align-items:center;
  }
  .ace-slot-address .ace-addr-edit{
    display:inline-block;
    color:var(--gold);
    font-size:13px;
    font-weight:600;
    text-decoration:none;
  }
  .ace-slot-address .ace-addr-edit:hover{opacity:.85}
  .ace-slot-address .ace-addr-pick-btn{
    background:transparent;
    border:0;
    padding:0;
    color:var(--gold);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
  }
  .ace-slot-address .ace-addr-pick-btn:hover{opacity:.85}
  .ace-slot-address .ace-add-address-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    width:100%;
    padding:14px 16px;
    background:var(--bg);
    border:1.5px dashed var(--bg-3);
    border-radius:10px;
    color:var(--gold);
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    transition:border-color .15s, background .15s;
  }
  .ace-slot-address .ace-add-address-btn:hover{
    border-color:var(--gold);
    background:rgba(212,175,55,.06);
  }
  .ace-slot-address .ace-add-icon{
    font-size:18px;
    line-height:1;
  }
  .ace-slot-address .ace-addr-hint{
    margin-top:8px;
    font-size:12px;
    color:var(--text-dim);
    text-align:center;
  }

  /* Shipping method card — 3 selectable options */
  .ace-slot-shipping .ace-ship-opt{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:14px;
    margin-bottom:10px;
    background:var(--bg);
    border:1.5px solid var(--bg-3);
    border-radius:10px;
    cursor:pointer;
    transition:border-color .15s, background .15s;
  }
  .ace-slot-shipping .ace-ship-opt:last-child{margin-bottom:0}
  .ace-slot-shipping .ace-ship-opt.is-active{
    border-color:var(--gold);
    background:rgba(212,175,55,.06);
  }
  .ace-slot-shipping .ace-ship-opt input[type="radio"]{
    appearance:none;-webkit-appearance:none;
    width:18px;height:18px;
    margin:2px 0 0;
    border:2px solid var(--bg-3);
    border-radius:50%;
    cursor:pointer;
    position:relative;
    flex-shrink:0;
  }
  .ace-slot-shipping .ace-ship-opt input[type="radio"]:checked{
    border-color:var(--gold);
  }
  .ace-slot-shipping .ace-ship-opt input[type="radio"]:checked::after{
    content:'';
    position:absolute;
    top:50%;left:50%;
    transform:translate(-50%, -50%);
    width:8px;height:8px;
    border-radius:50%;
    background:var(--gold);
  }
  .ace-slot-shipping .ace-ship-info{
    flex:1;
    min-width:0;
  }
  .ace-slot-shipping .ace-ship-title{
    font-size:14px;
    font-weight:700;
    color:#fff;
    margin-bottom:2px;
  }
  .ace-slot-shipping .ace-ship-desc{
    font-size:12px;
    color:var(--text-dim);
    line-height:1.4;
  }
  .ace-slot-shipping .ace-ship-note{
    font-size:11px;
    margin-top:6px;
    padding:4px 8px;
    border-radius:6px;
    display:inline-block;
    line-height:1.4;
  }
  .ace-slot-shipping .ace-ship-note.is-ok{
    background:rgba(40,167,69,.12);
    color:#7ddc94;
  }
  .ace-slot-shipping .ace-ship-note.is-warn{
    background:rgba(220,53,69,.12);
    color:#ff8a95;
  }
  /* Disabled out-of-range option — keep visible but visibly inert. */
  .ace-slot-shipping .ace-ship-opt.is-disabled{
    opacity:.55;
    cursor:not-allowed;
    border-color:var(--bg-3) !important;
    background:transparent !important;
  }
  .ace-slot-shipping .ace-ship-opt.is-disabled input[type="radio"]{
    cursor:not-allowed;
  }

  /* Courier sub-options (Biteship rates) — expand under "Pengiriman via Kurir" */
  .ace-courier-list{
    margin:-2px 0 10px 30px;
    padding:8px 12px;
    background:var(--bg);
    border:1px dashed var(--bg-3);
    border-radius:10px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .ace-courier-list[hidden]{display:none}

  /* ============== ASURANSI PENGIRIMAN TOGGLE ============== */
  /* Lives at the bottom of the courier list — only renders when
   * 'Pengiriman via Kurir' is selected. The .is-forced variant
   * gets a gold border so the buyer immediately notices it's
   * non-toggleable. */
  .ace-insurance-row{
    margin-top:6px;
    padding:10px 12px;
    background:var(--bg-2);
    border:1px solid var(--bg-3);
    border-radius:8px;
    display:flex;
    flex-direction:column;
    gap:6px;
  }
  .ace-insurance-row.is-forced{
    border-color:rgba(212,175,55,.45);
    background:linear-gradient(180deg, rgba(212,175,55,.08), rgba(212,175,55,.02));
  }
  .ace-insurance-toggle{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    user-select:none;
  }
  .ace-insurance-toggle input[type="checkbox"]{
    width:18px;
    height:18px;
    accent-color:var(--gold,#d4af37);
    cursor:pointer;
    flex-shrink:0;
  }
  .ace-insurance-toggle input[type="checkbox"]:disabled{
    cursor:not-allowed;
    opacity:.7;
  }
  .ace-insurance-row.is-forced .ace-insurance-toggle{ cursor:not-allowed; }
  .ace-insurance-label{
    font-size:13px;
    font-weight:700;
    color:#fff;
    flex:1;
  }
  .ace-insurance-badge{
    display:inline-block;
    background:var(--gold,#d4af37);
    color:#0a0a0a;
    font-size:10px;
    font-weight:800;
    padding:2px 8px;
    border-radius:6px;
    text-transform:uppercase;
    letter-spacing:.4px;
  }
  .ace-insurance-note{
    font-size:11.5px;
    color:var(--text-dim,#9ca3af);
    line-height:1.5;
    padding-left:28px;
  }
  .ace-insurance-row.is-forced .ace-insurance-note{
    color:#d4af37;
  }
  .ace-courier-tier-label{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    margin-bottom:6px;
  }
  .ace-courier-tier-name{
    font-size:11px;
    font-weight:800;
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:.6px;
  }
  .ace-courier-tier-range{
    font-size:12px;
    font-weight:700;
    color:var(--gold);
    font-variant-numeric:tabular-nums;
  }
  .ace-courier-opt{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    background:var(--bg-2);
    border:1.5px solid var(--bg-3);
    border-radius:8px;
    cursor:pointer;
    transition:border-color .15s, background .15s;
    margin-bottom:6px;
  }
  .ace-courier-opt:last-child{margin-bottom:0}
  .ace-courier-opt.is-active{
    border-color:var(--gold);
    background:rgba(212,175,55,.06);
  }
  .ace-courier-opt input[type="radio"]{
    appearance:none;-webkit-appearance:none;
    width:16px;height:16px;
    border:2px solid var(--bg-3);
    border-radius:50%;
    cursor:pointer;
    position:relative;
    flex-shrink:0;
    margin:0;
  }
  .ace-courier-opt input[type="radio"]:checked{border-color:var(--gold)}
  .ace-courier-opt input[type="radio"]:checked::after{
    content:'';
    position:absolute;
    top:50%;left:50%;
    transform:translate(-50%, -50%);
    width:7px;height:7px;
    border-radius:50%;
    background:var(--gold);
  }
  .ace-courier-info{flex:1;min-width:0}
  .ace-courier-title{
    font-size:13px;
    font-weight:700;
    color:#fff;
    line-height:1.3;
  }
  .ace-courier-desc{
    font-size:11px;
    color:var(--text-dim);
    margin-top:1px;
  }
  .ace-courier-price{
    font-size:13px;
    font-weight:800;
    color:var(--gold);
    white-space:nowrap;
  }
  .ace-courier-empty,
  .ace-courier-loading{
    padding:10px 12px;
    color:var(--text-dim);
    font-size:12px;
    text-align:center;
    line-height:1.5;
  }

  /* Product card */
  .ace-slot-product .ace-mc-item{
    display:flex;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid var(--bg-3);
  }
  .ace-slot-product .ace-mc-item:first-of-type{padding-top:0}
  .ace-slot-product .ace-mc-item:last-of-type{border-bottom:none;padding-bottom:0}
  .ace-slot-product .ace-mc-img{
    width:64px;height:64px;
    background:#fff;
    border-radius:8px;
    object-fit:cover;
    flex-shrink:0;
  }
  .ace-slot-product .ace-mc-info{
    flex:1;min-width:0;
    display:flex;flex-direction:column;
    gap:4px;
  }
  .ace-slot-product .ace-mc-name{
    font-size:13px;font-weight:600;color:#fff;
    line-height:1.35;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden;
  }
  .ace-slot-product .ace-mc-variant{
    font-size:11px;color:var(--text-dim);
    text-transform:uppercase;letter-spacing:.3px;
  }
  .ace-slot-product .ace-mc-foot{
    margin-top:auto;
    display:flex;justify-content:space-between;align-items:baseline;
    padding-top:4px;
  }
  .ace-slot-product .ace-mc-price{
    color:var(--gold);font-weight:800;font-size:14px;
  }
  .ace-slot-product .ace-mc-qty{
    color:var(--text-dim);font-size:12px;
  }

  /* On-sale row in the mobile "Tampilan Produk" card.
   * The footer becomes flex column so the 3-line stack
   * (Harga Normal / Hemat / Harga Promo) stretches full
   * width, with the "x N" quantity hugging the right edge
   * of the final row. */
  .ace-slot-product .ace-mc-foot.is-on-sale{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding-top:6px;
  }
  .ace-slot-product .ace-mc-foot.is-on-sale .ace-price-stack{
    width:100%;
    min-width:0;
    margin-top:0;
  }
  .ace-slot-product .ace-mc-foot.is-on-sale .ace-mc-qty{
    align-self:flex-end;
    margin-top:4px;
    font-size:11px;
    color:var(--text-dim);
    font-weight:600;
    background:rgba(212,175,55,0.08);
    border-radius:4px;
    padding:2px 8px;
  }

  /* Voucher card */
  .ace-slot-voucher .ace-voucher-row{
    display:flex;gap:8px;align-items:stretch;
  }
  .ace-slot-voucher .ace-voucher-input{
    flex:1;min-width:0;
    background:var(--bg);
    border:1px solid var(--bg-3);
    color:#fff;
    border-radius:10px;
    padding:12px 14px;
    font-size:14px;
    font-family:inherit;
    box-sizing:border-box;
    outline:none;
    transition:border-color .15s, box-shadow .15s;
  }
  .ace-slot-voucher .ace-voucher-input:focus{
    border-color:var(--gold);
    box-shadow:0 0 0 1px var(--gold) inset;
  }
  .ace-slot-voucher .ace-voucher-input::placeholder{
    color:var(--text-dim);
  }
  .ace-slot-voucher .ace-voucher-apply{
    background:linear-gradient(135deg, var(--gold), var(--gold-2));
    color:#000;font-weight:700;font-size:13px;
    padding:0 18px;
    border-radius:10px;
    border:none;
    cursor:pointer;
    transition:opacity .15s;
  }
  .ace-slot-voucher .ace-voucher-apply:hover{opacity:.9}
  .ace-slot-voucher .ace-voucher-msg{
    margin-top:10px;
    font-size:12px;
    color:var(--text-dim);
  }
  .ace-slot-voucher .ace-voucher-msg-ok{color:#7fdb9a}
  .ace-slot-voucher .ace-voucher-msg-err{color:#f08080}
  .ace-slot-voucher .ace-voucher-applied{
    margin-top:10px;
    display:flex;flex-direction:column;gap:6px;
  }
  .ace-slot-voucher .ace-voucher-applied:empty{display:none}
  .ace-slot-voucher .ace-coupon-item{
    display:flex;justify-content:space-between;align-items:center;
    background:var(--bg);
    border:1px solid var(--bg-3);
    border-radius:8px;
    padding:8px 12px;
    font-size:13px;
  }
  .ace-slot-voucher .ace-coupon-code{color:var(--gold);font-weight:700}
  .ace-slot-voucher .ace-coupon-remove{
    background:transparent;
    color:var(--text-dim);
    border:none;
    font-size:18px;
    line-height:1;
    cursor:pointer;
    padding:0 4px;
  }
  .ace-slot-voucher .ace-coupon-remove:hover{color:#f08080}

  /* Rincian Pembayaran card */
  .ace-slot-rincian .ace-mc-row{
    display:flex;justify-content:space-between;align-items:center;
    padding:6px 0;
    font-size:13px;
    color:var(--text-dim);
  }
  .ace-slot-rincian .ace-mc-row span:last-child{
    color:#fff;font-weight:600;
  }
  .ace-slot-rincian .ace-mc-row-discount span:last-child{
    color:#f08080;font-weight:600;
  }
  .ace-slot-rincian .ace-mc-row-grand{
    margin-top:6px;
    padding-top:12px;
    border-top:1px solid var(--bg-3);
    font-size:15px;
  }
  .ace-slot-rincian .ace-mc-row-grand span:first-child{
    color:#fff;font-weight:700;
  }
  .ace-slot-rincian .ace-mc-row-grand span:last-child{
    color:var(--gold);font-weight:800;font-size:18px;
  }

/* ============== STICKY BOTTOM BAR (mobile checkout only) ============== */
.ace-checkout-bottom-bar{display:none}
@media (max-width: 767px){
  .ace-checkout-bottom-bar{
    position:fixed;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    width:100%;
    max-width:480px;
    background:var(--bg-2);
    border-top:1px solid var(--bg-3);
    padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    display:flex;
    align-items:center;
    gap:12px;
    z-index:100;
    box-shadow:0 -6px 20px rgba(0,0,0,.45);
  }
}
  .ace-checkout-bottom-bar .ace-bb-total-wrap{
    flex:1;
    display:flex;
    flex-direction:column;
    line-height:1.2;
    min-width:0;
  }
  .ace-checkout-bottom-bar .ace-bb-label{
    color:var(--text-dim);
    font-size:11px;
    font-weight:500;
    margin-bottom:2px;
  }
  .ace-checkout-bottom-bar .ace-bb-amount{
    color:var(--gold);
    font-size:18px;
    font-weight:800;
    letter-spacing:-.2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .ace-checkout-bottom-bar .ace-bb-btn{
    background:linear-gradient(135deg, var(--gold), var(--gold-2));
    color:#000;
    font-weight:800;
    font-size:14px;
    padding:14px 28px;
    border-radius:12px;
    border:none;
    cursor:pointer;
    min-width:140px;
    transition:transform .1s, opacity .15s;
  }
  .ace-checkout-bottom-bar .ace-bb-btn:active{transform:scale(.97)}
  .ace-checkout-bottom-bar .ace-bb-btn:disabled{opacity:.55;cursor:not-allowed}

/* Order summary + coupon panels are ALWAYS expanded. JS clicks any
 * collapsed toggles + sets <details open> on every observer pass; the
 * rules below kill the chevron so it doesn't look interactive and pin
 * the panel content visible as a CSS belt-and-braces.
 * (Note: NO pointer-events:none on the toggle — that can block our own
 * programmatic .click() in some browsers.)
 *
 * Selectors are deliberately broad: WC sometimes nests the chevron
 * under a wrapper span (.wc-block-components-panel__button > span > svg)
 * which the previous narrower rules missed, leaving the "^" visible
 * on the "Tambah kupon" header. Hide every svg / arrow within either
 * panel container regardless of nesting. */
.wp-block-woocommerce-checkout-order-summary-block svg,
.wp-block-woocommerce-checkout-order-summary-block button svg,
.wp-block-woocommerce-checkout-order-summary-block summary svg,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-button__chevron,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel__chevron,
.wp-block-woocommerce-checkout-order-summary-block button::before,
.wp-block-woocommerce-checkout-order-summary-block button::after,
.wp-block-woocommerce-checkout-order-summary-block summary::before,
.wp-block-woocommerce-checkout-order-summary-block summary::after,
.wp-block-woocommerce-checkout-coupon-block svg,
.wp-block-woocommerce-checkout-coupon-block button > svg,
.wp-block-woocommerce-checkout-coupon-block .wc-block-components-button__chevron,
.wp-block-woocommerce-checkout-coupon-block .wc-block-components-panel__chevron,
.wp-block-woocommerce-checkout-coupon-block button::before,
.wp-block-woocommerce-checkout-coupon-block button::after,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block svg,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block button svg,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block .wc-block-components-button__chevron,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block .wc-block-components-panel__chevron,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block button::before,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block button::after,
.wc-block-components-totals-coupon svg,
.wc-block-components-totals-coupon button > svg,
.wc-block-components-totals-coupon button svg,
.wc-block-components-totals-coupon summary svg,
.wc-block-components-totals-coupon .wc-block-components-button__chevron,
.wc-block-components-totals-coupon .wc-block-components-panel__chevron,
.wc-block-components-totals-coupon button::before,
.wc-block-components-totals-coupon button::after{
  display:none !important;
  content:none !important;
}
.wp-block-woocommerce-checkout-order-summary-block summary,
.wc-block-components-totals-coupon summary{
  list-style:none !important;
  cursor:default !important;
}
.wp-block-woocommerce-checkout-order-summary-block summary::-webkit-details-marker,
.wc-block-components-totals-coupon summary::-webkit-details-marker,
.wp-block-woocommerce-checkout-order-summary-block summary::marker,
.wc-block-components-totals-coupon summary::marker{
  display:none !important;
  content:"" !important;
}
/* Force the panel content visible. We also override [hidden] and
 * [aria-hidden] which WC uses to collapse-by-attribute. */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel__content,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary,
.wp-block-woocommerce-checkout-order-summary-block [aria-hidden="true"],
.wp-block-woocommerce-checkout-order-summary-block [hidden],
.wp-block-woocommerce-checkout-order-summary-block details > *:not(summary),
.wp-block-woocommerce-checkout-coupon-block .wc-block-components-panel__content,
.wp-block-woocommerce-checkout-coupon-block [aria-hidden="true"],
.wp-block-woocommerce-checkout-coupon-block [hidden],
.wp-block-woocommerce-checkout-order-summary-coupon-form-block .wc-block-components-panel__content,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block [aria-hidden="true"],
.wp-block-woocommerce-checkout-order-summary-coupon-form-block [hidden],
.wp-block-woocommerce-checkout-order-summary-coupon-form-block details > *:not(summary),
.wc-block-components-totals-coupon .wc-block-components-panel__content,
.wc-block-components-totals-coupon [aria-hidden="true"],
.wc-block-components-totals-coupon [hidden]{
  display:block !important;
  height:auto !important;
  max-height:none !important;
  visibility:visible !important;
  opacity:1 !important;
  overflow:visible !important;
}

/* Terms text — JS moves the block into the sidebar right above the
 * Checkout button. Drop WC's default separator/padding so it sits flush
 * against the totals card. */
.wp-block-woocommerce-checkout-terms-block,
.wc-block-checkout__terms{
  color:var(--text-dim) !important;
  font-size:12px !important;
  line-height:1.5 !important;
  margin:14px 0 0 !important;
  padding:0 !important;
  border:none !important;
  background:transparent !important;
}
.wc-block-checkout__terms--with-separator{
  border-top:none !important;
  padding-top:0 !important;
}
.wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-terms-block,
.wp-block-woocommerce-checkout-totals-block .wc-block-checkout__terms{
  margin-top:18px !important;
}

/* Notices */
.wc-block-components-notice-banner{
  background:var(--bg-2) !important;
  border:1px solid var(--bg-3) !important;
  color:#fff !important;
  border-radius:12px !important;
}
.wc-block-components-notice-banner.is-error{
  border-color:#e53935 !important;
  color:#f08080 !important;
}
.wc-block-components-notice-banner.is-success{
  border-color:#7fdb9a !important;
  color:#7fdb9a !important;
}

/* ============================================================
 * Checkout error popup — mobile-only modal that mirrors WC's
 * inline error notice so the buyer can't miss it on a small
 * viewport. Hidden by default; assets/checkout-error-popup.js
 * adds .is-open when a WC error notice appears in the DOM.
 *
 * The inline WC notice still renders normally; this is an
 * ADDITIONAL overlay so the message is impossible to miss
 * during the payment step.
 * ============================================================ */
.ace-error-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 2147483640; /* above WC's own overlays */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ace-error-modal-overlay.is-open{
  display: flex;
  opacity: 1;
}
.ace-error-modal-card{
  background: #1a1a1a;
  border: 2px solid #e53935;
  border-radius: 14px;
  padding: 22px 20px 18px;
  max-width: 360px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    0 0 30px rgba(229,57,53,0.35);
  animation: ace-error-modal-pop 0.22s ease-out;
}
@keyframes ace-error-modal-pop{
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.ace-error-modal-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ace-error-modal-icon{
  font-size: 22px;
  line-height: 1;
}
.ace-error-modal-title{
  font-size: 16px;
  font-weight: 800;
  color: #ff6b6b;
  margin: 0;
  letter-spacing: 0.2px;
}
.ace-error-modal-body{
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
  word-break: break-word;
}
.ace-error-modal-close{
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--gold, #d4af37);
  color: #000;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}
.ace-error-modal-close:hover{
  background: #e6c14a;
}
.ace-error-modal-close:active{
  transform: scale(0.97);
}
/* Prevent the underlying page from scrolling while popup is open. */
body.ace-error-modal-locked{
  overflow: hidden;
}
/* Mobile-only behavior — desktop keeps WC's inline notice and
 * never shows the popup, per spec. JS also gates on the same
 * media query so this is defense in depth. */
@media (min-width: 769px){
  .ace-error-modal-overlay{
    display: none !important;
  }
}

/* My Account page — sidebar nav (Dasbor / Pesanan / Unduhan / Alamat /
 * Detail Akun / Logout) is hidden per request; content takes the full
 * width of the my-account container. WC's default 30/68 split via
 * floats is overridden so the content doesn't sit pinned at the right. */
.woocommerce-MyAccount-navigation{ display:none !important; }
.woocommerce-MyAccount-content{
  float:none !important;
  width:100% !important;
  padding:0;
  margin:0;
}

/* Search results */
.search .post,.archive .post{padding:16px}

/* Hide default WooCommerce sidebar */
.woocommerce-page #secondary{display:none}

/* Pagination */
.woocommerce-pagination{padding:16px;text-align:center}
.woocommerce-pagination ul.page-numbers{display:inline-flex;gap:6px;list-style:none;margin:0;padding:0;border:none}
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span{
  background:var(--bg-3);color:#fff;border-radius:8px;padding:8px 12px;
  border:none !important;
}
.woocommerce-pagination ul.page-numbers li .current{background:var(--gold);color:#000}

/* ============================================================ */
/* ============== RESPONSIVE — MOBILE VS DESKTOP ============== */
/* ============================================================ */

/* Hide desktop nav by default (mobile-first) */
.desktop-nav { display: none }

/* DESKTOP: width >= 768px */
@media (min-width: 768px) {

  body {
    max-width: 1200px !important;
    padding-bottom: 30px !important;
    margin: 0 auto !important;
  }

  /* Top header */
  .top-header {
    padding: 18px 32px !important;
    gap: 24px !important;
  }
  .logo-icon { width: 48px !important; height: 48px !important }
  .logo-text { font-size: 18px !important }
  .search-box { padding: 12px 20px !important; max-width: 500px }
  .search-box input { font-size: 14px !important }
  .icon-btn { width: 44px !important; height: 44px !important }
  .icon-btn svg { width: 20px !important; height: 20px !important }

  /* Show desktop nav */
  .desktop-nav {
    display: flex !important;
    gap: 24px;
    align-items: center;
    margin-right: 12px;
  }
  .desktop-nav a {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all .2s;
  }
  .desktop-nav a:hover { color: var(--gold); background: var(--bg-3) }
  .desktop-nav a.active { color: var(--gold); background: var(--bg-3) }

  /* HIDE bottom nav on desktop — multiple selectors for max specificity */
  nav.bottom-nav,
  .bottom-nav,
  body .bottom-nav {
    display: none !important;
    visibility: hidden !important;
  }

  /* Hero & sections */
  .hero-section { padding: 24px 32px !important }
  .carousel { aspect-ratio: 21/9 !important; max-height: 480px }
  .section { padding: 24px 32px 12px !important }
  .section-title { font-size: 24px !important; margin-bottom: 18px !important }

  /* Categories — 4 columns */
  .cat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }
  .cat-card { padding: 18px !important }
  .cat-icon { width: 52px !important; height: 52px !important }
  .cat-name { font-size: 15px !important }

  /* Products — 4 columns (override every WC .columns-N variant) */
  .products,
  .woocommerce ul.products,
  .woocommerce ul.products.columns-1,
  .woocommerce ul.products.columns-2,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4,
  .woocommerce ul.products.columns-5,
  .woocommerce ul.products.columns-6,
  .ace-products {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px !important;
    padding: 0 32px !important;
  }

  /* Belt: archive grid starts at column 1 from row 1. Earlier the
   * grid had a stray cell at col 1 (likely from a hidden <li> or
   * non-element node injected by a WC plugin / filter), pushing
   * actual products into cols 2-4. Multi-prong defense:
   *   1. row-only flow (no dense fill that lets items reorder)
   *   2. reset any inherited grid-column / grid-row on ALL direct
   *      children (not just li.product — text nodes wrapped in
   *      anonymous boxes count too)
   *   3. force the first li.product to grid-column-start:1 so even
   *      if cell 1 is occupied by something, our first card pushes
   *      itself onto it. */
  .woocommerce ul.products,
  .ace-archive-products {
    grid-auto-flow: row !important;
  }
  .woocommerce ul.products > *,
  .ace-archive-products > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  /* Force the first product card into column 1 regardless of any
   * preceding non-product DOM (defense-in-depth, though our new
   * archive-product.php template no longer emits non-card siblings). */
  .woocommerce ul.products > li.product:first-of-type,
  .ace-archive-products > .ace-product-card:first-of-type,
  .ace-archive-products > a:first-of-type {
    grid-column-start: 1 !important;
  }
  /* Earlier rule hid every non-<li.product> direct child — fine
   * when archive-product.php used <ul><li.product>, but the
   * template now renders <div><a.ace-product-card>. The old hide
   * rule was matching and hiding ALL the new <a> cards on
   * desktop, leaving the grid empty. Replacement: hide only
   * known phantom-cell markers (empty divs, filter <li>s) without
   * touching our card anchors. */
  .ace-archive-products > li:not(.ace-product-card):not(.product),
  .ace-archive-products > div:empty {
    display: none !important;
  }
  .ace-archive-head { padding-bottom: 4px !important; }
  .ace-product-name { font-size: 14px !important; min-height: 40px !important }
  .ace-product-price { font-size: 16px !important }
  .product-name { font-size: 14px !important; min-height: 38px !important }
  .product-price { font-size: 16px !important }

  /* Single product */
  .single-product div.product { padding: 0 32px !important }

  /* Single product: 2-column layout (image left, info right), description full-width below */
  .detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 24px 32px 0;
    align-items: start;
  }
  .detail-layout .detail-image-wrap { margin: 0 !important }
  .detail-layout .detail-info { padding: 0 !important }
  .detail-layout .detail-thumbs { margin: 12px 0 0 !important }

  /* Action bar becomes inline (no longer fixed at bottom of viewport) */
  .detail-action-bar {
    position: static !important;
    transform: none !important;
    max-width: none !important;
    width: auto !important;
    margin-top: 16px !important;
    padding: 16px 0 0 !important;
    border-top: 1px solid var(--bg-3) !important;
    box-shadow: none !important;
    background: transparent !important;
    z-index: auto !important;
  }
  /* Make WhatsApp + cart buttons larger on desktop */
  .detail-action-bar .action-mini {
    flex-direction: row !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
  }
  .detail-action-bar .action-mini svg { width: 20px !important; height: 20px !important }
  .detail-action-bar .action-mini span { font-size: 13px !important }
  .detail-action-bar .action-buy {
    padding: 14px 24px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  /* Tabs section: full-width below the grid on desktop */
  .detail-tabs-section {
    margin: 32px !important;
    padding: 24px 28px !important;
    border-radius: 16px;
  }
  .detail-tabs-section .detail-tabs-nav {
    margin: -24px -28px 20px;
    padding: 0 16px;
  }
  .detail-tabs-section .detail-tab {
    padding: 14px 18px;
    font-size: 14px;
  }

  /* Toast */
  .toast { bottom: 30px !important }

  /* Cart drawer */
  .cart-drawer { max-width: 480px !important }

  /* Page main content */
  .aceshop-main { padding-left: 32px !important; padding-right: 32px !important }

  /* ===== Cart page desktop: table layout ===== */
  .aceshop-cart-page { padding-bottom: 120px }

  .ace-cart-table {
    background: var(--bg-2);
    border: 1px solid var(--bg-3);
    border-radius: 12px;
    padding: 0;
    margin: 16px 0;
    overflow: hidden;
  }

  /* Header row visible on desktop — must mirror the body's 7-column grid so
   * the labels line up under their data columns. "Produk" spans the thumb +
   * name cells. The 16px gap MUST match the .ace-cart-row gap or the labels
   * drift right relative to their values. */
  .ace-cart-head {
    display: grid;
    grid-template-columns: 48px 80px 1fr 140px 120px 140px 80px;
    gap: 0 16px;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--bg-3);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
  }
  /* Hide the master checkbox in the header on desktop — the footer bar
   * already has one and the header version was visually cluttered. The cell
   * stays in the grid (just empty) so column widths still align with body. */
  .ace-cart-head .ace-cart-col-check .ace-check { visibility: hidden }

  .ace-cart-head .ace-cart-col-prod-label {
    grid-column: 2 / 4;
    padding-left: 4px;
    text-align: left;
  }
  .ace-cart-head .ace-cart-col-price,
  .ace-cart-head .ace-cart-col-qty,
  .ace-cart-head .ace-cart-col-total,
  .ace-cart-head .ace-cart-col-action { text-align: center }

  /* Body rows: single horizontal grid */
  .ace-cart-row {
    grid-template-columns: 48px 80px 1fr 140px 120px 140px 80px !important;
    grid-template-areas: "check thumb name price qty total action" !important;
    align-items: center;
    padding: 16px 20px !important;
    gap: 0 16px !important;
  }
  .ace-cart-row:last-child { border-bottom: none !important }

  .ace-cart-col-thumb { display: flex; justify-content: center }
  .ace-cart-col-name { padding-right: 16px }
  .ace-cart-col-price {
    color: #fff !important; font-weight: 700 !important;
    text-align: center; font-size: 14px !important;
  }
  .ace-cart-col-qty {
    text-align: center; font-size: 14px !important; color: var(--text-dim) !important;
    display: flex; justify-content: center; align-items: center;
  }
  .ace-cart-col-qty strong { color: #fff; font-size: 15px }
  .ace-cart-col-total {
    text-align: center; font-size: 14px !important; color: inherit !important;
  }
  .ace-cart-col-total strong { color: var(--gold); font-size: 15px }
  .ace-cart-col-action { justify-self: center !important }

  .ace-cart-mob-label { display: none }

  .ace-cart-thumb { width: 72px; height: 72px }

  .ace-cart-name { font-size: 14px; -webkit-line-clamp: 2 }
  .ace-cart-var { font-size: 12px }

  /* Footer bar: sticky at bottom, constrained to the same 1200px the body
   * uses on desktop so it lines up with the top header instead of running
   * edge-to-edge. position:fixed escapes the body container, so center it
   * with left:50% + translateX(-50%). */
  .ace-cart-foot {
    bottom: 0 !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 100% !important;
    max-width: 1200px !important;
    padding: 18px 32px !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
  }
  .ace-cart-foot-check-label { font-size: 14px }
  .ace-cart-foot-total {
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-end;
    gap: 10px;
  }
  .ace-cart-foot-total-label { font-size: 14px }
  .ace-cart-foot-amount { font-size: 22px }
  .ace-cart-checkout-btn { padding: 14px 48px !important; font-size: 15px }

}

/* TABLET: 481-767px */
@media (min-width: 481px) and (max-width: 767px) {
  body { max-width: 700px !important }
  .cat-grid { grid-template-columns: repeat(3, 1fr) !important }
  .products,
  .woocommerce ul.products,
  .ace-products { grid-template-columns: repeat(3, 1fr) !important }
}

/* MOBILE: <=480px */
@media (max-width: 480px) {
  body { max-width: 480px !important }
}

/* ============== WILAYAH AUTOCOMPLETE DROPDOWN ============== */
.ace-ac-wrap{
  position:relative;
}
.ace-ac-search:focus{
  border-color:var(--gold,#d4af37) !important;
  outline:none !important;
}
.ace-ac-search:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.ace-ac-dropdown{
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:0;
  background:#1c1c1c;
  border:1px solid #2a2a2a;
  border-radius:10px;
  max-height:260px;
  overflow-y:auto;
  z-index:200;
  box-shadow:0 8px 24px rgba(0,0,0,.5);
}
.ace-ac-dropdown[hidden]{display:none}
.ace-ac-item{
  padding:10px 14px;
  cursor:pointer;
  color:#fff;
  font-size:13px;
  border-bottom:1px solid #2a2a2a;
  transition:background .1s;
}
.ace-ac-item:last-child{border-bottom:0}
.ace-ac-item:hover,
.ace-ac-item.is-active{
  background:rgba(212,175,55,.12);
  color:var(--gold,#d4af37);
}
.ace-ac-item .ace-ac-sub{
  color:#888;
  font-size:12px;
  margin-left:4px;
}
.ace-ac-empty{
  padding:14px;
  color:#888;
  font-size:13px;
  text-align:center;
}
/* Custom scrollbar inside dropdown so it doesn't render as a bright
 * macOS-style track on the dark surface. */
.ace-ac-dropdown::-webkit-scrollbar{width:6px}
.ace-ac-dropdown::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:3px}
.ace-ac-dropdown::-webkit-scrollbar-thumb:hover{background:#3a3a3a}

/* ============== PHONE INPUT WITH +62 PREFIX ==============
 * Composite control: a fixed `+62` badge on the left, digit-only input
 * on the right. Stored value is digits-only — server's
 * aceshop_normalize_phone() prepends 62 before persisting. */
.ace-phone-wrap{
  display:flex;
  align-items:stretch;
  background:var(--bg-3);
  border:1px solid var(--bg-3);
  border-radius:10px;
  overflow:hidden;
  transition:border-color .15s;
}
.ace-phone-wrap:focus-within{
  border-color:var(--gold,#d4af37);
}
.ace-phone-prefix{
  display:flex;
  align-items:center;
  padding:12px 12px 12px 14px;
  color:#cfcfcf;
  background:rgba(0,0,0,.25);
  border-right:1px solid #2a2a2a;
  font-size:14px;
  font-weight:600;
  letter-spacing:.3px;
  user-select:none;
  flex-shrink:0;
}
.ace-phone-input{
  flex:1;
  min-width:0;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:12px 14px !important;
  color:#fff !important;
  font-size:14px !important;
  outline:none !important;
}
.ace-phone-input::placeholder{
  color:#666;
}

/* ============== PASSWORD VISIBILITY TOGGLE ==============
 * Eye button on password inputs (register/login forms). Click swaps
 * type="password" ↔ type="text". JS handler in theme.js. */
.ace-pwd-wrap{
  position:relative;
}
.ace-pwd-toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  background:transparent;
  border:0;
  color:#888;
  cursor:pointer;
  padding:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  transition:color .15s,background .15s;
}
.ace-pwd-toggle:hover{
  color:var(--gold,#d4af37);
  background:rgba(212,175,55,.08);
}
.ace-pwd-toggle:focus-visible{
  outline:2px solid var(--gold,#d4af37);
  outline-offset:1px;
}
.ace-pwd-toggle .ace-eye-off{display:none}
.ace-pwd-toggle.is-shown .ace-eye{display:none}
.ace-pwd-toggle.is-shown .ace-eye-off{display:inline-block}
.ace-pwd-toggle.is-shown{color:var(--gold,#d4af37)}

/* ============== PIN LOKASI (ADDRESS COORDINATES) ==============
 * Card-style summary in the address form + full-screen Leaflet modal
 * for picking a coordinate. The modal is built on demand by JS and
 * mounted directly under <body>. */
.ace-geo-card{
  background:var(--bg-3);
  border:1px solid #2a2a2a;
  border-radius:10px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.ace-geo-status{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.ace-geo-label{
  font-size:13px;
  font-weight:700;
  color:#cfcfcf;
}
.ace-geo-label.is-set{color:var(--gold,#d4af37)}
.ace-geo-coords{
  font-size:12px;
  color:#cfcfcf;
  font-variant-numeric:tabular-nums;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.ace-geo-hint{
  font-size:11px;
  color:#888;
  line-height:1.4;
}
.ace-geo-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}
.ace-geo-pick,
.ace-geo-clear{
  border:1px solid #2a2a2a;
  background:rgba(212,175,55,.08);
  color:var(--gold,#d4af37);
  padding:8px 12px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.ace-geo-pick:hover{background:rgba(212,175,55,.16)}
.ace-geo-clear{
  color:#ff8a95;
  background:transparent;
  border-color:rgba(220,53,69,.4);
}
.ace-geo-clear:hover{background:rgba(220,53,69,.1)}

/* Modal — full-viewport sheet with the map filling the body. */
.ace-geo-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  flex-direction:column;
  background:var(--bg,#0a0a0a);
}
.ace-geo-modal[hidden]{display:none}
.ace-geo-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  background:var(--bg-2,#141414);
  border-bottom:1px solid #2a2a2a;
  gap:12px;
  flex-shrink:0;
}
.ace-geo-modal-title{
  font-size:15px;
  font-weight:800;
  color:#fff;
  margin:0;
}
.ace-geo-modal-close{
  background:transparent;
  border:0;
  color:#cfcfcf;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:6px 10px;
  border-radius:8px;
}
.ace-geo-modal-close:hover{background:rgba(255,255,255,.06);color:#fff}
.ace-geo-modal-search{
  padding:10px 16px;
  background:var(--bg-2,#141414);
  border-bottom:1px solid #2a2a2a;
  display:flex;
  gap:8px;
  flex-shrink:0;
}
.ace-geo-search-input{
  flex:1;
  min-width:0;
  padding:10px 12px;
  background:var(--bg-3);
  border:1px solid #2a2a2a;
  border-radius:8px;
  color:#fff;
  font-size:13px;
  outline:none;
}
.ace-geo-search-input:focus{border-color:var(--gold,#d4af37)}
.ace-geo-gps-btn{
  padding:10px 14px;
  background:rgba(212,175,55,.12);
  border:1px solid rgba(212,175,55,.4);
  border-radius:8px;
  color:var(--gold,#d4af37);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.ace-geo-gps-btn:hover{background:rgba(212,175,55,.2)}
.ace-geo-gps-btn:disabled{opacity:.55;cursor:wait}
.ace-geo-modal-body{
  flex:1;
  position:relative;
  min-height:0;
}
.ace-geo-map{
  position:absolute;
  inset:0;
  background:#1a1a1a;
}
.ace-geo-crosshair{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(0,0,0,.7);
  border:1px solid #2a2a2a;
  color:#fff;
  font-size:12px;
  font-variant-numeric:tabular-nums;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  padding:6px 12px;
  border-radius:8px;
  pointer-events:none;
  z-index:500;
  white-space:nowrap;
}
.ace-geo-modal-foot{
  display:flex;
  gap:10px;
  padding:12px 16px;
  background:var(--bg-2,#141414);
  border-top:1px solid #2a2a2a;
  flex-shrink:0;
}
.ace-geo-cancel{
  flex:1;
  padding:14px;
  background:var(--bg-3);
  color:#fff;
  border:0;
  border-radius:12px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}
.ace-geo-confirm{
  flex:2;
  padding:14px;
  background:linear-gradient(135deg,var(--gold,#d4af37),var(--gold-2,#b8941f));
  color:#000;
  border:0;
  border-radius:12px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
}
.ace-geo-confirm:disabled{opacity:.55;cursor:not-allowed}
/* Leaflet popups can collide with WP admin bar — make sure our modal
 * sits above everything including the bar. */
body.admin-bar .ace-geo-modal{top:0}
/* Tighten Leaflet's default attribution colors to match the dark theme
 * (the default white pill is jarring on black). */
.ace-geo-map .leaflet-control-attribution{
  background:rgba(0,0,0,.6) !important;
  color:#888 !important;
  font-size:10px !important;
}
.ace-geo-map .leaflet-control-attribution a{color:#cfcfcf !important}

/* ============== ADDRESS PICKER MODAL (CHECKOUT) ==============
 * Centered overlay listing all saved addresses as selectable radio
 * cards. Each card surfaces label / name / address / pin status; the
 * Confirm button commits the choice to the WC cart store. */
.ace-addr-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.ace-addr-modal-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.ace-addr-modal-panel{
  position:relative;
  background:var(--bg-2,#141414);
  border:1px solid #2a2a2a;
  border-radius:16px 16px 0 0;
  width:100%;
  max-width:520px;
  max-height:85vh;
  display:flex;
  flex-direction:column;
  box-shadow:0 -10px 40px rgba(0,0,0,.5);
  animation:aceAddrModalIn .2s ease-out;
}
@keyframes aceAddrModalIn{
  from{transform:translateY(20px);opacity:0}
  to{transform:translateY(0);opacity:1}
}
@media (min-width:640px){
  .ace-addr-modal{align-items:center;padding:20px}
  .ace-addr-modal-panel{
    border-radius:16px;
    max-height:80vh;
  }
}
.ace-addr-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid #2a2a2a;
  flex-shrink:0;
}
.ace-addr-modal-title{
  font-size:15px;
  font-weight:800;
  color:#fff;
  margin:0;
}
.ace-addr-modal-close{
  background:transparent;
  border:0;
  color:#cfcfcf;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:6px 10px;
  border-radius:8px;
}
.ace-addr-modal-close:hover{background:rgba(255,255,255,.06);color:#fff}
.ace-addr-modal-body{
  padding:14px 16px;
  overflow-y:auto;
  flex:1;
  min-height:0;
}
.ace-addr-modal-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ace-addr-modal-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  background:var(--bg-3,#1c1c1c);
  border:1.5px solid #2a2a2a;
  border-radius:12px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
}
.ace-addr-modal-item.is-active{
  border-color:var(--gold,#d4af37);
  background:rgba(212,175,55,.06);
}
.ace-addr-modal-item input[type="radio"]{
  appearance:none;-webkit-appearance:none;
  width:18px;height:18px;
  margin:2px 0 0;
  border:2px solid #2a2a2a;
  border-radius:50%;
  cursor:pointer;
  position:relative;
  flex-shrink:0;
}
.ace-addr-modal-item.is-active input[type="radio"]{
  border-color:var(--gold,#d4af37);
}
.ace-addr-modal-item.is-active input[type="radio"]::after{
  content:'';
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  width:8px;height:8px;
  border-radius:50%;
  background:var(--gold,#d4af37);
}
.ace-addr-modal-item-body{
  flex:1;
  min-width:0;
}
.ace-addr-modal-item-head{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
.ace-addr-modal-item-head strong{
  color:#fff;
  font-size:14px;
  font-weight:700;
}
.ace-addr-modal-tag{
  background:rgba(212,175,55,.15);
  color:var(--gold,#d4af37);
  font-size:10px;
  font-weight:800;
  padding:2px 7px;
  border-radius:5px;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.ace-addr-modal-default{
  background:var(--gold,#d4af37);
  color:#000;
  font-size:9px;
  font-weight:800;
  padding:2px 6px;
  border-radius:4px;
  letter-spacing:.5px;
}
.ace-addr-modal-phone{
  font-size:12px;
  color:#888;
  margin-bottom:4px;
}
.ace-addr-modal-line{
  font-size:13px;
  color:#cfcfcf;
  line-height:1.4;
}
.ace-addr-modal-pin{
  display:inline-block;
  font-size:11px;
  margin-top:8px;
  padding:3px 8px;
  border-radius:6px;
  font-weight:600;
}
.ace-addr-modal-pin.is-set{
  background:rgba(40,167,69,.15);
  color:#7ddc94;
}
.ace-addr-modal-pin.is-missing{
  background:rgba(220,53,69,.12);
  color:#ff8a95;
}
.ace-addr-modal-add{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:12px 16px;
  background:transparent;
  border:1.5px dashed #2a2a2a;
  border-radius:10px;
  color:var(--gold,#d4af37);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  transition:border-color .15s, background .15s;
}
.ace-addr-modal-add:hover{
  border-color:var(--gold,#d4af37);
  background:rgba(212,175,55,.06);
}
.ace-addr-modal-foot{
  display:flex;
  gap:10px;
  padding:14px 16px;
  border-top:1px solid #2a2a2a;
  flex-shrink:0;
}
.ace-addr-modal-cancel{
  flex:1;
  padding:14px;
  background:var(--bg-3,#1c1c1c);
  color:#fff;
  border:0;
  border-radius:12px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}
.ace-addr-modal-confirm{
  flex:2;
  padding:14px;
  background:linear-gradient(135deg,var(--gold,#d4af37),var(--gold-2,#b8941f));
  color:#000;
  border:0;
  border-radius:12px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
}


/* ============== ORDER RECEIVED / THANK YOU PAGE ==============
 * Polished layout for /checkout/order-received/. Wraps each section
 * in a card matching the rest of the dark theme; the inner WC default
 * markup keeps its semantics (so receipts/printouts still parse). */
.woocommerce-order{
  max-width:880px;
  margin:0 auto;
  padding:24px 20px 80px;
}
.woocommerce-order > p.woocommerce-thankyou-order-received,
.woocommerce-thankyou-order-received{
  font-size:22px;
  font-weight:800;
  color:#fff;
  margin:0 0 24px;
  letter-spacing:-.2px;
  line-height:1.3;
  text-align:center;
}
.woocommerce-thankyou-order-received::before{
  content:'✓';
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;height:32px;
  background:linear-gradient(135deg,var(--gold),var(--gold-2));
  color:#000;
  border-radius:50%;
  margin-right:12px;
  font-size:16px;
  font-weight:900;
  vertical-align:-6px;
}
/* Order overview — explicit 6-col grid placed by class so:
 *   row 1 = Nomor Pesanan / Tanggal / Email   (3 equal thirds)
 *   row 2 = Total / Metode Pembayaran         (2 equal halves)
 * Cell content is centered (text + label/value stack), and dashed
 * vertical dividers sit between cells in the same row. Stacks to one
 * column with horizontal dividers under 640px. */
.woocommerce-order-overview,
ul.woocommerce-thankyou-order-details{
  list-style:none;
  margin:0 0 24px;
  padding:18px 12px;
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  gap:6px 0;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
}
.woocommerce-order-overview > .order,
ul.woocommerce-thankyou-order-details > .order{   grid-column:1 / span 2; grid-row:1; }
.woocommerce-order-overview > .date,
ul.woocommerce-thankyou-order-details > .date{    grid-column:3 / span 2; grid-row:1; }
.woocommerce-order-overview > .email,
ul.woocommerce-thankyou-order-details > .email{   grid-column:5 / span 2; grid-row:1; }
.woocommerce-order-overview > .total,
ul.woocommerce-thankyou-order-details > .total{   grid-column:1 / span 3; grid-row:2; }
.woocommerce-order-overview > .method,
ul.woocommerce-thankyou-order-details > .method{  grid-column:4 / span 3; grid-row:2; }
.woocommerce-order-overview li,
ul.woocommerce-thankyou-order-details li{
  margin:0;
  padding:6px 14px;
  border:0;
  border-left:1px dashed var(--bg-3);
  font-size:13px;
  color:var(--text-dim);
  text-transform:none;
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-width:0; /* let long emails wrap/ellipsize instead of overflow */
}
/* Leftmost cell of each row — no divider on its left edge. */
.woocommerce-order-overview > .order,
.woocommerce-order-overview > .total,
ul.woocommerce-thankyou-order-details > .order,
ul.woocommerce-thankyou-order-details > .total{
  border-left:0;
}
@media (max-width:768px){
  /* Outer container — tighter side padding so the inner cards don't
   * pinch against the viewport edge on a phone. */
  .woocommerce-order{
    padding:18px 14px 60px;
  }
  /* Thank-you heading scales down + icon shrinks proportionally so the
   * line break ("Pesanan Anda telah diterima.") feels intentional. */
  .woocommerce-order > p.woocommerce-thankyou-order-received,
  .woocommerce-thankyou-order-received{
    font-size:17px;
    margin-bottom:18px;
    line-height:1.35;
  }
  .woocommerce-thankyou-order-received::before{
    width:26px;height:26px;
    font-size:13px;
    margin-right:10px;
    vertical-align:-5px;
  }
  /* Section headings (Rincian Pesanan, Alamat Pengiriman). */
  .woocommerce-order > h2,
  .woocommerce-order section > h2,
  .woocommerce-order-details > h2,
  .woocommerce-customer-details > h2{
    font-size:16px;
  }
  /* Order overview — stack as one cell per row with the label on the
   * left and the value on the right (label/value pairs read better on
   * a phone than a 3+2 grid trying to fit five fields side-by-side).
   * !important is required on grid-column / grid-row because the desktop
   * placement rules (.order, .date, .email, .total, .method) carry
   * higher specificity than `> li` and would otherwise keep their
   * 6-col positioning even at mobile widths. */
  .woocommerce-order-overview,
  ul.woocommerce-thankyou-order-details{
    grid-template-columns:1fr !important;
    padding:4px 18px !important;
    gap:0 !important;
  }
  .woocommerce-order-overview > li,
  ul.woocommerce-thankyou-order-details > li,
  .woocommerce-order-overview > .order,
  .woocommerce-order-overview > .date,
  .woocommerce-order-overview > .email,
  .woocommerce-order-overview > .total,
  .woocommerce-order-overview > .method,
  ul.woocommerce-thankyou-order-details > .order,
  ul.woocommerce-thankyou-order-details > .date,
  ul.woocommerce-thankyou-order-details > .email,
  ul.woocommerce-thankyou-order-details > .total,
  ul.woocommerce-thankyou-order-details > .method{
    grid-column:1 / -1 !important;
    grid-row:auto !important;
    flex-direction:row !important;
    justify-content:space-between !important;
    align-items:center !important;
    padding:12px 0 !important;
    border:0 !important;
    border-top:1px dashed var(--bg-3) !important;
    text-align:left !important;
  }
  .woocommerce-order-overview > li:first-child,
  ul.woocommerce-thankyou-order-details > li:first-child{
    border-top:0 !important;
  }
  .woocommerce-order-overview li strong,
  ul.woocommerce-thankyou-order-details li strong{
    margin-top:0;
    font-size:14px;
    text-align:right;
  }
  /* Order details card — tighter padding + smaller body font. The
   * card style now lives on .ace-order-details-card, so the section
   * stays paddingless and the h2 hugs the body's left edge. */
  .ace-order-details-card{
    padding:14px 16px 4px;
  }
  .woocommerce-table--order-details th,
  .woocommerce-table--order-details td{
    padding:10px 0;
    font-size:13px;
  }
  .woocommerce-order .woocommerce-order-details table.shop_table thead th,
  .woocommerce-order .woocommerce-order-details table.shop_table thead th.product-name,
  .woocommerce-order .woocommerce-order-details table.shop_table thead th.product-total,
  .woocommerce-order .woocommerce-table--order-details thead th,
  .woocommerce-order .woocommerce-table--order-details thead th.product-name,
  .woocommerce-order .woocommerce-table--order-details thead th.product-total{
    padding:6px 0 12px;
    font-size:10px !important;
    letter-spacing:1.1px;
  }
  /* Long product names should wrap softly inside the narrow td, not
   * overflow or push the price column off-screen. Add padding-bottom
   * so the third line ("WHITE × 1") doesn't sit flush against the row
   * separator and look clipped.
   *
   * Belt-and-suspenders against accidental clipping inherited from
   * other product-name rules elsewhere in the stylesheet: explicitly
   * unset line-clamp + max-height + overflow so the cell can grow
   * to fit names of any length (some products have 100+ char titles
   * with full spec sheets baked in). */
  .woocommerce-table--order-details td.product-name{
    color:#fff;
    word-break:break-word;
    overflow-wrap:anywhere;
    line-height:1.5;
    padding:12px 10px 16px 0;
    font-size:13px;
    white-space:normal;
    -webkit-line-clamp:initial;
    line-clamp:initial;
    max-height:none;
    overflow:visible;
    display:block;
  }
  /* The product name's nested <a> / <strong> can sometimes inherit
   * .ace-product-name from elsewhere — strip line-clamp there too. */
  .woocommerce-table--order-details td.product-name a,
  .woocommerce-table--order-details td.product-name strong{
    display:inline;
    -webkit-line-clamp:initial;
    line-clamp:initial;
    max-height:none;
    overflow:visible;
    white-space:normal;
  }
  .woocommerce-table--order-details td.product-name a,
  .woocommerce-table--order-details td.product-name strong,
  .woocommerce-table--order-details td.product-name .product-quantity{
    color:#fff;
    font-weight:600;
  }
  .woocommerce-table--order-details td.product-name .wc-item-meta,
  .woocommerce-table--order-details td.product-name .variation,
  .woocommerce-table--order-details td.product-name dl.variation{
    margin:4px 0 0;
    padding:0;
    list-style:none;
    font-size:12px;
    color:#cfcfcf;
  }
  .woocommerce-table--order-details td.product-name .wc-item-meta p,
  .woocommerce-table--order-details td.product-name .variation p,
  .woocommerce-table--order-details td.product-name dl.variation p{
    margin:0;
    display:inline;
  }
  .woocommerce-table--order-details td.product-total,
  .woocommerce-table--order-details td.product-quantity{
    white-space:normal;
  }
  .woocommerce-table--order-details tfoot tr:last-child th,
  .woocommerce-table--order-details tfoot tr:last-child td{
    font-size:15px;
  }
}
.woocommerce-order-overview li strong,
ul.woocommerce-thankyou-order-details li strong{
  display:block;
  margin-top:4px;
  font-size:15px;
  font-weight:800;
  color:#fff;
  text-transform:none;
  letter-spacing:0;
}
.woocommerce-order > h2,
.woocommerce-order section > h2,
.woocommerce-order-details > h2,
.woocommerce-customer-details > h2{
  font-size:18px;
  font-weight:800;
  color:var(--gold);
  margin:0 0 12px;
  letter-spacing:.2px;
  text-align:center;
}
/* Section wrapper — no box style. The h2 (Rincian Pesanan) sits at the
 * section's left edge so it aligns with the Alamat Pengiriman heading,
 * which uses the same structure (h2 outside, content inside card). The
 * dark card now lives on .ace-order-details-card around the table only. */
.woocommerce-order-details{
  background:transparent;
  border:0;
  padding:0;
  margin-bottom:24px;
}
.woocommerce-order-details > h2{margin-bottom:12px}
.ace-order-details-card{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  padding:18px 20px 4px;
}
/* The legacy .woocommerce table.shop_table rule (line ~3394) adds
 * `margin:0 16px` to every shop_table because the table used to BE
 * the card. The new layout wraps the table inside .ace-order-details-card
 * which provides its own padding, so the legacy margin doubles the
 * left/right inset and visually shifts the table content right of
 * centre. Zero it out for the nested case so the table fills the
 * card content area edge-to-edge — then card padding alone controls
 * the visual gap. */
.ace-order-details-card .woocommerce-table--order-details,
.ace-order-details-card table.woocommerce-table--order-details,
.ace-order-details-card table.shop_table{
  margin-left:0;
  margin-right:0;
}
.woocommerce-table--order-details,
table.woocommerce-table--order-details,
.woocommerce-order-details table.shop_table{
  width:100%;
  border-collapse:collapse;
  background:transparent;
  border:0;
  margin-bottom:16px;
}
.woocommerce-table--order-details th,
.woocommerce-table--order-details td{
  padding:12px 0;
  border-bottom:1px solid var(--bg-3);
  font-size:14px;
  color:#cfcfcf;
  text-align:left;
  vertical-align:top;
}
/* Distinct header style — smaller, dim, uppercase with wide tracking and
 * a thicker bottom rule so PRODUK / TOTAL read as column headers, not as
 * another data row. Centered alignment with equal font-size on both
 * cells. Specificity is boosted with `.woocommerce-order .woocommerce-
 * order-details ...` and !important on alignment + size because WC core
 * ships per-class rules (th.product-total{text-align:right}) that
 * otherwise win the cascade. */
.woocommerce-order .woocommerce-order-details table.shop_table thead th,
.woocommerce-order .woocommerce-order-details table.shop_table thead th.product-name,
.woocommerce-order .woocommerce-order-details table.shop_table thead th.product-total,
.woocommerce-order .woocommerce-table--order-details thead th,
.woocommerce-order .woocommerce-table--order-details thead th.product-name,
.woocommerce-order .woocommerce-table--order-details thead th.product-total{
  padding:8px 0 14px;
  font-size:11px !important;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:1.4px;
  color:var(--text-dim);
  border-bottom:2px solid var(--bg-3);
  background:transparent;
  text-align:center !important;
}
.woocommerce-table--order-details tfoot th{
  text-align:left;
  color:#fff;
  font-weight:700;
}
.woocommerce-table--order-details tfoot td{
  text-align:right;
  color:#fff;
  font-weight:700;
}
.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td{
  font-size:16px;
  color:var(--gold);
  border-bottom:0;
}
.woocommerce-table--order-details td.product-total,
.woocommerce-table--order-details td.product-quantity{
  text-align:right;
  white-space:nowrap;
}
/* Desktop: same safety as mobile — long product names need to wrap
 * fully without clipping. Reset any inherited line-clamp / max-height
 * from other product-name rules in this stylesheet. */
.woocommerce-table--order-details td.product-name{
  word-break:break-word;
  overflow-wrap:anywhere;
  white-space:normal;
  line-height:1.5;
  -webkit-line-clamp:initial;
  line-clamp:initial;
  max-height:none;
  overflow:visible;
  display:block;
}
.woocommerce-table--order-details td.product-name a,
.woocommerce-table--order-details td.product-name strong{
  display:inline;
  -webkit-line-clamp:initial;
  line-clamp:initial;
  max-height:none;
  overflow:visible;
  white-space:normal;
}
.woocommerce-Price-amount{color:inherit}
.woocommerce-customer-details{
  margin-top:0;
}

/* ============== VIEW ORDER — DETAIL TRANSAKSI ==============
 * Tokopedia-style stacked cards on /my-account/view-order/{id}/.
 * Each section is its own .ace-dt-card with a subtle border;
 * payment breakdown rows are flex-row label/value pairs and the
 * Total Belanja sits on top of a delineator border. */
.ace-detail-trx{ width:100%; }
.ace-detail-trx-title{
  font-size:22px;
  font-weight:800;
  color:#fff;
  margin:0 0 16px;
  letter-spacing:-.2px;
}
.ace-dt-card{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  padding:18px 20px;
  margin-bottom:14px;
}
.ace-dt-card:last-child{ margin-bottom:0; }

/* "Sisa Pembayaran" card — split-payment cash leg.
 * Subtle gold tint on the border so it stands out against the
 * default dark cards (the buyer needs to see the cash amount
 * before the kurir / store hand-off). */
.ace-dt-cash-card{
  border-color:rgba(212,175,55,.4);
  background:linear-gradient(180deg, rgba(212,175,55,.04), var(--bg-2));
}
.ace-dt-cash-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px;
}
.ace-dt-cash-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 0;
  border-bottom:1px dashed rgba(212,175,55,.2);
  font-size:14px;
}
.ace-dt-cash-row:last-child{
  border-bottom:0;
  padding-bottom:0;
}
.ace-dt-cash-row--due{
  padding-top:14px;
}
.ace-dt-cash-label{ color:var(--text-dim); }
.ace-dt-cash-amount{
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.ace-dt-cash-amount--paid{
  color:#cfcfcf;
  font-weight:600;
  text-decoration:line-through;
  text-decoration-color:rgba(255,255,255,.25);
}
.ace-dt-cash-amount--due{
  color:var(--gold);
  font-size:18px;
  font-weight:800;
}
.ace-dt-cash-tag{
  font-size:10px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:#2da24e;
  background:rgba(45,162,78,.12);
  border:1px solid rgba(45,162,78,.4);
  padding:2px 6px;
  border-radius:4px;
  text-decoration:none;
  white-space:nowrap;
}
.ace-dt-cash-note{
  margin:0;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.5;
}

/* "Refund sudah diterima" card — shows on the view-order page when
 * an admin-approved cancel/return has credited the buyer's wallet.
 * Green accent so the buyer reads "good news" at a glance, paired
 * with a CTA into the saldo page. */
.ace-dt-refund-card{
  border-color:rgba(61,220,132,.4);
  background:linear-gradient(180deg, rgba(61,220,132,.06), var(--bg-2));
}
.ace-dt-refund-row{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.ace-dt-refund-icon{
  flex:0 0 40px;
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(61,220,132,.14);
  color:#3ddc84;
}
.ace-dt-refund-body{
  flex:1;
  min-width:0;
}
.ace-dt-refund-title{
  margin:0 0 4px;
  font-size:14px;
  font-weight:800;
  color:#3ddc84;
  letter-spacing:.2px;
}
.ace-dt-refund-text{
  margin:0 0 12px;
  font-size:13px;
  color:#cfcfcf;
  line-height:1.5;
}
.ace-dt-refund-amount{
  color:#fff;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.ace-dt-refund-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  background:rgba(61,220,132,.12);
  border:1px solid rgba(61,220,132,.4);
  color:#3ddc84;
  border-radius:8px;
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  transition:background .15s, border-color .15s, color .15s;
}
.ace-dt-refund-link:hover{
  background:rgba(61,220,132,.18);
  border-color:#3ddc84;
  color:#7df0aa;
}

/* "Kode Pengambilan" card — surfaces a pickup code + QR for
 * Ambil di Toko orders once payment is confirmed. Same gold-tint
 * treatment as the cash card so the buyer recognizes both as
 * "act on this at handoff" cards. */
.ace-dt-pickup-card{
  border-color:rgba(212,175,55,.4);
  background:linear-gradient(180deg, rgba(212,175,55,.04), var(--bg-2));
}
.ace-dt-pickup-help{
  margin:0 0 16px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-dt-pickup-body{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.ace-dt-pickup-qr{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-radius:12px;
  padding:10px;
  box-shadow:0 0 0 1px rgba(212,175,55,.3);
}
.ace-dt-pickup-qr img{
  display:block;
  width:200px;
  height:200px;
  max-width:100%;
}
.ace-dt-pickup-code-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.ace-dt-pickup-code-label{
  font-size:11px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--text-dim);
  font-weight:700;
}
.ace-dt-pickup-code{
  font-size:20px;
  font-weight:800;
  color:var(--gold);
  letter-spacing:1.5px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break:break-all;
  text-align:center;
}
.ace-dt-pickup-copy{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-left:0;
  margin-top:4px;
  padding:6px 12px;
  border:1px solid var(--bg-3);
  border-radius:8px;
  background:transparent;
  color:var(--text-dim);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s, color .15s;
}
.ace-dt-pickup-copy:hover{
  border-color:var(--gold);
  color:var(--gold);
  background:transparent;
}
.ace-dt-pickup-copy.is-copied{
  color:#3ddc84;
  border-color:rgba(61,220,132,.4);
}
@media (min-width: 768px){
  .ace-dt-pickup-body{
    flex-direction:row;
    justify-content:center;
    gap:28px;
  }
  .ace-dt-pickup-code-wrap{
    align-items:flex-start;
  }
  .ace-dt-pickup-code{
    text-align:left;
  }
}

/* "Tindakan Pesanan" card — buyer-initiated cancel/return actions.
 * Three visible variants depending on order status; the modals that
 * collect a reason for cancel-request / return-request live below. */
.ace-dt-action-help{
  margin:0 0 14px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-dt-action-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:46px;
  border:1px solid transparent;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  transition:filter .15s, opacity .15s;
}
.ace-dt-action-btn:hover{ filter:brightness(1.08); }
.ace-dt-action-btn:active{ filter:brightness(.95); }
.ace-dt-action-btn--danger{
  background:#ef4444;
  color:#fff;
}
.ace-dt-action-btn--warn{
  background:transparent;
  color:#f59e0b;
  border-color:rgba(245,158,11,.5);
}
.ace-dt-action-btn--warn:hover{
  background:rgba(245,158,11,.08);
  border-color:#f59e0b;
}
/* Pending-state UI when buyer has already submitted a request and is
 * waiting on admin review. Subtle gold border + dot animation so the
 * buyer's eye lands here on revisit without it screaming for action. */
.ace-dt-action-pending{
  border:1px solid rgba(212,175,55,.35);
  background:rgba(212,175,55,.06);
  border-radius:10px;
  padding:14px;
}
.ace-dt-action-pending-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
  font-size:14px;
  color:var(--gold);
}
.ace-dt-action-pending-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 0 0 rgba(212,175,55,.6);
  animation:ace-pending-pulse 1.6s ease-out infinite;
}
@keyframes ace-pending-pulse{
  0%   { box-shadow:0 0 0 0 rgba(212,175,55,.55); }
  70%  { box-shadow:0 0 0 8px rgba(212,175,55,0);  }
  100% { box-shadow:0 0 0 0 rgba(212,175,55,0);    }
}
.ace-dt-action-pending-text{
  margin:0 0 10px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-dt-action-reason{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px 12px;
  background:var(--bg);
  border-radius:8px;
  font-size:13px;
}
.ace-dt-action-reason-label{
  color:var(--text-dim);
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  font-weight:700;
}
.ace-dt-action-reason-text{
  color:#fff;
  white-space:pre-wrap;
  word-break:break-word;
}
/* Admin's rejection reason gets a slightly stronger frame so the
 * buyer's eye lands on it before their own (echoed) reason. */
.ace-dt-action-reason--admin{
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.08);
}
.ace-dt-action-reason--admin .ace-dt-action-reason-label{
  color:#fca5a5;
}

/* Rejected-state UI — admin has declined the buyer's request. Red
 * accent (vs gold for pending) and no pulse animation; the state
 * is terminal, not waiting for anything. Action button is
 * suppressed at the template level so the buyer can't resubmit. */
.ace-dt-action-rejected{
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.06);
  border-radius:10px;
  padding:14px;
}
.ace-dt-action-rejected-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
  font-size:14px;
  color:#f87171;
}
.ace-dt-action-rejected-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#f87171;
}
.ace-dt-action-rejected-when{
  margin:0 0 10px 28px;
  font-size:12px;
  color:var(--text-dim);
}
.ace-dt-action-rejected-note{
  margin:10px 0 0;
  font-size:12px;
  color:var(--text-dim);
  line-height:1.5;
}

/* Photo evidence grid — used by both pending and rejected return
 * cards. Square thumbnails in a 5-column row, falling to fewer
 * columns on narrow widths. Click opens the full image in a new tab. */
.ace-dt-action-photos{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.ace-dt-action-photos-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:6px;
}
@media (max-width:480px){
  .ace-dt-action-photos-grid{ grid-template-columns:repeat(3, 1fr); }
}
.ace-dt-action-photo{
  display:block;
  aspect-ratio:1;
  overflow:hidden;
  border-radius:6px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
}
.ace-dt-action-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Return-modal photo uploader. Inline + scoped so the buyer can
 * see the count and limits at a glance. Tiles render in the same
 * grid as the [+ Tambah Foto] button so adding/removing reflows
 * cleanly. */
.ace-return-photos{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}
.ace-return-photos-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:4px;
}
.ace-return-photos-title{
  font-size:13px;
  font-weight:600;
  color:#fff;
}
.ace-return-photos-req{ color:#f87171; margin-left:2px; }
.ace-return-photos-counter{
  font-size:12px;
  color:var(--text-dim);
}
.ace-return-photos-hint{
  margin:0 0 8px;
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.45;
}
.ace-return-photos-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:6px;
}
@media (max-width:480px){
  .ace-return-photos-grid{ grid-template-columns:repeat(3, 1fr); }
}
.ace-return-photos-tile{
  position:relative;
  aspect-ratio:1;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  overflow:hidden;
}
.ace-return-photos-tile img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ace-return-photos-remove{
  position:absolute;
  top:4px;
  right:4px;
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.7);
  border:0;
  border-radius:50%;
  color:#fff;
  cursor:pointer;
  padding:0;
  transition:background .15s;
}
.ace-return-photos-remove:hover{ background:rgba(220,38,38,.85); }
.ace-return-photos-add{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  aspect-ratio:1;
  background:rgba(255,255,255,.03);
  border:1.5px dashed rgba(255,255,255,.18);
  border-radius:6px;
  color:var(--text-dim);
  cursor:pointer;
  font-size:11px;
  text-align:center;
  padding:4px;
  transition:border-color .15s, background .15s, color .15s;
}
.ace-return-photos-add:hover:not(:disabled){
  border-color:var(--gold);
  color:var(--gold);
  background:rgba(212,175,55,.05);
}
.ace-return-photos-add:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.ace-return-photos-add-icon{ display:inline-flex; }
.ace-return-photos-add-label{ line-height:1.2; }
.ace-return-photos-error{
  margin:8px 0 0;
  font-size:12px;
  color:#fca5a5;
}

/* ===== Retur shipping card + rates picker =====
 * Surfaced on view-order when status = proses-retur. Visual idiom
 * matches the existing pending/rejected request cards (gold accent,
 * subtle border). The summary section (after a courier is picked)
 * leans on the same "label · value" rows the shipping-info card uses. */
.ace-retur-ship-card .ace-dt-action-help{
  margin-bottom:10px;
}
.ace-retur-ship-summary{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px;
  background:rgba(212,175,55,.05);
  border:1px solid rgba(212,175,55,.25);
  border-radius:8px;
  margin-bottom:10px;
}
.ace-retur-ship-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:13px;
}
.ace-retur-ship-label{ color:var(--text-dim); }
.ace-retur-ship-value{ color:#fff; text-align:right; }
.ace-retur-ship-line--price{
  border-top:1px dashed rgba(255,255,255,.08);
  padding-top:8px;
  margin-top:2px;
}
.ace-retur-ship-price{
  color:var(--gold);
  font-size:15px;
}
/* Footnote under the ongkir line — clarifies that the price
 * shown is a deduction-from-refund, not a fee owed up front. */
.ace-retur-fee-note{
  margin:8px 0 0;
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.5;
  font-style:italic;
}
/* Error variant of the paid-summary card (Biteship rejected the
 * retur order). Red accent so the buyer notices immediately. */
.ace-retur-paid-summary--err{
  background:rgba(239,68,68,.06);
  border-color:rgba(239,68,68,.3);
}
.ace-retur-paid-summary--err .ace-retur-paid-head{
  color:#fca5a5;
}

/* ===== Konfirmasi Selesai modals (orders page) =====
 * Re-uses the .ace-action-modal scaffolding from the retur flow.
 * Adds a warning callout for the pending-retur case + the star
 * rating widget + a minimal product list. */
.ace-confirm-warn{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:10px 12px;
  background:rgba(239,68,68,.08);
  border:1px solid rgba(239,68,68,.3);
  border-radius:8px;
  font-size:12.5px;
  color:#fca5a5;
  line-height:1.5;
  margin-top:12px;
}
.ace-confirm-warn svg{ flex:0 0 auto; margin-top:2px; }

/* Star rating — gold fill on click + on hover. Hover preview is
 * decoupled from the actual selection so the buyer can wiggle
 * their cursor without losing what they already picked. */
.ace-rate-stars{
  display:flex;
  justify-content:center;
  gap:6px;
  padding:14px 0;
  margin:8px 0;
}
.ace-rate-star{
  background:transparent;
  border:0;
  padding:4px;
  cursor:pointer;
  display:inline-flex;
}
.ace-rate-star svg{
  fill:rgba(255,255,255,.12);
  stroke:rgba(255,255,255,.28);
  stroke-width:1.5;
  transition:fill .15s, stroke .15s, transform .15s;
}
.ace-rate-star:hover svg{ transform:scale(1.08); }
.ace-rate-star.is-on svg,
.ace-rate-star.is-hover svg{
  fill:var(--gold);
  stroke:var(--gold);
}

.ace-rate-comment{
  width:100%;
  padding:10px 12px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  color:#fff;
  font-size:13px;
  font-family:inherit;
  resize:vertical;
  min-height:90px;
  box-sizing:border-box;
}
.ace-rate-comment:focus{
  outline:none;
  border-color:var(--gold);
}

/* Photo uploader inside the post-confirmation review modal. Mirrors
 * the inline review form on view-order — append-on-pick file list
 * with × per tile to remove individual photos. */
.ace-rate-photos{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  align-items:flex-start;
}
.ace-rate-photo-add{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px dashed rgba(255,255,255,.15);
  border-radius:8px;
  background:var(--bg);
  color:#9aa0a6;
  cursor:pointer;
  font-size:12px;
  transition:border-color .15s,color .15s;
}
.ace-rate-photo-add:hover{
  border-color:var(--gold);
  color:var(--gold);
}
.ace-rate-photo-add svg{flex-shrink:0}
.ace-rate-photo-counter{
  font-size:11px;
  opacity:.7;
  font-weight:600;
  margin-left:4px;
}
.ace-rate-photo-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ace-rate-photo-tile{
  position:relative;
  width:64px;
  height:64px;
  border-radius:8px;
  overflow:hidden;
  background:var(--bg-2);
  border:1px solid rgba(255,255,255,.08);
}
.ace-rate-photo-tile img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ace-rate-photo-rm{
  position:absolute;
  top:2px;
  right:2px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(0,0,0,.7);
  color:#fff;
  border:none;
  cursor:pointer;
  font-size:14px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.ace-rate-photo-rm:hover{background:#ef4444}

/* Product thumbnails strip — small icons + name to remind buyer
 * what they're rating. Wraps if order has many items. */
.ace-rate-products{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.ace-rate-product{
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 10px 5px 5px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  font-size:11.5px;
  color:#fff;
  max-width:100%;
}
.ace-rate-product img{
  width:24px;
  height:24px;
  border-radius:50%;
  object-fit:cover;
  background:#fff;
  flex:0 0 auto;
}
.ace-rate-product span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:140px;
}
.ace-retur-pay-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.ace-retur-change-link{
  display:inline-block;
  margin-top:8px;
  background:transparent;
  border:0;
  color:var(--text-dim);
  font-size:12px;
  text-decoration:underline;
  cursor:pointer;
  padding:4px 0;
}
.ace-retur-change-link:hover{ color:var(--gold); }

/* Rates picker modal — built on .ace-action-modal so it inherits the
 * overlay/center-flex/backdrop machinery. The body shows loading /
 * error / list / empty depending on AJAX state. */
.ace-retur-rates-loading,
.ace-retur-rates-error,
.ace-retur-rates-empty{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:24px 12px;
  color:var(--text-dim);
  font-size:13px;
}
/* Each state container has its own display: rule so the bare
 * [hidden] attribute (which only sets display:none at low
 * specificity) gets overridden. Force [hidden] back into a
 * matching specificity so setState() can actually flip them. */
[data-ace-retur-state][hidden]{ display:none; }
.ace-retur-rates-spinner{
  width:32px;
  height:32px;
  border:3px solid rgba(255,255,255,.1);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:ace-retur-spin 0.8s linear infinite;
}
@keyframes ace-retur-spin{ to { transform:rotate(360deg); } }
.ace-retur-rates-error-msg{
  text-align:center;
  margin:0;
  color:#fca5a5;
}
.ace-retur-rates-retry{
  background:transparent;
  border:1px solid rgba(212,175,55,.4);
  color:var(--gold);
  border-radius:6px;
  padding:6px 14px;
  font-size:12px;
  cursor:pointer;
}
.ace-retur-rates-retry:hover{
  background:rgba(212,175,55,.08);
  border-color:var(--gold);
}
.ace-retur-rates-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:50vh;
  overflow-y:auto;
}

/* Origin → destination header above the rates list. Compact two-
 * column layout with an arrow separator so the buyer immediately
 * sees "from my address → to toko". */
.ace-retur-route{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap:10px;
  align-items:start;
  margin-bottom:14px;
  padding:12px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
}
.ace-retur-route-col{
  min-width:0;
}
.ace-retur-route-label{
  display:block;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.5px;
  color:var(--gold);
  text-transform:uppercase;
  margin-bottom:3px;
}
.ace-retur-route-name{
  display:block;
  font-size:12.5px;
  color:#fff;
  font-weight:600;
  margin-bottom:1px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ace-retur-route-addr{
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.45;
  word-break:break-word;
}
.ace-retur-route-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--gold);
  padding-top:18px;
}

/* Tier section — REGULER / EKONOMI / KARGO. Same look as the
 * checkout courier list (.ace-courier-tier). */
.ace-retur-tier-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
  padding:0 2px;
}
.ace-retur-tier-name{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.6px;
  color:var(--gold);
  text-transform:uppercase;
}
.ace-retur-tier-range{
  font-size:11.5px;
  font-weight:700;
  color:var(--gold);
}
.ace-retur-tier-rows{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* Resume-pay hint — when buyer started Tripay but didn't finish,
 * a smaller note tells them they can either continue or pick a
 * fresh method. */
.ace-retur-resume-hint{
  margin:8px 0 12px;
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.45;
}

/* Paid summary card — green-ish accent (we re-use --gold for now
 * for theme consistency; success state is signaled by the check
 * icon + title). Resi number gets a copyable mono-font badge. */
.ace-retur-paid-summary{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px 14px;
  background:rgba(34,197,94,.06);
  border:1px solid rgba(34,197,94,.3);
  border-radius:8px;
}
.ace-retur-paid-head{
  display:flex;
  align-items:center;
  gap:8px;
  color:#86efac;
  font-size:14px;
}
.ace-retur-paid-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ace-retur-resi-num{
  font-family:'Menlo','Monaco','Consolas',monospace;
  font-size:13px;
  font-weight:700;
  letter-spacing:.4px;
  color:#fff;
  background:var(--bg);
  padding:3px 8px;
  border-radius:4px;
  margin-right:6px;
}
.ace-retur-paid-instructions{
  margin:6px 0 0;
  font-size:12px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-retur-paid-error{
  margin:6px 0 0;
  font-size:12px;
  color:#fca5a5;
  line-height:1.5;
}

/* Channel picker modal — vertical group of "Virtual Account /
 * E-Wallet / QRIS" sections, each with radio rows. Same hover/
 * checked styling as the rate rows for visual continuity. */
.ace-retur-channels{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:50vh;
  overflow-y:auto;
}
.ace-retur-channel-group{}
.ace-retur-channel-group-name{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.6px;
  color:var(--gold);
  text-transform:uppercase;
  margin-bottom:6px;
  padding:0 2px;
}
.ace-retur-channel-rows{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.ace-retur-channel-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
}
.ace-retur-channel-row:hover{
  border-color:rgba(212,175,55,.4);
  background:rgba(212,175,55,.04);
}
.ace-retur-channel-row.is-checked{
  border-color:var(--gold);
  background:rgba(212,175,55,.08);
}
.ace-retur-channel-row input[type="radio"]{
  margin:0;
  flex:0 0 auto;
  accent-color:var(--gold);
}
.ace-retur-channel-icon{
  flex:0 0 auto;
  width:36px;
  height:24px;
  object-fit:contain;
  background:#fff;
  border-radius:3px;
  padding:2px 4px;
}
.ace-retur-channel-label{
  flex:1 1 auto;
  font-size:13px;
  color:#fff;
}
.ace-retur-channels-empty{
  text-align:center;
  padding:24px 12px;
  color:#fca5a5;
  font-size:13px;
  margin:0;
}
/* Current-channel marker on the change-method modal — disabled
 * radio + dim row + "(saat ini)" badge so the buyer can see what
 * they're already on but can't pick it again. */
.ace-retur-channel-row.is-current{
  opacity:.55;
  cursor:not-allowed;
}
.ace-retur-channel-row.is-current input[type="radio"]{ cursor:not-allowed; }
.ace-tripay-channel-current{
  font-size:11px;
  color:var(--gold);
  margin-left:6px;
  font-weight:500;
}

/* ===== Inline Tripay payment-instructions card =====
 * Surfaced on view-order when buyer has clicked "Bayar Ongkir Retur"
 * but hasn't completed the payment. Renders the QR / VA number /
 * store pay code natively inside the ACE SHOP card system so the
 * buyer never sees Tripay's hosted page. */
.ace-retur-pay-card{
  border:1px solid rgba(212,175,55,.4);
}
.ace-retur-pay-channel{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  margin-bottom:12px;
}
.ace-retur-pay-channel-icon{
  width:44px;
  height:32px;
  object-fit:contain;
  background:#fff;
  border-radius:4px;
  padding:3px 6px;
  flex:0 0 auto;
}
.ace-retur-pay-channel-info{ flex:1 1 auto; min-width:0; }
.ace-retur-pay-channel-name{
  font-size:14px;
  color:#fff;
  font-weight:600;
}
.ace-retur-pay-expiry{
  font-size:11.5px;
  color:#fca5a5;
  margin-top:2px;
}
.ace-retur-pay-amount{
  flex:0 0 auto;
  text-align:right;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.ace-retur-pay-amount-label{
  font-size:10.5px;
  color:var(--text-dim);
  text-transform:uppercase;
  letter-spacing:.4px;
}
.ace-retur-pay-amount strong{
  color:var(--gold);
  font-size:15px;
}

/* QRIS QR display — compact white card centered in the page so
 * the QR doesn't dominate desktop view. The image itself is
 * capped tighter than the card so the white quiet-zone around the
 * code stays generous (banking-app cameras need that border). */
.ace-retur-pay-qr{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:14px;
  background:#fff;
  border-radius:10px;
  margin:0 auto 12px;
  width:100%;
  max-width:280px;
  box-sizing:border-box;
}
.ace-retur-pay-qr-img,
.ace-retur-pay-card .ace-retur-pay-qr-img{
  width:100%;
  max-width:220px;
  height:auto;
  display:block;
}
.ace-retur-pay-qr-note{
  margin:0;
  font-size:11px;
  color:#333;
  text-align:center;
  max-width:240px;
  line-height:1.45;
}

/* VA / store pay code — mono-font card with copy button. */
.ace-retur-pay-paycode{
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  padding:12px 14px;
  margin-bottom:12px;
}
.ace-retur-pay-paycode-label{
  display:block;
  font-size:10.5px;
  color:var(--text-dim);
  letter-spacing:.5px;
  text-transform:uppercase;
  margin-bottom:6px;
}
.ace-retur-pay-paycode-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.ace-retur-pay-paycode-num{
  flex:1 1 auto;
  font-family:'Menlo','Monaco','Consolas',monospace;
  font-size:16px;
  font-weight:700;
  letter-spacing:.5px;
  color:#fff;
  word-break:break-all;
}

/* Per-channel "How to pay" instruction list — collapsed by default
 * via <details>; buyer clicks to expand. */
.ace-retur-pay-instr-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}
.ace-retur-pay-instr-item{
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  padding:8px 12px;
}
.ace-retur-pay-instr-item summary{
  cursor:pointer;
  font-size:12.5px;
  color:#fff;
  font-weight:500;
  list-style:none;
}
.ace-retur-pay-instr-item summary::-webkit-details-marker{ display:none; }
.ace-retur-pay-instr-item summary::after{
  content:'+';
  float:right;
  color:var(--gold);
  font-weight:700;
}
.ace-retur-pay-instr-item[open] summary::after{ content:'−'; }
.ace-retur-pay-instr-item ol{
  margin:8px 0 0;
  padding-left:22px;
  font-size:12px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-retur-pay-instr-item ol li{ margin-bottom:4px; }

/* Foot — fallback to Tripay-hosted + manual refresh. */
.ace-retur-pay-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.06);
}
.ace-retur-pay-foot-hint{
  font-size:11.5px;
  color:var(--text-dim);
  line-height:1.45;
  flex:1 1 auto;
  min-width:0;
}
/* Legacy ace-retur-pay-fallback styling kept in case any cached
 * page still references it; harmless if unused. */
.ace-retur-pay-fallback{
  font-size:11.5px;
  color:var(--text-dim);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.ace-retur-pay-fallback:hover{ color:var(--gold); }
.ace-retur-pay-refresh{
  background:transparent;
  border:1px solid rgba(212,175,55,.4);
  color:var(--gold);
  border-radius:6px;
  padding:6px 14px;
  font-size:12px;
  cursor:pointer;
  transition:background .15s, border-color .15s;
}
.ace-retur-pay-refresh:hover{
  background:rgba(212,175,55,.08);
  border-color:var(--gold);
}
.ace-retur-rate-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  background:var(--bg);
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
}
.ace-retur-rate-row:hover{
  border-color:rgba(212,175,55,.4);
  background:rgba(212,175,55,.04);
}
.ace-retur-rate-row.is-checked{
  border-color:var(--gold);
  background:rgba(212,175,55,.08);
}
.ace-retur-rate-row input[type="radio"]{
  margin:0;
  flex:0 0 auto;
  accent-color:var(--gold);
}
.ace-retur-rate-info{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.ace-retur-rate-name{
  font-size:13px;
  color:#fff;
  font-weight:500;
}
.ace-retur-rate-dur{
  font-size:11.5px;
  color:var(--text-dim);
}
.ace-retur-rate-price{
  flex:0 0 auto;
  font-size:14px;
  font-weight:700;
  color:var(--gold);
}

/* Reason-modal (cancel request / return request). Same overlay shape
 * as the leave-checkout modal but with a textarea + submit form. */
.ace-action-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.ace-action-modal[hidden]{ display:none; }
.ace-action-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.65);
  backdrop-filter:blur(2px);
}
.ace-action-panel{
  position:relative;
  width:100%;
  max-width:440px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.4);
  overflow:hidden;
  margin:0;
}
.ace-action-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--bg-3);
}
.ace-action-title{
  margin:0;
  font-size:16px;
  font-weight:800;
  color:#fff;
}
.ace-action-close{
  background:transparent;
  border:0;
  padding:6px;
  margin:-6px;
  color:var(--text-dim);
  cursor:pointer;
  border-radius:6px;
  transition:color .15s, background .15s;
}
.ace-action-close:hover{ color:#fff; background:var(--bg-3); }
.ace-action-body{
  padding:18px;
}
.ace-action-intro{
  margin:0 0 14px;
  font-size:13px;
  color:var(--text-dim);
  line-height:1.5;
}
.ace-action-label{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:700;
  color:#cfcfcf;
  letter-spacing:.3px;
}
.ace-action-textarea{
  width:100%;
  background:var(--bg);
  border:1px solid var(--bg-3);
  border-radius:8px;
  padding:10px 12px;
  color:#fff;
  font-size:14px;
  font-family:inherit;
  resize:vertical;
  min-height:90px;
  transition:border-color .15s;
}
.ace-action-textarea:focus{
  outline:none;
  border-color:var(--gold);
}
.ace-action-foot{
  display:flex;
  gap:10px;
  padding:14px 18px 18px;
  border-top:1px solid var(--bg-3);
}
.ace-action-btn-modal{
  flex:1;
  height:42px;
  border:1px solid transparent;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:filter .15s, background .15s;
}
.ace-action-btn-modal--ghost{
  background:transparent;
  color:#cfcfcf;
  border-color:var(--bg-3);
}
.ace-action-btn-modal--ghost:hover{ background:var(--bg-3); color:#fff; }
.ace-action-btn-modal--primary{
  background:var(--gold);
  color:#1a1a1a;
}
.ace-action-btn-modal--primary:hover{ filter:brightness(1.08); }

/* Reason picker — radio "cards" + a Lainnya escape hatch with a
 * textarea that slides in when picked. Pattern reused by both the
 * cancel and return modals; the JS handler picks up every group
 * via [data-ace-reason-group] so adding a third modal is a no-
 * markup-change affair. */
.ace-reason-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ace-reason-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 14px;
  background:var(--bg);
  border:1px solid var(--bg-3);
  border-radius:10px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
  position:relative;
}
.ace-reason-option:hover{
  border-color:rgba(212,175,55,.5);
}
.ace-reason-option input[type="radio"]{
  /* Hide the native radio — the row IS the radio, with a check
   * icon on the right when picked. Keeps focus accessible via
   * keyboard since the input still receives focus. */
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.ace-reason-label{
  flex:1;
  font-size:14px;
  color:#fff;
  font-weight:500;
}
.ace-reason-check{
  flex:0 0 22px;
  width:22px;
  height:22px;
  border-radius:50%;
  border:1.5px solid var(--bg-3);
  display:flex;
  align-items:center;
  justify-content:center;
  color:transparent;
  transition:background .15s, border-color .15s, color .15s;
}
.ace-reason-option.is-checked,
.ace-reason-option:has(input:checked){
  border-color:var(--gold);
  background:rgba(212,175,55,.06);
}
.ace-reason-option.is-checked .ace-reason-check,
.ace-reason-option:has(input:checked) .ace-reason-check{
  background:var(--gold);
  border-color:var(--gold);
  color:#1a1a1a;
}
/* Keyboard focus ring on the row when its hidden radio is focused. */
.ace-reason-option:has(input:focus-visible){
  outline:2px solid var(--gold);
  outline-offset:1px;
}
.ace-reason-other-wrap{
  margin-top:4px;
}
.ace-reason-other-wrap[hidden]{ display:none; }
.ace-reason-other-input{
  width:100%;
  background:var(--bg) !important;
}

/* Bank-name combobox (saldo → atur rekening modal). The input
 * itself is read-only — the dropdown's search box is the only
 * editable field, so the user can't type a freeform bank name
 * that won't map to one of our bundled logos. */
.ace-bank-combo{
  position:relative;
}
.ace-bank-combo-input-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--bg);
  border:1px solid var(--bg-3);
  border-radius:8px;
  padding:0 12px;
  transition:border-color .15s;
  cursor:pointer;
}
.ace-bank-combo.is-open .ace-bank-combo-input-wrap,
.ace-bank-combo-input-wrap:hover{
  border-color:var(--gold);
}
.ace-bank-combo-icon{
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:6px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px;
  overflow:hidden;
}
.ace-bank-combo-icon[hidden]{ display:none; }
.ace-bank-combo-icon img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.ace-bank-combo-input{
  flex:1;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  height:42px !important;
  color:#fff !important;
  font-size:14px !important;
  cursor:pointer;
  outline:none !important;
}
.ace-bank-combo-input:focus{ outline:none !important; }
.ace-bank-combo-chevron{
  flex:0 0 14px;
  color:var(--text-dim);
  transition:transform .15s, color .15s;
}
.ace-bank-combo.is-open .ace-bank-combo-chevron{
  transform:rotate(180deg);
  color:var(--gold);
}
/* Dropdown panel — opens below the input, scrolls when the bank
 * list overflows the modal's body. */
.ace-bank-combo-dropdown{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:10;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  max-height:280px;
  overflow:hidden;
}
.ace-bank-combo-dropdown[hidden]{ display:none; }
.ace-bank-combo-search-wrap{
  padding:8px;
  border-bottom:1px solid var(--bg-3);
}
.ace-bank-combo-search{
  width:100%;
  height:36px;
  background:var(--bg);
  border:1px solid var(--bg-3);
  border-radius:8px;
  padding:0 10px;
  color:#fff;
  font-size:13px;
  outline:none;
  transition:border-color .15s;
}
.ace-bank-combo-search:focus{ border-color:var(--gold); }
.ace-bank-combo-list{
  flex:1;
  overflow-y:auto;
  padding:4px;
  scrollbar-width:thin;
}
.ace-bank-combo-option{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:8px;
  background:transparent;
  border:0;
  border-radius:8px;
  cursor:pointer;
  text-align:left;
  color:#fff;
  font-size:13px;
  transition:background .12s;
}
.ace-bank-combo-option[hidden]{ display:none; }
.ace-bank-combo-option:hover,
.ace-bank-combo-option:focus{
  background:var(--bg-3);
  outline:none;
}
.ace-bank-combo-option-icon{
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:6px;
  background:#fff;
  object-fit:contain;
  padding:3px;
}
.ace-bank-combo-option-name{
  flex:1;
  font-weight:600;
}
.ace-bank-combo-empty{
  padding:18px 12px;
  text-align:center;
  font-size:13px;
  color:var(--text-dim);
}

/* Withdrawal amount field — text input (no number-spinner arrows)
 * with a "Tarik Semua" suffix button that fills the field with the
 * full available balance in one tap. The wrap is a flex row so the
 * button hugs the right edge regardless of input width. */
.ace-withdraw-input-wrap{
  display:flex;
  align-items:stretch;
  gap:0;
  height:44px;
  background:var(--bg);
  border:1px solid var(--bg-3);
  border-radius:8px;
  overflow:hidden;
  transition:border-color .15s;
}
.ace-withdraw-input-wrap:focus-within{
  border-color:var(--gold);
}
.ace-withdraw-prefix{
  display:flex;
  align-items:center;
  padding:0 2px 0 12px;
  color:#cfcfcf;
  font-size:14px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  pointer-events:none;
  user-select:none;
}
.ace-withdraw-input{
  flex:1;
  min-width:0;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  /* Less left padding because the Rp prefix occupies that space. */
  padding:0 12px 0 6px !important;
  height:100% !important;
  /* Override the .ace-action-textarea base (90px), which only made
   * sense for the actual textareas in the cancel/return modals. */
  min-height:0 !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  letter-spacing:.2px;
  text-align:left;
  outline:none !important;
  /* Belt-and-braces against accidental type=number rendering — kills
   * the spinner arrows even if a future change flips the input back
   * to type=number. */
  -moz-appearance:textfield;
}
.ace-withdraw-input::-webkit-outer-spin-button,
.ace-withdraw-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.ace-withdraw-max-btn{
  flex:0 0 auto;
  padding:0 14px;
  background:rgba(212,175,55,.12);
  border:0;
  border-left:1px solid var(--bg-3);
  color:var(--gold);
  font-size:12px;
  font-weight:800;
  letter-spacing:.3px;
  text-transform:uppercase;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s, color .15s;
}
.ace-withdraw-max-btn:hover{
  background:rgba(212,175,55,.22);
  color:#ffe184;
}
.ace-withdraw-max-btn:active{
  background:rgba(212,175,55,.3);
}

/* Status block */
.ace-dt-status-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid var(--bg-3);
}
.ace-dt-status-text{
  font-size:16px;
  font-weight:800;
  color:#fff;
  margin:0;
}
.ace-dt-status-dot{
  width:10px;height:10px;
  border-radius:50%;
  flex-shrink:0;
}
.ace-dt-dot-success{ background:#3ddc84; }
.ace-dt-dot-ongoing{ background:var(--gold); }
.ace-dt-dot-failed{  background:#ff6b6b; }
.ace-dt-meta-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ace-dt-meta-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  font-size:13px;
}
.ace-dt-meta-label{ color:var(--text-dim); }
.ace-dt-meta-value{ color:#fff; font-weight:600; text-align:right; }
.ace-dt-meta-num{ color:var(--gold); font-weight:700; }

/* Section heading inside cards */
.ace-dt-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid var(--bg-3);
}
.ace-dt-section-title{
  font-size:15px;
  font-weight:800;
  color:#fff;
  margin:0;
}

/* Detail Produk row */
.ace-dt-product-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:10px 0;
}
.ace-dt-product-row + .ace-dt-product-row{
  border-top:1px solid var(--bg-3);
  padding-top:14px;
  margin-top:4px;
}
.ace-dt-product-thumb{
  width:64px;
  height:64px;
  border-radius:10px;
  overflow:hidden;
  background:var(--bg-3);
  flex-shrink:0;
}
.ace-dt-product-thumb img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.ace-dt-product-info{ flex:1; min-width:0; }
.ace-dt-product-name{
  font-size:14px;
  font-weight:700;
  color:#fff;
  margin-bottom:2px;
  line-height:1.4;
}
.ace-dt-product-var{ font-size:12px; color:var(--text-dim); margin-bottom:4px; }
.ace-dt-product-qty{ font-size:13px; color:#cfcfcf; }

/* Outline button (Beli Lagi) */
.ace-dt-btn-outline{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  color:var(--gold);
  background:transparent;
  border:1px solid var(--gold);
  border-radius:8px;
  padding:8px 18px;
  text-decoration:none;
  flex-shrink:0;
  transition:.15s;
}
.ace-dt-btn-outline:hover{ background:rgba(212,175,55,.12); }

/* Info Pengiriman row */
.ace-dt-shipping{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.ace-dt-row{
  display:grid;
  grid-template-columns:90px auto 1fr;
  gap:12px;
  font-size:13px;
  align-items:flex-start;
  line-height:1.5;
}
.ace-dt-row-label{ color:var(--text-dim); }
.ace-dt-row-sep{ color:var(--text-dim); }
.ace-dt-row-value{ color:#fff; }
.ace-dt-row-addr .ace-dt-addr-name{ font-weight:700; color:#fff; }
.ace-dt-row-addr .ace-dt-addr-phone{ color:#cfcfcf; margin-top:2px; }
.ace-dt-row-addr .ace-dt-addr-body{ color:#cfcfcf; margin-top:2px; }
.ace-dt-resi{ font-family:ui-monospace,Menlo,Monaco,monospace; font-weight:700; }
.ace-dt-resi-empty{
  color:var(--text-dim);
  font-style:italic;
  font-size:13px;
}
.ace-dt-copy-btn{
  background:transparent;
  border:0;
  color:var(--text-dim);
  cursor:pointer;
  padding:2px 6px;
  margin-left:6px;
  vertical-align:middle;
  border-radius:4px;
  transition:.15s;
}
.ace-dt-copy-btn:hover{ color:var(--gold); background:var(--bg-3); }
.ace-dt-copy-btn.is-copied{ color:#3ddc84; }

/* Rincian Pembayaran rows */
.ace-dt-payment{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ace-dt-pay-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
}
.ace-dt-pay-label{ color:var(--text-dim); }
.ace-dt-pay-value{ color:#fff; font-weight:600; }
.ace-dt-pay-total{
  margin-top:6px;
  padding-top:14px;
  border-top:1px solid var(--bg-3);
  font-size:15px;
  font-weight:800;
}
.ace-dt-pay-total .ace-dt-pay-label{ color:#fff; font-weight:800; }
.ace-dt-pay-total .ace-dt-pay-value{ color:var(--gold); font-weight:800; }

/* Mobile pass — narrow cards, smaller fonts, address row stacks. */
@media (max-width:640px){
  .ace-detail-trx-title{ font-size:18px; margin-bottom:12px; }
  .ace-dt-card{ padding:14px 16px; }
  .ace-dt-status-text{ font-size:15px; }
  .ace-dt-section-title{ font-size:14px; }
  .ace-dt-product-name{ font-size:13px; }
  .ace-dt-btn-outline{ padding:7px 14px; font-size:12px; }
  .ace-dt-row{
    grid-template-columns:70px auto 1fr;
    gap:8px;
    font-size:12px;
  }
  .ace-dt-pay-row{ font-size:12px; }
  .ace-dt-pay-total{ font-size:14px; }
}

/* ============== Lacak Pengiriman — button + modal ==============
 * Outlined button sits as its own row under No. Resi. Tapping it
 * opens a bottom-sheet (mobile) / centered panel (desktop) modal
 * with summary + timeline data fetched from Biteship via AJAX. */
.ace-dt-row-track .ace-dt-row-label,
.ace-dt-row-track .ace-dt-row-sep{ visibility:hidden; }
.ace-dt-track-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:transparent;
  border:1px solid var(--gold);
  color:var(--gold);
  padding:7px 14px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.15s;
  font-family:inherit;
}
.ace-dt-track-btn:hover{ background:var(--gold); color:#000; }
.ace-dt-track-btn:active{ transform:translateY(1px); }
.ace-dt-track-btn svg{ flex:0 0 auto; }

body.ace-track-open{ overflow:hidden; }
.ace-track-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.ace-track-modal[hidden]{ display:none; }
/* Inner state blocks toggle via the `hidden` attribute. Their display
 * rules below (`display:flex`, etc.) would otherwise win over the
 * UA `[hidden]{display:none}`, so force-hide here. */
.ace-track-modal [hidden]{ display:none !important; }
.ace-track-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.65);
  animation:aceTrackFade .2s ease-out;
}
.ace-track-panel{
  position:relative;
  width:100%;
  max-width:520px;
  max-height:90vh;
  background:var(--bg-2,#141414);
  border-radius:16px 16px 0 0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  animation:aceTrackSlide .25s ease-out;
}
@keyframes aceTrackFade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes aceTrackSlide{ from{ transform:translateY(20px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
.ace-track-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--bg-3,#262626);
  flex:0 0 auto;
}
.ace-track-title{
  font-size:16px;
  font-weight:800;
  color:#fff;
  margin:0;
}
.ace-track-close{
  background:transparent;
  border:0;
  color:#cfcfcf;
  cursor:pointer;
  padding:6px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:.15s;
}
.ace-track-close:hover{ background:var(--bg-3,#262626); color:#fff; }
.ace-track-body{
  flex:1 1 auto;
  overflow-y:auto;
  padding:16px 18px 24px;
  -webkit-overflow-scrolling:touch;
}

/* Loading + error states */
.ace-track-loading{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:48px 16px;
  color:#cfcfcf;
  font-size:13px;
}
.ace-track-spinner{
  width:32px;
  height:32px;
  border:3px solid var(--bg-3,#262626);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:aceTrackSpin .8s linear infinite;
}
@keyframes aceTrackSpin{ to{ transform:rotate(360deg); } }
.ace-track-error{
  text-align:center;
  padding:32px 16px;
  color:#cfcfcf;
  font-size:13px;
}
.ace-track-error-msg{ margin:0 0 14px; }
.ace-track-retry{
  background:transparent;
  border:1px solid var(--gold);
  color:var(--gold);
  padding:8px 18px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.ace-track-retry:hover{ background:var(--gold); color:#000; }

/* Summary block — status badge + courier/service/resi rows */
.ace-track-summary{
  background:var(--bg-3,#1a1a1a);
  border-radius:12px;
  padding:14px 16px;
  margin-bottom:18px;
}
.ace-track-status-row{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-bottom:12px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.ace-track-status-label{
  color:#cfcfcf;
  font-size:13px;
}
.ace-track-status-value{
  font-size:18px;
  font-weight:800;
  color:#fff;
}
.ace-track-status-delivered{ color:#3ddc84; }
.ace-track-status-cancelled,
.ace-track-status-rejected,
.ace-track-status-returned{ color:#ff6b6b; }
.ace-track-status-on_hold{ color:#ffc94a; }
.ace-track-info{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ace-track-info-row{
  display:grid;
  grid-template-columns:80px auto 1fr;
  gap:10px;
  font-size:13px;
  align-items:baseline;
}
.ace-track-info-label{ color:#cfcfcf; }
.ace-track-info-sep{ color:#cfcfcf; }
.ace-track-info-value{ color:#fff; }
.ace-track-info-resi{
  font-family:ui-monospace,Menlo,Monaco,monospace;
  font-weight:700;
  word-break:break-all;
}

/* Timeline */
.ace-track-timeline{
  list-style:none;
  margin:0;
  padding:0;
  position:relative;
}
.ace-track-event{
  display:grid;
  grid-template-columns:60px 16px 1fr;
  gap:12px;
  padding:12px 0;
  position:relative;
  align-items:flex-start;
}
.ace-track-event:not(:last-child)::after{
  content:'';
  position:absolute;
  left:67px;
  top:24px;
  bottom:-12px;
  width:2px;
  background:var(--bg-3,#262626);
}
.ace-track-event-when{
  text-align:right;
  font-size:11px;
  line-height:1.4;
  color:#cfcfcf;
  padding-top:2px;
}
.ace-track-event-time{
  font-weight:700;
  color:#fff;
  font-size:12px;
}
.ace-track-event-date{ margin-top:1px; }
.ace-track-event-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:#444;
  margin-top:6px;
  border:2px solid var(--bg-2,#141414);
  box-shadow:0 0 0 2px var(--bg-3,#262626);
  position:relative;
  z-index:1;
}
.ace-track-event.is-latest .ace-track-event-dot{
  background:#3ddc84;
  box-shadow:0 0 0 2px #3ddc84,0 0 0 4px rgba(61,220,132,.25);
}

/* Kurir Toko 3-stage tracker — done steps (already passed) get a
 * solid gold dot to signal "completed", and the latest step gets
 * a pulse animation on top of the existing green halo for a
 * "live" feel similar to Biteship's "currently here" highlight. */
.ace-track-event.is-done .ace-track-event-dot{
  background:var(--gold,#d4af37);
  box-shadow:0 0 0 2px var(--gold,#d4af37),0 0 0 4px rgba(212,175,55,.25);
}
.ace-track-timeline--simple .ace-track-event.is-latest .ace-track-event-dot{
  animation:ace-track-pulse 1.6s ease-out infinite;
}
@keyframes ace-track-pulse{
  0%   { box-shadow:0 0 0 2px #3ddc84, 0 0 0 4px rgba(61,220,132,.45); }
  70%  { box-shadow:0 0 0 2px #3ddc84, 0 0 0 14px rgba(61,220,132,0); }
  100% { box-shadow:0 0 0 2px #3ddc84, 0 0 0 4px rgba(61,220,132,0); }
}
@media (prefers-reduced-motion:reduce){
  .ace-track-timeline--simple .ace-track-event.is-latest .ace-track-event-dot{
    animation:none;
  }
}

/* Done-step "✓" glyph + future-step number sit in the .when slot
 * where the Biteship modal puts the timestamp. Give the badge a
 * proper centered look so the timeline reads as a stepper. */
.ace-track-timeline--simple .ace-track-event-when{
  display:flex;
  align-items:center;
  justify-content:center;
}
.ace-track-timeline--simple .ace-track-event-time{
  width:28px; height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:800;
  background:rgba(255,255,255,.06);
  color:var(--text-dim);
  border:1px solid var(--bg-3);
}
.ace-track-timeline--simple .ace-track-event.is-done .ace-track-event-time{
  background:rgba(212,175,55,.15);
  color:var(--gold,#d4af37);
  border-color:var(--gold,#d4af37);
}
.ace-track-timeline--simple .ace-track-event.is-latest .ace-track-event-time{
  background:rgba(61,220,132,.15);
  color:#3ddc84;
  border-color:#3ddc84;
}
/* Future-step body fades back so the timeline emphasises the
 * current step. */
.ace-track-timeline--simple .ace-track-event:not(.is-done):not(.is-latest) .ace-track-event-body{
  opacity:.5;
}
.ace-track-event-body{
  font-size:13px;
  color:#fff;
  line-height:1.5;
}
.ace-track-event-note{ font-weight:600; }
.ace-track-event-courier{
  margin-top:2px;
  font-size:11px;
  color:#9a9a9a;
}
.ace-track-empty{
  text-align:center;
  padding:32px 16px;
  color:#9a9a9a;
  font-size:13px;
}

@media (max-width:640px){
  .ace-track-info-row{ grid-template-columns:70px auto 1fr; font-size:12px; }
  .ace-track-status-value{ font-size:16px; }
  .ace-track-event{ grid-template-columns:48px 14px 1fr; gap:10px; }
  .ace-track-event:not(:last-child)::after{ left:56px; }
  .ace-track-event-body{ font-size:12px; }
}
@media (min-width:768px){
  .ace-track-modal{ align-items:center; }
  .ace-track-panel{ border-radius:16px; max-height:80vh; }
}

/* ============== MY ACCOUNT — DAFTAR TRANSAKSI ==============
 * Card layout for /my-account/orders/, modeled on the Tokopedia order
 * list. Each .ace-order-card has a head row (icon / "Belanja" / date /
 * status badge / order #), a body (first product + total), and an
 * action footer (Lihat Detail / Ulas / Beli Lagi). Filter chips at the
 * top hide/show cards client-side via data-status-group. */
.ace-orders-page{ width:100%; }
.ace-orders-title{
  font-size:22px;
  font-weight:800;
  color:#fff;
  margin:0 0 16px;
  letter-spacing:-.2px;
}
/* Search + month-filter row (top of the orders page). Search box
 * stretches to fill available width; date picker holds a fixed
 * minimum so the calendar icon and month value stay legible. */
.ace-orders-search{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}
.ace-search-field,
.ace-date-field{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:12px;
  padding:0 14px;
  transition:border-color .15s;
  min-height:44px;
}
.ace-search-field{ flex:1 1 280px; min-width:220px; }
.ace-date-field{   flex:1 1 320px; min-width:280px; }
.ace-search-field:focus-within,
.ace-date-field:focus-within{ border-color:var(--gold); }
.ace-search-icon,
.ace-date-icon{ color:var(--text-dim); flex-shrink:0; }
.ace-search-input,
.ace-date-input{
  flex:1;
  min-width:0;
  background:transparent;
  border:0;
  outline:0;
  color:#fff;
  font-size:14px;
  font-family:inherit;
  padding:10px 0;
}
.ace-search-input::placeholder{ color:var(--text-dim); }
.ace-date-input{ color-scheme:dark; flex:1 1 0; }
.ace-date-sep{
  color:var(--text-dim);
  font-size:14px;
  flex-shrink:0;
  padding:0 4px;
}
.ace-date-input::-webkit-calendar-picker-indicator{
  filter:invert(.7);
  cursor:pointer;
  opacity:.7;
}
.ace-date-input::-webkit-calendar-picker-indicator:hover{ opacity:1; }
/* "No matches" empty state. */
.ace-orders-no-match{
  text-align:center;
  padding:30px 20px;
  color:var(--text-dim);
  font-size:14px;
  background:var(--bg-2);
  border:1px dashed var(--bg-3);
  border-radius:12px;
}

.ace-orders-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
  margin-bottom:18px;
  padding:14px 16px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:12px;
}
.ace-filter-label{
  font-size:13px;
  font-weight:700;
  color:var(--text-dim);
  margin-right:4px;
}
.ace-filter-chip{
  background:transparent;
  border:1px solid var(--bg-3);
  color:#cfcfcf;
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:.15s;
  font-family:inherit;
}
.ace-filter-chip:hover{
  border-color:var(--gold);
  color:#fff;
}
.ace-filter-chip.is-active{
  background:rgba(212,175,55,.12);
  border-color:var(--gold);
  color:var(--gold);
}
.ace-filter-reset{
  margin-left:auto;
  font-size:13px;
  font-weight:700;
  color:var(--gold);
  text-decoration:none;
  cursor:pointer;
}
.ace-filter-reset:hover{ opacity:.85; }

.ace-orders-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.ace-order-card{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  padding:14px 18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ace-order-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:13px;
}
.ace-order-icon{
  display:inline-flex;
  align-items:center;
  color:var(--text-dim);
}
.ace-order-type{ font-weight:700; color:#fff; }
.ace-order-date{ color:#cfcfcf; }
.ace-order-num{
  color:var(--text-dim);
  font-size:12px;
  font-family:ui-monospace,Menlo,Monaco,monospace;
}
.ace-order-badge{
  font-size:11px;
  font-weight:700;
  padding:3px 8px;
  border-radius:999px;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.ace-badge-success{ background:rgba(39,174,96,.15);  color:#3ddc84; }
.ace-badge-ongoing{ background:rgba(212,175,55,.18); color:var(--gold); }
.ace-badge-failed{  background:rgba(231,76,60,.15);  color:#ff6b6b; }
/* Six-group badge palette mirrors the orders-page chip filter:
 * pay → amber, packing → gold, shipping → blue, done → green,
 * cancelled / return → red shades. */
.ace-badge-pay      { background:rgba(255,179,71,.15); color:#ffb347; }
.ace-badge-packing  { background:rgba(212,175,55,.18); color:var(--gold); }
.ace-badge-shipping { background:rgba(74,158,255,.15); color:#4a9eff; }
.ace-badge-done     { background:rgba(39,174,96,.15);  color:#3ddc84; }
.ace-badge-cancelled{ background:rgba(231,76,60,.15);  color:#ff6b6b; }
.ace-badge-return   { background:rgba(255,107,107,.12);color:#ff8a80; }

.ace-order-body{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 0;
  border-top:1px solid var(--bg-3);
  border-bottom:1px solid var(--bg-3);
}
.ace-order-product{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
  min-width:0;
}
.ace-order-thumb{
  width:60px;
  height:60px;
  border-radius:10px;
  overflow:hidden;
  background:var(--bg-3);
  flex-shrink:0;
}
.ace-order-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ace-order-info{ flex:1; min-width:0; }
.ace-order-name{
  font-size:14px;
  font-weight:700;
  color:#fff;
  margin-bottom:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  line-height:1.35;
}
.ace-order-meta,
.ace-order-more{
  font-size:12px;
  color:var(--text-dim);
  margin-top:2px;
}
.ace-order-total{
  text-align:right;
  flex-shrink:0;
  padding-left:14px;
  border-left:1px dashed var(--bg-3);
  min-width:140px;
}
.ace-order-total-label{
  font-size:12px;
  color:var(--text-dim);
  margin-bottom:4px;
}
.ace-order-total-amount{
  font-size:15px;
  font-weight:800;
  color:#fff;
}

.ace-order-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.ace-order-btn{
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  padding:9px 18px;
  border-radius:8px;
  transition:.15s;
  cursor:pointer;
  display:inline-block;
  line-height:1.2;
  border:1px solid transparent;
  font-family:inherit;
}
.ace-order-btn-link{
  color:var(--gold);
  background:transparent;
  padding:9px 4px;
}
.ace-order-btn-link:hover{ opacity:.85; }
.ace-order-btn-outline{
  color:var(--gold);
  background:transparent;
  border-color:var(--gold);
}
.ace-order-btn-outline:hover{ background:rgba(212,175,55,.1); }
.ace-order-btn-primary{
  color:#000;
  background:var(--gold);
  border-color:var(--gold);
}
.ace-order-btn-primary:hover{ opacity:.92; }

/* Disabled CTA — used by "Konfirmasi Selesai" while the order is
 * still being processed/packed. Visually muted, no hover lift, and
 * cursor signals the inert state. */
.ace-order-btn.is-disabled,
.ace-order-btn[disabled]{
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.35);
  border-color:rgba(255,255,255,.08);
  cursor:not-allowed;
  pointer-events:auto; /* keep tooltip working even while inert */
}
.ace-order-btn.is-disabled:hover,
.ace-order-btn[disabled]:hover{ opacity:1; }

/* Countdown chip — shown next to "Bayar Sekarang" while a Tripay
 * VA / QRIS / Gerai is still waiting. Tabular numerals so the digits
 * don't dance as the seconds tick. */
.ace-order-countdown{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:8px;
  background:rgba(212,175,55,.12);
  border:1px solid rgba(212,175,55,.35);
  color:var(--gold);
  font-size:12px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  font-family:ui-monospace,Menlo,Monaco,monospace;
  letter-spacing:.3px;
  white-space:nowrap;
  line-height:1.2;
}
.ace-order-countdown.is-expired{
  background:rgba(220,53,69,.12);
  border-color:rgba(220,53,69,.45);
  color:#ff6b78;
}

.ace-orders-empty{
  text-align:center;
  padding:40px 20px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
}
.ace-orders-empty p{
  color:var(--text-dim);
  font-size:15px;
  margin:0 0 16px;
}

.ace-orders-pagination{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:20px;
}
.ace-page-btn{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  color:#cfcfcf;
  padding:8px 16px;
  border-radius:8px;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}
.ace-page-btn:hover{ border-color:var(--gold); color:#fff; }

@media (max-width:640px){
  .ace-orders-title{ font-size:18px; margin-bottom:12px; }
  .ace-orders-search{ gap:8px; }
  .ace-search-field,
  .ace-date-field{ flex:1 1 100%; min-height:42px; padding:0 12px; }
  .ace-search-input,
  .ace-date-input{ font-size:13px; padding:9px 0; }
  /* Mobile: 2-section flex layout with a forced wrap break.
   *   Row 1  — "Status" label (left) + "Reset Filter" (right)
   *   Row 2+ — chips wrap naturally; each chip auto-sizes to its label
   *            so long labels like "Menunggu Pembayaran" don't get
   *            truncated, and short ones don't sprawl.
   * Order on label/reset/chips combined with a 100%-basis ::after
   * pseudo-element gives us the wrap break without needing a wrapper
   * <div> in the markup. */
  .ace-orders-filters{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    padding:12px 14px;
  }
  .ace-filter-label{
    flex:1 1 auto;
    order:1;
    margin:0;
    font-size:12px;
    letter-spacing:.5px;
    text-transform:uppercase;
    text-align:left;
  }
  .ace-filter-reset{
    flex:0 0 auto;
    order:2;
    margin:0 0 0 auto;
    font-size:12px;
    white-space:nowrap;
  }
  .ace-orders-filters::after{
    content:"";
    order:3;
    flex-basis:100%;
    width:100%;
    height:0;
    margin:0;
  }
  .ace-filter-chip{
    flex:0 0 auto;
    order:4;
    padding:7px 12px;
    font-size:12px;
    line-height:1.2;
    white-space:nowrap;
  }
  .ace-order-card{ padding:12px 14px; }
  .ace-order-head{ font-size:12px; gap:8px; }
  .ace-order-num{ flex-basis:100%; margin-top:2px; }
  .ace-order-body{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .ace-order-thumb{ width:54px; height:54px; }
  .ace-order-name{ font-size:13px; }
  .ace-order-total{
    text-align:left;
    padding-left:0;
    border-left:0;
    border-top:1px dashed var(--bg-3);
    padding-top:10px;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
  }
  .ace-order-total-label{ margin-bottom:0; }
  .ace-order-actions{ justify-content:space-between; gap:8px; }
  .ace-order-btn{ padding:8px 12px; font-size:12px; flex:1; text-align:center; }
  .ace-order-btn-link{ flex:1 1 100%; padding:8px 4px; order:-1; text-align:left; }
}

/* ============== PILIH VOUCHER — checkout modal picker ==============
 * Replaces WC's inline "Tambah kupon" collapse panel with a single
 * button that opens a body-level modal listing active coupons. The
 * native panel is hidden in both common block locations so the modal
 * is the only entry point for adding/removing a coupon code. The
 * native applied-coupons listing inside the order summary is also
 * hidden — our premium banner above the totals card (see
 * .ace-promo-active-banner) is the canonical display for active
 * coupons across both viewports, so the WC pill would just be
 * duplicate clutter. */
.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.wc-block-components-totals-coupon,
.wp-block-woocommerce-checkout-order-summary-discount-block,
.wp-block-woocommerce-checkout-order-summary-discount-form-block,
.wc-block-components-totals-coupon-list,
.wc-block-components-totals-discount{
  display:none !important;
}

/* Trigger button (looks like a chip in the form column / sidebar) */
.ace-promo-trigger{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:12px;
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
  transition:.15s;
}
.ace-promo-trigger:hover{ border-color:var(--gold); }
.ace-promo-trigger[data-active="1"]{
  border-color:var(--gold);
  background:rgba(212,175,55,.08);
}
.ace-promo-trigger-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;height:34px;
  border-radius:8px;
  background:rgba(212,175,55,.15);
  color:var(--gold);
  flex-shrink:0;
}
.ace-promo-trigger-text{ flex:1; }
.ace-promo-trigger-chev{
  font-size:22px;
  line-height:1;
  color:var(--text-dim);
  flex-shrink:0;
}

/* Active voucher banner below the trigger — premium card showing the
 * friendly label, kind-aware icon tile (gold for discount / green for
 * shipping), and "Berhasil dipakai" confirmation with a green check
 * pill. Subtle shimmer overlay + gentle pop-in animation give the
 * buyer a moment of "yes, my promo is locked in." */
.ace-promo-active-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}
.ace-promo-active-banner{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(212,175,55,.45);
  background:
    linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.04) 60%, rgba(212,175,55,0));
  box-shadow:
    0 4px 16px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.05);
  overflow:hidden;
  animation:ace-promo-pop-in .35s cubic-bezier(.2,.9,.3,1.2);
}
.ace-promo-active-banner.is-free-shipping{
  border-color:rgba(61,220,132,.45);
  background:
    linear-gradient(135deg, rgba(61,220,132,.14), rgba(61,220,132,.04) 60%, rgba(61,220,132,0));
}
/* Subtle diagonal shimmer overlay */
.ace-promo-active-banner::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(115deg, transparent 35%, rgba(255,255,255,.06) 50%, transparent 65%);
  pointer-events:none;
  border-radius:inherit;
}
@keyframes ace-promo-pop-in{
  0%{ transform:translateY(-4px) scale(.98); opacity:0; }
  60%{ transform:translateY(0) scale(1.01); opacity:1; }
  100%{ transform:translateY(0) scale(1); opacity:1; }
}

.ace-promo-active-banner-icon{
  width:42px;height:42px;
  flex-shrink:0;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, var(--gold), var(--gold-2));
  color:#000;
  box-shadow:
    0 4px 12px rgba(212,175,55,.3),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.ace-promo-active-banner.is-free-shipping .ace-promo-active-banner-icon{
  background:linear-gradient(135deg, #3ddc84, #1aa460);
  color:#062818;
  box-shadow:
    0 4px 12px rgba(61,220,132,.3),
    inset 0 1px 0 rgba(255,255,255,.2);
}

.ace-promo-active-banner-info{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.ace-promo-active-banner-title{
  font-size:14px;
  font-weight:800;
  color:#fff;
  letter-spacing:-.1px;
  line-height:1.2;
}
.ace-promo-active-banner-sub{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  color:#3ddc84;
  font-weight:700;
  letter-spacing:.2px;
}
.ace-promo-active-banner-check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:14px;height:14px;
  border-radius:50%;
  background:#3ddc84;
  color:#062818;
}

.ace-promo-active-remove{
  position:relative;
  z-index:1;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.7);
  border:0;
  border-radius:50%;
  width:24px;height:24px;
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  transition:.15s;
  font-family:inherit;
}
.ace-promo-active-remove:hover{
  background:rgba(231,76,60,.25);
  color:#ff6b6b;
}

/* GRATIS label inside Rincian Pembayaran shipping row — replaces the
 * Rp0 numeric value when a free-shipping coupon zeroed the cost. */
.ace-mc-gratis{
  display:inline-block;
  color:#3ddc84;
  font-weight:800;
  letter-spacing:.5px;
  font-size:13px;
}

/* Modal — backdrop + sheet anchored to viewport. On mobile the sheet
 * slides from the bottom; on desktop it sits centered. */
.ace-promo-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:flex-end;
  justify-content:center;
}
.ace-promo-modal.is-open{ display:flex; }
.ace-promo-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
  backdrop-filter:blur(2px);
}
.ace-promo-sheet{
  position:relative;
  z-index:1;
  width:100%;
  max-width:520px;
  max-height:90vh;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:18px 18px 0 0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  animation:ace-promo-slide-up .22s ease-out;
}
@keyframes ace-promo-slide-up{
  from{ transform:translateY(20px); opacity:.6; }
  to{ transform:translateY(0); opacity:1; }
}
.ace-promo-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid var(--bg-3);
  flex-shrink:0;
}
.ace-promo-head h3{
  margin:0;
  font-size:18px;
  font-weight:800;
  color:#fff;
}
.ace-promo-close{
  background:transparent;
  border:0;
  color:var(--text-dim);
  cursor:pointer;
  padding:4px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ace-promo-close:hover{ color:#fff; background:var(--bg-3); }

.ace-promo-body{
  padding:18px 20px;
  overflow-y:auto;
  flex:1;
}
.ace-promo-input-row{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}
.ace-promo-code-input{
  flex:1;
  background:var(--bg-3);
  border:1px solid var(--bg-3);
  border-radius:10px;
  padding:12px 14px;
  color:#fff;
  font-size:14px;
  font-family:inherit;
  outline:0;
  transition:.15s;
}
.ace-promo-code-input:focus{ border-color:var(--gold); background:var(--bg-2); }
.ace-promo-code-input::placeholder{ color:var(--text-dim); }
.ace-promo-code-apply{
  background:var(--gold);
  color:#000;
  border:0;
  border-radius:10px;
  padding:12px 22px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.ace-promo-code-apply:hover{ opacity:.9; }
.ace-promo-msg{
  font-size:13px;
  padding:10px 12px;
  border-radius:8px;
  margin-bottom:14px;
}
.ace-promo-msg-ok{ color:#3ddc84; background:rgba(39,174,96,.12); }
.ace-promo-msg-err{ color:#ff6b6b; background:rgba(231,76,60,.12); }

.ace-promo-list-title{
  font-size:14px;
  font-weight:800;
  color:#fff;
  margin:6px 0 10px;
}
.ace-promo-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ace-promo-empty,
.ace-promo-loading{
  text-align:center;
  color:var(--text-dim);
  font-size:13px;
  padding:30px 16px;
  background:var(--bg-3);
  border-radius:10px;
}
/* Voucher row card — left icon tile (gold gradient by default, green
 * for free shipping), middle stack (label + min-spend subtitle +
 * expiry meta), right checkmark when applied. The whole row is a
 * button so a single tap toggles the coupon on/off. */
.ace-promo-row{
  position:relative;
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  background:linear-gradient(180deg, rgba(212,175,55,.04), rgba(212,175,55,0));
  border:1px solid var(--bg-3);
  border-radius:14px;
  cursor:pointer;
  font-family:inherit;
  text-align:left;
  transition:transform .15s, border-color .15s, box-shadow .15s;
  overflow:hidden;
}
.ace-promo-row::before{
  content:'';
  position:absolute;
  left:-1px;top:50%;transform:translateY(-50%);
  width:8px;height:8px;border-radius:50%;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  margin-left:-4px;
  pointer-events:none;
}
.ace-promo-row:hover{
  border-color:var(--gold);
  box-shadow:0 4px 16px rgba(0,0,0,.25);
  transform:translateY(-1px);
}
.ace-promo-row[data-active="1"]{
  border-color:var(--gold);
  background:linear-gradient(180deg, rgba(212,175,55,.12), rgba(212,175,55,.04));
  box-shadow:0 0 0 1px var(--gold) inset;
}

/* Left icon tile — color depends on coupon kind. */
.ace-promo-row-icon{
  width:48px;height:48px;
  flex-shrink:0;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, var(--gold), var(--gold-2));
  color:#000;
  box-shadow:0 4px 10px rgba(212,175,55,.18);
}
.ace-promo-row.is-free-shipping .ace-promo-row-icon{
  background:linear-gradient(135deg, #3ddc84, #1aa460);
  color:#06281a;
  box-shadow:0 4px 10px rgba(61,220,132,.18);
}

.ace-promo-row-main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.ace-promo-row-label{
  font-size:15px;
  font-weight:800;
  color:#fff;
  letter-spacing:-.1px;
}
.ace-promo-row-sub{
  font-size:12px;
  color:#cfcfcf;
  font-weight:500;
}
.ace-promo-row-meta{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  color:var(--text-dim);
  margin-top:3px;
}
.ace-promo-row-meta svg{ flex-shrink:0; }
.ace-promo-row-meta strong{ color:var(--gold); font-weight:700; }

.ace-promo-row-mark{
  width:28px;height:28px;
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:transparent;
  color:transparent;
  transition:.2s;
}
.ace-promo-row[data-active="1"] .ace-promo-row-mark{
  background:#3ddc84;
  color:#06281a;
  box-shadow:0 2px 8px rgba(61,220,132,.35);
}

.ace-promo-foot{
  padding:14px 20px 18px;
  border-top:1px solid var(--bg-3);
  flex-shrink:0;
}
.ace-promo-back{
  width:100%;
  background:var(--gold);
  color:#000;
  border:0;
  border-radius:12px;
  padding:14px 0;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.ace-promo-back:hover{ opacity:.9; }

html.ace-no-scroll,
html.ace-no-scroll body{ overflow:hidden !important; }

/* ============== CHECKOUT LEAVE GUARD MODAL ============== */
.ace-leave-modal{
  position:fixed;
  inset:0;
  z-index:99998;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.ace-leave-modal.is-open{ display:flex; }
.ace-leave-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(3px);
}
.ace-leave-sheet{
  position:relative;
  z-index:1;
  width:100%;
  max-width:380px;
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:16px;
  padding:28px 22px 22px;
  text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  animation:ace-leave-pop-in .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes ace-leave-pop-in{
  from{ transform:scale(.92); opacity:0; }
  to{ transform:scale(1); opacity:1; }
}
.ace-leave-icon{
  width:64px;height:64px;
  margin:0 auto 16px;
  border-radius:50%;
  background:linear-gradient(135deg, rgba(255,193,7,.18), rgba(255,152,0,.06));
  border:2px solid rgba(255,193,7,.4);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ffc107;
}
.ace-leave-title{
  font-size:18px;
  font-weight:800;
  color:#fff;
  margin:0 0 8px;
  letter-spacing:-.2px;
}
.ace-leave-text{
  font-size:13px;
  line-height:1.55;
  color:#cfcfcf;
  margin:0 0 22px;
}
.ace-leave-actions{
  display:flex;
  gap:10px;
}
.ace-leave-btn{
  flex:1;
  padding:12px 16px;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
  border:1px solid transparent;
  transition:.15s;
}
.ace-leave-stay{
  background:var(--bg-3);
  color:#fff;
  border-color:var(--bg-3);
}
.ace-leave-stay:hover{
  border-color:var(--gold);
  color:var(--gold);
}
.ace-leave-go{
  background:transparent;
  color:#ff6b6b;
  border-color:rgba(231,76,60,.35);
}
.ace-leave-go:hover{
  background:rgba(231,76,60,.12);
  border-color:#ff6b6b;
}
@media (max-width:480px){
  .ace-leave-sheet{ padding:24px 18px 18px; }
  .ace-leave-icon{ width:56px;height:56px; margin-bottom:14px; }
  .ace-leave-title{ font-size:17px; }
  .ace-leave-text{ font-size:12px; margin-bottom:18px; }
  .ace-leave-actions{ flex-direction:column-reverse; }
  .ace-leave-btn{ width:100%; }
}

@media (min-width:560px){
  .ace-promo-modal{ align-items:center; }
  .ace-promo-sheet{ border-radius:18px; max-height:80vh; }
  @keyframes ace-promo-slide-up{
    from{ transform:scale(.96); opacity:0; }
    to{ transform:scale(1); opacity:1; }
  }
}

/* ============== SITE FOOTER (DESKTOP) ==============
 * Shopee-style multi-column footer rendered at the bottom of every
 * page. Hidden on mobile (<768px) where the bottom-nav already serves
 * navigation; shows as a 5-col grid on desktop. */
.ace-site-footer{
  display:none;
}
@media (min-width:768px){
  .ace-site-footer{
    display:block;
    background:var(--bg-2);
    border-top:1px solid var(--bg-3);
    margin-top:60px;
    padding:48px 32px 0;
    color:#cfcfcf;
  }
  .ace-site-footer-inner{
    max-width:1200px;
    margin:0 auto;
    display:grid;
    grid-template-columns:1.1fr 1.4fr 1fr 1fr 1fr;
    gap:40px;
    padding-bottom:36px;
  }
  .ace-footer-col h4.ace-footer-title{
    font-size:13px;
    font-weight:800;
    color:#fff;
    text-transform:uppercase;
    letter-spacing:1px;
    margin:0 0 16px;
  }
  .ace-footer-list{
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .ace-footer-list a{
    color:#cfcfcf;
    text-decoration:none;
    font-size:13px;
    transition:.15s;
  }
  .ace-footer-list a:hover{ color:var(--gold); }

  /* Static (non-link) footer label — used for things like
   * "Bantuan :" that introduce a static value rather than a
   * navigation target. Matches link typography but without the
   * pointer / hover affordance. */
  .ace-footer-static{
    color:#cfcfcf;
    font-size:13px;
    font-weight:600;
    cursor:default;
  }

  /* WhatsApp link in Layanan Pelanggan — icon + number with brand
   * green so it's instantly recognizable as a chat link. */
  .ace-footer-wa{
    display:inline-flex !important;
    align-items:center;
    gap:8px;
  }
  .ace-footer-wa svg{
    color:#25D366;
    flex-shrink:0;
    transition:.15s;
  }
  .ace-footer-wa:hover svg{ color:#1ea854; }

  /* Live Chat trigger button rendered as an inline footer link.
   * Reset the <button> defaults so it visually matches the WA + email
   * anchors next to it. The .js-aceshop-livechat-trigger class wires
   * it up to the existing chat widget toggle in livechat.js. */
  .ace-footer-livechat{
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    background:transparent;
    border:none;
    padding:0;
    margin:0;
    color:inherit;
    font:inherit;
    cursor:pointer;
    text-align:left;
  }
  .ace-footer-livechat svg{
    color:var(--gold,#d4af37);
    flex-shrink:0;
    transition:.15s;
  }
  .ace-footer-livechat:hover svg{ color:#fff; }

  .ace-footer-email{
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    word-break:break-all;
  }
  .ace-footer-email svg{
    color:#9ca3af;
    flex-shrink:0;
    transition:.15s;
  }
  .ace-footer-email:hover svg{ color:var(--gold,#d4af37); }

  /* Pills for payment / shipping methods. */
  .ace-footer-pills{
    flex-direction:row;
    flex-wrap:wrap;
    gap:8px;
  }
  .ace-footer-pill{
    display:inline-block;
    padding:6px 12px;
    background:var(--bg-3);
    border:1px solid var(--bg-3);
    border-radius:8px;
    font-size:12px;
    color:#fff;
    font-weight:600;
    letter-spacing:.2px;
  }
  /* Uploaded payment / shipping icon — small white background tile so
   * brand logos (which are usually designed for white backgrounds)
   * stay legible on the dark footer. */
  .ace-footer-method-icon{
    display:inline-block;
    height:32px;
    width:auto;
    max-width:80px;
    object-fit:contain;
    padding:4px 8px;
    background:#fff;
    border-radius:6px;
    vertical-align:middle;
  }

  /* Payment column: 3 sub-categories (Virtual Account / Gerai /
   * E-Money + QRIS), each with a small label + a wrapped row of
   * Tripay channel logos. */
  .ace-footer-pay-cat{
    margin-bottom:12px;
  }
  .ace-footer-pay-cat:last-child{
    margin-bottom:0;
  }
  .ace-footer-pay-cat-label{
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.5px;
    color:var(--text-dim,#9ca3af);
    margin-bottom:6px;
  }
  .ace-footer-pay-cat-icons{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
  }
  /* Slightly smaller icons inside the cat rows so 5+ VA logos fit
   * the column width on desktop without wrapping into 3 lines. */
  .ace-footer-pay-cat-icons .ace-footer-method-icon{
    height:26px;
    max-width:60px;
    padding:3px 6px;
  }

  /* Social icons + label vertical stack. */
  .ace-footer-social{
    gap:10px;
  }
  .ace-footer-social a{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#cfcfcf;
    text-decoration:none;
    font-size:13px;
    transition:.15s;
  }
  .ace-footer-social a:hover{ color:var(--gold); }
  .ace-footer-social svg{
    flex-shrink:0;
    color:var(--text-dim);
    transition:.15s;
  }
  .ace-footer-social a:hover svg{ color:var(--gold); }

  /* Copyright row. */
  .ace-footer-bottom{
    border-top:1px solid var(--bg-3);
    padding:20px 0;
    text-align:center;
  }
  .ace-footer-bottom p{
    margin:0;
    font-size:12px;
    color:var(--text-dim);
  }
}
@media (min-width:768px) and (max-width:1023px){
  /* Tighter at tablet — stack into 2 rows of 3 / 2. */
  .ace-site-footer-inner{
    grid-template-columns:repeat(3, 1fr);
    gap:32px 24px;
  }
}

/* ============== PROFIL SAYA — EDIT MODE TOGGLE ============== */
.ace-profile-card{
  background:var(--bg-2);
  border:1px solid var(--bg-3);
  border-radius:14px;
  padding:14px;
  margin-bottom:14px;
}
.ace-profile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}
.ace-profile-title{
  font-size:13px;
  font-weight:800;
  color:var(--gold);
  text-transform:uppercase;
  letter-spacing:1px;
  margin:0;
}
.ace-profile-toggle{
  background:transparent;
  border:1px solid var(--bg-3);
  color:var(--gold);
  padding:6px 14px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.ace-profile-toggle:hover{
  border-color:var(--gold);
  background:rgba(212,175,55,.08);
}
.ace-profile-card[data-edit-mode="on"] .ace-profile-toggle{
  color:#ff6b6b;
  border-color:rgba(231,76,60,.4);
}
.ace-profile-card[data-edit-mode="on"] .ace-profile-toggle:hover{
  background:rgba(231,76,60,.12);
  border-color:#ff6b6b;
}
.ace-profile-field{ margin-bottom:14px; }
.ace-profile-field label{
  display:block;
  font-size:12px;
  color:var(--text-dim);
  margin-bottom:6px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.ace-profile-field input{
  width:100%;
  padding:12px 14px;
  background:var(--bg-3);
  border:1px solid var(--bg-3);
  border-radius:10px;
  color:#fff;
  font-size:14px;
  font-family:inherit;
  transition:.15s;
}
.ace-profile-field input:focus{
  border-color:var(--gold);
  outline:0;
}
/* Read-only state — visually communicate that fields are locked. */
.ace-profile-card[data-edit-mode="off"] .ace-profile-field input,
.ace-profile-card[data-edit-mode="off"] .ace-phone-input,
.ace-profile-card[data-edit-mode="off"] .ace-phone-prefix{
  background:transparent;
  border-color:transparent;
  color:#cfcfcf;
  cursor:default;
  user-select:text;
}
.ace-profile-card[data-edit-mode="off"] .ace-profile-field input:focus,
.ace-profile-card[data-edit-mode="off"] .ace-phone-input:focus{
  border-color:transparent;
  outline:0;
}
/* Hide Simpan button until edit mode is on. */
.ace-profile-save{
  width:100%;
  padding:14px;
  background:linear-gradient(135deg, var(--gold), var(--gold-2));
  color:#000;
  border:0;
  border-radius:12px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.ace-profile-save:hover{ opacity:.92; }
.ace-profile-card[data-edit-mode="off"] .ace-profile-save{
  display:none;
}
/* Phone wrap inherits the readonly look from inputs above. */
.ace-profile-card[data-edit-mode="off"] .ace-phone-wrap{
  background:transparent;
  border-color:transparent;
}

/* ============== MANUAL BANK TRANSFER (BACS modal) ============== */

/* Block checkout still renders an empty-but-present description box for
 * BACS once the server-side filter empties the description. Hide that
 * ghost so our injected button isn't preceded by a sliver of padding. */
.wp-block-woocommerce-checkout-payment-block .wc-block-components-radio-control-accordion-content:empty,
.wp-block-woocommerce-checkout-payment-block .wc-block-components-payment-method-content:empty,
.wp-block-woocommerce-checkout-payment-block .wc-block-checkout__payment-method-options + div:empty {
  display: none !important;
}

/* JS-injected slot inside the BACS payment-method accordion
 * panel. Tucked into the per-method content area so the button
 * is only visible when BACS is the selected payment method —
 * matches the Tripay picker UX. No border-top here because the
 * accordion panel itself provides the visual separation. */
.ace-bacs-slot {
  margin-top: 8px;
}

.ace-bacs-wrap {
  margin: 0;
  padding: 0;
}
.ace-bacs-intro {
  margin: 0 0 12px !important;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.ace-bacs-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: none;
  border-radius: 10px;
  color: #0a0a0a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ace-bacs-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, .25);
}
.ace-bacs-open-icon { display: inline-flex; }
.ace-bacs-open-check {
  display: inline-flex;
  width: 22px;
  height: 22px;
  background: #0a0a0a;
  color: var(--gold);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.ace-bacs-open-btn.is-picked {
  background: linear-gradient(135deg, #2da24e, #1f8f3e);
  color: #fff;
}
.ace-bacs-open-btn.is-picked:hover {
  box-shadow: 0 6px 18px rgba(45, 162, 78, .25);
}
.ace-bacs-open-btn.is-picked .ace-bacs-open-check {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

/* Per-bank "Gunakan Bank Ini" CTA inside each <details> body */
.ace-bacs-bank-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Bank icon — drop a horizontal logo file (720×200 px ratio = 3.6:1)
 * at assets/banks/{slug}.png for each bank (slug = lowercase name
 * minus "bank " prefix and non-alnum chars: BCA → bca, Bank Mandiri
 * → mandiri, CIMB Niaga → cimbniaga). Missing files fall back to a
 * generic glyph in the same rectangle so the row alignment stays
 * uniform regardless of which banks have logos uploaded. */
.ace-bacs-bank-icon {
  width: 72px;
  aspect-ratio: 720 / 200;
  flex: 0 0 auto;
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ace-bacs-bank-icon-fallback {
  background: var(--bg-3, #1a1a1a);
  color: var(--gold);
  padding: 0;
}
@media (min-width: 768px) {
  .ace-bacs-bank-icon { width: 90px; }
}
.ace-bacs-bank-picked-badge {
  background: var(--gold);
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.ace-bacs-pick-btn {
  margin-top: 4px;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: none;
  border-radius: 10px;
  color: #0a0a0a;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .5px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ace-bacs-pick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, .25);
}
.ace-bacs-pick-btn.is-picked {
  background: linear-gradient(135deg, #2da24e, #1f8f3e);
  color: #fff;
}
.ace-bacs-bank.is-picked {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 1px var(--gold);
}

/* Modal */
.ace-bacs-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: aceBacsFade .18s ease-out;
}
.ace-bacs-modal[hidden] { display: none !important; }
@keyframes aceBacsFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ace-bacs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.ace-bacs-panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: 16px;
  padding: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  animation: aceBacsRise .22s ease-out;
}
@keyframes aceBacsRise {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.ace-bacs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.ace-bacs-title {
  margin: 0 !important;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .2px;
}
.ace-bacs-close-x {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.ace-bacs-close-x:hover {
  background: var(--bg-3);
  color: #fff;
}
.ace-bacs-sub {
  margin: 0 0 14px !important;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
.ace-bacs-empty {
  padding: 18px;
  background: var(--bg-3);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* Bank list */
.ace-bacs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.ace-bacs-bank {
  background: var(--bg-3);
  border: 1px solid var(--bg-3);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s ease;
}
.ace-bacs-bank[open] { border-color: var(--gold); }
.ace-bacs-bank > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.ace-bacs-bank > summary::-webkit-details-marker { display: none; }
.ace-bacs-bank-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.ace-bacs-bank-chev {
  color: var(--text-dim);
  transition: transform .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
}
.ace-bacs-bank[open] .ace-bacs-bank-chev {
  transform: rotate(180deg);
  color: var(--gold);
}
.ace-bacs-bank-body {
  padding: 0 16px 14px;
  border-top: 1px solid rgba(212, 175, 55, .12);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ace-bacs-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ace-bacs-info-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
}
.ace-bacs-rek,
.ace-bacs-holder {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
}
.ace-bacs-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ace-bacs-copy {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ace-bacs-copy:hover {
  background: var(--gold);
  color: #0a0a0a;
}
.ace-bacs-copy.is-copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* Summary (kode unik + total) */
.ace-bacs-summary {
  background: rgba(212, 175, 55, .06);
  border: 1px solid rgba(212, 175, 55, .25);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ace-bacs-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}
.ace-bacs-summary-row strong {
  color: #fff;
  font-weight: 700;
}
.ace-bacs-total-row {
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, .25);
  font-size: 14px;
}
.ace-bacs-total-row span { color: #fff; font-weight: 600; }
.ace-bacs-total-amount {
  color: var(--gold) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}
.ace-bacs-copy-total {
  width: 100%;
  padding: 10px;
  font-size: 12px;
  margin-top: 4px;
}
.ace-bacs-note {
  margin: 6px 0 0 !important;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, .25);
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .ace-bacs-modal { padding: 12px; align-items: flex-end; }
  .ace-bacs-panel {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    padding: 18px;
    margin-bottom: 0;
  }
  .ace-bacs-open-btn { width: 100%; justify-content: center; }
}

/* ========== BACS payment instructions on order-received page ==========
 * Marketplace-style focused card showing the picked bank's logo +
 * account number + holder + total. Replaces WC's default flat-list
 * thankyou_page output (which is unhooked in functions.php). */
.ace-bacs-instr {
  margin: 18px 0 28px;
}
.ace-bacs-instr-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 12px;
}
.ace-bacs-instr-card {
  background: var(--bg-2, #141414);
  border: 1px solid var(--bg-3, #262626);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ace-bacs-instr-bank {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bg-3, #262626);
}
.ace-bacs-instr-logo {
  width: 90px;
  aspect-ratio: 720 / 200;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 4px;
  object-fit: contain;
  padding: 2px 4px;
}
.ace-bacs-instr-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3, #1a1a1a);
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
  padding: 0;
}
.ace-bacs-instr-bank-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.ace-bacs-instr-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ace-bacs-instr-label {
  font-size: 12px;
  color: var(--text-dim);
}
.ace-bacs-instr-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ace-bacs-instr-rek {
  font-family: ui-monospace, Menlo, Monaco, monospace;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  word-break: break-all;
}
.ace-bacs-instr-holder {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.ace-bacs-instr-divider {
  height: 1px;
  background: var(--bg-3, #262626);
  margin: 2px 0;
}
.ace-bacs-instr-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ace-bacs-instr-amount {
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .3px;
}
.ace-bacs-instr-amount .woocommerce-Price-amount,
.ace-bacs-instr-amount bdi,
.ace-bacs-instr-amount .woocommerce-Price-currencySymbol {
  color: var(--gold) !important;
  font-weight: 800;
}
.ace-bacs-instr-copy {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.ace-bacs-instr-copy:hover {
  background: var(--gold);
  color: #0a0a0a;
}
.ace-bacs-instr-copy.is-copied {
  background: #3ddc84;
  border-color: #3ddc84;
  color: #0a0a0a;
}
.ace-bacs-instr-copy-total {
  width: 100%;
  padding: 11px;
  font-size: 13px;
  margin-top: 2px;
}
.ace-bacs-instr-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 175, 55, .25);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
@media (max-width: 480px) {
  .ace-bacs-instr-card { padding: 14px 16px; }
  .ace-bacs-instr-rek { font-size: 16px; }
  .ace-bacs-instr-amount { font-size: 18px; }
  .ace-bacs-instr-bank { gap: 10px; }
  .ace-bacs-instr-logo { width: 72px; }
  .ace-bacs-instr-bank-name { font-size: 13px; }
}

/* ============== TRIPAY CHANNEL PICKER (modal) ==============
 * Visual sibling of the BACS modal — same color tokens, rounded
 * corners, gold gradient CTA, mobile-bottom-sheet behavior.
 * Differences: a fee column on each tile, group section headers
 * (Virtual Account / E-Wallet / QRIS / Convenience Store), and
 * a 2-column grid (3 cols on desktop) for channel tiles. */

.ace-tripay-slot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--bg-3);
}
.ace-tripay-wrap { margin: 0; padding: 0; }
.ace-tripay-intro {
  margin: 0 0 12px !important;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.ace-tripay-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: none;
  border-radius: 10px;
  color: #0a0a0a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ace-tripay-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, .25);
}
.ace-tripay-open-btn[data-picked="1"] {
  background: linear-gradient(135deg, #2da24e, #1f8f3e);
  color: #fff;
}
.ace-tripay-open-icon { display: inline-flex; }

.ace-tripay-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ace-tripay-modal[hidden] { display: none; }
.ace-tripay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
}
.ace-tripay-panel {
  position: relative;
  background: var(--bg-2, #141414);
  border: 1px solid var(--bg-3, #262626);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  padding: 22px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.ace-tripay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ace-tripay-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.ace-tripay-close-x {
  background: transparent;
  border: 1px solid var(--bg-3);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ace-tripay-close-x:hover { color: var(--text); border-color: var(--text-dim); }

.ace-tripay-sub {
  margin: 0 0 14px !important;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.ace-tripay-empty {
  margin: 6px 0 !important;
  padding: 14px;
  background: rgba(255, 200, 60, .08);
  border: 1px solid rgba(255, 200, 60, .25);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}

.ace-tripay-group { margin-bottom: 18px; }
.ace-tripay-group:last-child { margin-bottom: 0; }
.ace-tripay-group-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gold);
}
/* Single-column row list — same shape as the BACS bank picker
 * so the buyer's mental model carries across modals. Each row
 * is a flat horizontal layout: icon | name (with fee under) |
 * picked badge on the right. No more 2-3 column grid. */
.ace-tripay-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Flex layout: icon | info-stack (name + fee). The DIPILIH
 * badge floats in the top-right corner via absolute positioning
 * so it doesn't compete with the row's content for horizontal
 * space — the previous grid had 4 items in 3 columns which
 * wrapped the badge under the icon. */
.ace-tripay-channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg, #0a0a0a);
  border: 1px solid var(--bg-3, #262626);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.ace-tripay-channel:hover {
  border-color: var(--gold);
}
.ace-tripay-channel.is-picked {
  border-color: #2da24e;
  background: rgba(45, 162, 78, .08);
}
.ace-tripay-channel-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 32px;
  background: #fff;
  border-radius: 6px;
  object-fit: contain;
  padding: 3px;
}
.ace-tripay-channel-icon-fallback {
  display: inline-block;
  background: linear-gradient(135deg, #333, #1a1a1a);
}
.ace-tripay-channel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  /* Reserve right padding so the absolutely-positioned DIPILIH
   * badge in the corner doesn't overlap a long channel name. */
  padding-right: 60px;
}
.ace-tripay-channel-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.ace-tripay-channel-fee {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.ace-tripay-channel-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 2px 6px;
  background: #2da24e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .4px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1;
}

/* ============== TRIPAY ORDER-RECEIVED INSTRUCTIONS ==============
 * Card on the thankyou page showing what the buyer needs to do
 * next: total amount, VA / pay code (with copy button) or QRIS
 * image, expiry warning, and Tripay-supplied step-by-step
 * instructions. Renders inside the WC thankyou template via the
 * woocommerce_thankyou_{gateway_id} action. */
.ace-tripay-instr {
  margin: 18px 0 28px;
  background: var(--bg-2, #141414);
  border: 1px solid var(--bg-3, #262626);
  border-radius: 14px;
  padding: 20px;
}
.ace-tripay-instr--paid { border-color: #2da24e; background: rgba(45,162,78,.06); }
.ace-tripay-instr-head { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--bg-3, #262626); }
.ace-tripay-instr-head h3 {
  margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--gold);
}
.ace-tripay-instr--paid .ace-tripay-instr-head h3 { color: #6fdf8a; }
.ace-tripay-instr-head p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-dim); }

.ace-tripay-instr-amount {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 14px; margin-bottom: 14px;
  background: var(--bg, #0a0a0a); border-radius: 10px;
}
.ace-tripay-instr-amount-label { font-size: 13px; color: var(--text-dim); }
.ace-tripay-instr-amount-value {
  font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums;
}

/* COD breakdown card — splits the headline amount into the
 * Tripay-paid DP and the cash-on-delivery remainder, so the buyer
 * understands why the "Total Bayar Sekarang" is much smaller than
 * the order total they saw at checkout. Sits between the head
 * paragraph and the standard amount badge. */
.ace-tripay-instr-cod {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ace-tripay-instr-cod-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.ace-tripay-instr-cod-row > strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ace-tripay-instr-cod-row--cash {
  padding-top: 8px;
  border-top: 1px dashed rgba(212,175,55,.25);
}
.ace-tripay-instr-cod-row--cash > strong {
  color: #cfcfcf;
}

/* QR image — bordered white card so dark theme doesn't kill
 * scanability. The white parent card is capped at ~280px so on
 * a wide desktop viewport the QR stays at a sensible scan size
 * instead of stretching to fill the order-received column. The
 * inner img also caps itself defensively in case a global
 * img{width:100%} rule wins specificity later. */
.ace-tripay-instr-qr {
  text-align: center;
  padding: 16px;
  margin: 0 auto 14px;
  background: #fff;
  border-radius: 10px;
  max-width: 280px;
  width: 100%;
  box-sizing: border-box;
}
.ace-tripay-instr-qr-img {
  display: block;
  margin: 0 auto 10px;
  max-width: 240px;
  width: 100%;
  height: auto;
}
.ace-tripay-instr-qr-note { margin: 0; font-size: 12px; color: #555; line-height: 1.5; }

/* Channel icon (bank/e-wallet logo from Tripay) — sits above the
 * VA number / QR code so the buyer instantly recognises the brand. */
.ace-tripay-instr-channel-icon {
  display: block; margin: 0 auto 10px;
  max-height: 36px; width: auto;
  object-fit: contain;
  background: #fff; border-radius: 6px;
  padding: 4px 8px;
}
.ace-tripay-instr-paycode .ace-tripay-instr-channel-icon { margin-bottom: 12px; }

/* VA / pay code block. Big tabular number + Salin button. */
.ace-tripay-instr-paycode {
  padding: 14px; margin-bottom: 14px;
  background: var(--bg, #0a0a0a); border-radius: 10px;
}
.ace-tripay-instr-paycode-label {
  display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.ace-tripay-instr-paycode-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ace-tripay-instr-paycode-value {
  flex: 1 1 auto; min-width: 0;
  font-size: 22px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: 1.5px;
  word-break: break-all;
}
.ace-tripay-instr-copy {
  padding: 8px 16px; background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold); border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ace-tripay-instr-copy:hover { background: var(--gold); color: #0a0a0a; }
.ace-tripay-instr-copy.is-copied { background: #2da24e; border-color: #2da24e; color: #fff; }

.ace-tripay-instr-cta-form {
  margin: 0 0 14px;
  padding: 0;
}
.ace-tripay-instr-cta {
  display: block; width: 100%; text-align: center;
  padding: 12px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0a0a0a !important; font-weight: 800; font-size: 14px;
  text-decoration: none !important; border-radius: 10px;
  border: 0; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ace-tripay-instr-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(212,175,55,.25); }
.ace-tripay-instr-cta-form .ace-tripay-instr-cta { margin-bottom: 0; }

.ace-tripay-instr-expiry {
  margin: 0 0 14px; padding: 10px 12px;
  background: rgba(255,200,60,.08); border: 1px solid rgba(255,200,60,.25);
  border-radius: 8px; font-size: 12px; color: var(--text); line-height: 1.5;
}

.ace-tripay-instr-steps { margin-top: 14px; }
.ace-tripay-instr-steps h4 {
  margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--text);
}
.ace-tripay-instr-step {
  margin-bottom: 6px; background: var(--bg, #0a0a0a);
  border: 1px solid var(--bg-3, #262626); border-radius: 8px; overflow: hidden;
}
.ace-tripay-instr-step summary {
  padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text);
  list-style: none;
}
.ace-tripay-instr-step summary::-webkit-details-marker { display: none; }
.ace-tripay-instr-step summary::after {
  content: '+'; float: right; font-weight: 400; color: var(--text-dim);
}
.ace-tripay-instr-step[open] summary::after { content: '−'; }
.ace-tripay-instr-step ol {
  margin: 0; padding: 6px 14px 14px 32px; font-size: 13px; line-height: 1.65; color: var(--text-dim);
}
.ace-tripay-instr-step ol li { margin-bottom: 4px; }

.ace-tripay-instr-foot {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--bg-3, #262626);
  font-size: 11px; color: var(--text-dim); line-height: 1.6;
}
.ace-tripay-instr-foot code {
  background: var(--bg, #0a0a0a); padding: 1px 6px; border-radius: 3px; font-size: 11px;
}

@media (max-width: 480px) {
  .ace-tripay-instr { padding: 14px; }
  .ace-tripay-instr-amount-value { font-size: 18px; }
  .ace-tripay-instr-paycode-value { font-size: 18px; letter-spacing: 1px; }
  .ace-tripay-instr-qr-img { max-width: 200px; }
}

/* QRIS branch: no modal, just a confirmation strip showing the
 * channel was auto-selected. Empty state (no QRIS channels at
 * all) gets the same warning style as other empty states. */
.ace-tripay-direct-cta {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(45, 162, 78, .08);
  border: 1px solid rgba(45, 162, 78, .25);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.ace-tripay-direct-cta.is-empty {
  background: rgba(255, 200, 60, .08);
  border-color: rgba(255, 200, 60, .25);
}

.ace-tripay-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--bg-3);
}
.ace-tripay-note {
  margin: 0 !important;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Desktop ≥768px → keep modal at default 520px; single-column
 * row layout doesn't need to widen for grid columns. */

/* Mobile bottom-sheet behavior — same pattern as BACS modal */
@media (max-width: 480px) {
  .ace-tripay-modal { padding: 12px; align-items: flex-end; }
  .ace-tripay-panel {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    padding: 18px;
    margin-bottom: 0;
  }
  .ace-tripay-open-btn { width: 100%; justify-content: center; }
  .ace-tripay-channel { padding: 10px 12px; }
  .ace-tripay-channel-icon { width: 42px; height: 28px; }
  .ace-tripay-channel-name { font-size: 13px; }
}

/* ============================================================
 * Live Chat — floating widget (replaces the old WA deep-link)
 * ============================================================ */

/* CRITICAL: child rules below set display:flex which would override
 * the HTML5 [hidden] attribute used to toggle visibility from JS.
 * Force [hidden] precedence inside the widget tree (and on the root
 * itself before JS reveals it). Without this the panel stays open
 * permanently and the X close button has no visible effect. */
.aceshop-lc-root[hidden],
.aceshop-lc-root [hidden] { display: none !important; }

.aceshop-lc-root {
  position: fixed;
  right: 16px;
  bottom: 80px;          /* clear the bottom-nav (mobile) */
  z-index: 99998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (min-width: 768px) {
  .aceshop-lc-root { bottom: 24px; right: 24px; }
}

/* Floating launcher bubble: hidden by default — the chat is opened
 * exclusively via the header chat icon (.js-aceshop-livechat-trigger).
 * The launcher stays in the DOM so JS hooks (badge, toggle) keep
 * working without conditional render branches. */
.aceshop-lc-launcher,
.aceshop-lc-launcher-badge { display: none !important; }

/* Unread badge that lives inside the header chat icon button. JS
 * unhides it when admin sends new messages and the panel is closed. */
.aceshop-lc-header-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0a0a;
  box-sizing: border-box;
  pointer-events: none;
}
.icon-btn { position: relative; }

.aceshop-lc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(360px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #141414;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  border: 1px solid rgba(212, 175, 55, .25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
}

.aceshop-lc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border-bottom: 1px solid rgba(212, 175, 55, .2);
}
.aceshop-lc-panel-head-left { display: flex; align-items: center; gap: 10px; }
.aceshop-lc-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}
.aceshop-lc-panel-title { font-size: 14px; font-weight: 700; color: var(--gold, #d4af37); }
.aceshop-lc-panel-sub   { font-size: 11px; color: #9ca3af; }

.aceshop-lc-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  opacity: .8;
}
.aceshop-lc-close:hover { opacity: 1; }

.aceshop-lc-prelogin {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.aceshop-lc-prelogin-text { color: #d1d5db; font-size: 13px; margin: 0 0 4px; line-height: 1.4; }
.aceshop-lc-prelogin label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af;
}
.aceshop-lc-prelogin input {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 9px 11px;
  color: #fff;
  font-size: 14px;
}
.aceshop-lc-prelogin input:focus {
  outline: none;
  border-color: var(--gold, #d4af37);
}
.aceshop-lc-btn-primary {
  background: var(--gold, #d4af37);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  font-size: 14px;
}
.aceshop-lc-btn-primary:hover { filter: brightness(1.1); }

.aceshop-lc-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* Anchor for the attach-menu and product picker overlays. */
  position: relative;
}
.aceshop-lc-messages {
  flex: 1;
  overflow-y: auto;
  /* overscroll-behavior:contain prevents scroll-chaining — when the
   * buyer hits the top/bottom of the messages list, the touch
   * gesture stops here instead of bubbling up and dragging the
   * page behind the chat. -webkit-overflow-scrolling:touch keeps
   * the inertial momentum on iOS Safari. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,175,55,.04), transparent 50%),
    #0a0a0a;
}
/* Same scroll-isolation on the panel itself so any other scrollable
 * descendant (welcome banner overflow, attachment preview, etc.)
 * also doesn't leak gestures up to the body. */
.aceshop-lc-panel { overscroll-behavior: contain; }
.aceshop-lc-welcome {
  align-self: center;
  text-align: center;
  background: rgba(212, 175, 55, .08);
  color: #d1d5db;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 8px 0;
  max-width: 90%;
  line-height: 1.5;
}
.aceshop-lc-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
.aceshop-lc-msg.user  { align-self: flex-end;  align-items: flex-end; }
.aceshop-lc-msg.admin { align-self: flex-start; align-items: flex-start; }
.aceshop-lc-msg-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.aceshop-lc-msg.user .aceshop-lc-msg-bubble {
  background: var(--gold, #d4af37);
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
}
/* Failed-send marker — set by JS when the server rejects the message
 * but the optimistic bubble has already rendered. Half-opaque + red
 * border lets the buyer know to retry. */
.aceshop-lc-msg-failed .aceshop-lc-msg-bubble {
  opacity: .55;
  outline: 1px solid #ef4444;
}
.aceshop-lc-msg.admin .aceshop-lc-msg-bubble {
  background: #1f1f1f;
  color: #fff;
  border: 1px solid #2a2a2a;
  border-bottom-left-radius: 4px;
}
.aceshop-lc-msg-bubble a {
  color: inherit;
  text-decoration: underline;
}
.aceshop-lc-msg-time {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
  padding: 0 4px;
}

.aceshop-lc-form {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #1f1f1f;
  background: #0f0f0f;
}
.aceshop-lc-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid #2a2a2a;
  background: #0a0a0a;
  color: #fff;
  border-radius: 18px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-height: 120px;
  min-height: 38px;
}
.aceshop-lc-form textarea:focus {
  outline: none;
  border-color: var(--gold, #d4af37);
}
.aceshop-lc-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--gold, #d4af37);
  color: #0a0a0a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
}
.aceshop-lc-send:hover { filter: brightness(1.1); }

@media (max-width: 480px) {
  .aceshop-lc-panel {
    /* Cap mobile panel to a comfortable smaller size — was nearly
     * full-screen at calc(100vw - 16px) × calc(100vh - 100px) which
     * felt overwhelming. The min() formulas keep tiny phones (320px)
     * usable while medium/large mobiles (414/459px+) get the cap. */
    width: min(340px, calc(100vw - 24px));
    height: min(520px, calc(100vh - 140px));
    right: 8px;
  }
}

/* ============================================================
 * Live Chat — attachments (product card / photo) + composer UI
 * ============================================================ */

.aceshop-lc-attach-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: #d4af37;
  border: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  cursor: pointer;
  transition: background .15s ease;
}
.aceshop-lc-attach-btn:hover { background: rgba(212, 175, 55, .1); }

/* Slide-up menu over the input bar */
.aceshop-lc-attach-menu {
  position: absolute;
  left: 10px;
  bottom: 60px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  z-index: 5;
}
.aceshop-lc-attach-item {
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
}
.aceshop-lc-attach-item:hover { background: rgba(212, 175, 55, .12); }
.aceshop-lc-attach-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  width: 22px;
}
.aceshop-lc-attach-hint { color: #6b7280; font-size: 11px; margin-left: auto; }

/* Staged attachment preview above the composer */
.aceshop-lc-attach-preview {
  position: relative;
  margin: 0 10px 6px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px 32px 8px 8px;
}
.aceshop-lc-prev-card {
  display: flex;
  gap: 10px;
  align-items: center;
}
.aceshop-lc-prev-card img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #0a0a0a;
}
.aceshop-lc-prev-meta { min-width: 0; flex: 1; }
.aceshop-lc-prev-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aceshop-lc-prev-price {
  font-size: 11px;
  color: var(--gold, #d4af37);
  margin-top: 2px;
}
.aceshop-lc-prev-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aceshop-lc-prev-remove:hover { background: rgba(239, 68, 68, .2); color: #ef4444; }

/* Product picker modal — overlays the thread (anchored to
 * .aceshop-lc-thread which is position:relative). */
.aceshop-lc-product-picker {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.aceshop-lc-product-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #1f1f1f;
  font-weight: 600;
  font-size: 14px;
  color: var(--gold, #d4af37);
}
.aceshop-lc-product-picker-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
}
.aceshop-lc-product-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aceshop-lc-product-pick-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #141414;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  width: 100%;
}
.aceshop-lc-product-pick-row:hover {
  border-color: rgba(212, 175, 55, .4);
  background: #1a1a1a;
}
.aceshop-lc-product-pick-row img,
.aceshop-lc-product-pick-noimg {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #0a0a0a;
  flex-shrink: 0;
}
.aceshop-lc-product-pick-meta { flex: 1; min-width: 0; }
.aceshop-lc-product-pick-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}
.aceshop-lc-product-pick-price {
  font-size: 12px;
  color: var(--gold, #d4af37);
  margin-top: 4px;
}
.aceshop-lc-product-picker-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 30px 14px;
  line-height: 1.5;
}

/* Attachment cards inside message bubbles */
.aceshop-lc-att-product {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, .15);
  border-radius: 10px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.aceshop-lc-msg.user .aceshop-lc-att-product { background: rgba(0, 0, 0, .2); }
.aceshop-lc-msg.admin .aceshop-lc-att-product { background: rgba(255, 255, 255, .05); }
.aceshop-lc-att-product-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.aceshop-lc-att-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aceshop-lc-att-product-meta {
  min-width: 0;
  flex: 1;
}
.aceshop-lc-att-product-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.aceshop-lc-att-product-price {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}
.aceshop-lc-msg-body {
  margin-top: 4px;
}
.aceshop-lc-att-image {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
  max-width: 180px;
}
.aceshop-lc-att-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
}

/* Admin-side mirror styles for attachments rendered in the WP-admin
 * thread. The admin panel's CSS lives inline in PHP, but these classes
 * appear there too so the thread looks identical. */
.aceshop-lc-admin-messages .aceshop-lc-att-product {
  background: #f6f7f7;
  color: #1d2327;
  margin-bottom: 6px;
}
.aceshop-lc-admin-messages .msg.admin .aceshop-lc-att-product {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}
.aceshop-lc-admin-messages .aceshop-lc-att-image { max-width: 240px; }


/* ============================================================
 * Checkout — hide the top header on both desktop AND mobile.
 *
 * Rationale: checkout is a focused, single-task screen. The
 * global header (logo + search + bell + chat + cart icons) is
 * just visual noise that competes with the buyer's flow. The
 * order summary + Buat Pesanan CTA already provide everything
 * needed to complete the purchase. The bottom-nav is also
 * suppressed elsewhere (see ~line 859) for the same reason.
 *
 * WooCommerce adds `.woocommerce-checkout` to <body> on the
 * checkout page (both shortcode and block versions). The header
 * is sticky (not fixed) so hiding via display:none lets the page
 * reflow naturally — no padding adjustment needed.
 *
 * Carve-out: .woocommerce-order-received (the thank-you /
 * payment-instructions page) shares the .woocommerce-checkout
 * body class but is no longer a "focused buying flow" — the
 * buyer needs Home/Pesanan/Akun navigation again to leave the
 * payment screen, so we keep the top header visible there. */
body.woocommerce-checkout:not(.woocommerce-order-received) .top-header { display: none !important; }

/* ============================================================
 * NOTIFICATIONS CENTER (bell icon + dropdown panel)
 * ============================================================ */

.aceshop-notif-trigger { position: relative; }

/* Badge — same dimensions/positioning as the live-chat badge so
 * adjacent icons line up visually. Red on dark border for
 * contrast. */
.aceshop-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0a0a;
  box-sizing: border-box;
  pointer-events: none;
}
.aceshop-notif-badge[hidden] { display: none !important; }

/* Dropdown panel — full screen on mobile (slide up from below
 * the header), pinned dropdown on desktop (anchored top-right). */
.aceshop-notif-panel {
  position: fixed;
  top: 60px;
  right: 12px;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
}
.aceshop-notif-panel[hidden] { display: none !important; }

/* Mobile: full-width sheet pinned to top */
@media (max-width: 767.98px) {
  .aceshop-notif-panel {
    top: 56px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 76px);
  }
}

.aceshop-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
  background: #1a1a1a;
}
.aceshop-notif-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.aceshop-notif-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aceshop-notif-mark-all {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #d4af37;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.aceshop-notif-mark-all:hover { background: #1f1f1f; }
.aceshop-notif-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 22px;
  line-height: 1;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
}
.aceshop-notif-close:hover { color: #fff; background: #1f1f1f; }

.aceshop-notif-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.aceshop-notif-empty {
  margin: 0;
  padding: 32px 16px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

.aceshop-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #1f1f1f;
  text-decoration: none;
  color: #ddd;
  transition: background 0.15s ease;
}
.aceshop-notif-item:hover { background: #1a1a1a; color: #fff; }
.aceshop-notif-item:last-child { border-bottom: none; }
.aceshop-notif-item.aceshop-notif-unread {
  background: rgba(212, 175, 55, 0.06);
  border-left: 3px solid #d4af37;
  padding-left: 13px;
}
.aceshop-notif-item.aceshop-notif-unread:hover { background: rgba(212, 175, 55, 0.1); }

.aceshop-notif-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #1f1f1f;
  border-radius: 50%;
  margin-top: 2px;
}

.aceshop-notif-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.aceshop-notif-title {
  font-weight: 600;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.35;
}
.aceshop-notif-body {
  color: #aaa;
  font-size: 12.5px;
  line-height: 1.45;
  /* Cap to 2 lines so long messages don't blow up the panel. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aceshop-notif-time {
  color: #666;
  font-size: 11px;
  margin-top: 2px;
}

.aceshop-notif-foot {
  border-top: 1px solid #2a2a2a;
  padding: 10px 16px;
  text-align: center;
  background: #1a1a1a;
}
.aceshop-notif-foot a {
  color: #d4af37;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}
.aceshop-notif-foot a:hover { text-decoration: underline; }

/* Lock body scroll while panel is open on mobile (prevents
 * background scroll-chaining when user reaches end of list). */
@media (max-width: 767.98px) {
  body.aceshop-notif-open { overflow: hidden; }
}

/* "Ingatkan Saya" button on OOS products — outline gold style
 * matching the secondary action buttons (Pesan, +Keranjang).
 * Uses transparent background + 1.5px gold border + gold text so
 * it visually grouped as a "non-purchase" CTA (since user isn't
 * actually buying — just subscribing). */
.aceshop-remind-btn {
  background: transparent !important;
  color: #d4af37 !important;
  border: 1.5px solid #d4af37 !important;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}
.aceshop-remind-btn:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.08) !important;
  transform: translateY(-1px);
}
.aceshop-remind-btn.is-watching {
  background: rgba(212, 175, 55, 0.06) !important;
  color: #888 !important;
  border-color: #3a3a3a !important;
  cursor: default;
}

/* "Ingatkan Saya" confirmation modal */
.aceshop-remind-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.aceshop-remind-modal[hidden] { display: none !important; }

.aceshop-remind-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
}
.aceshop-remind-panel {
  position: relative;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
  color: #fff;
  animation: aceshop-remind-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes aceshop-remind-pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.aceshop-remind-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
}
.aceshop-remind-close:hover { color: #fff; background: #1f1f1f; }

.aceshop-remind-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: aceshop-remind-bell-shake 0.6s ease;
}
@keyframes aceshop-remind-bell-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(10deg); }
}
.aceshop-remind-panel h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: #fff;
}
.aceshop-remind-product {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #d4af37;
  font-weight: 500;
  font-style: italic;
  word-break: break-word;
}
.aceshop-remind-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: #ccc;
  line-height: 1.5;
}
.aceshop-remind-channels {
  list-style: none;
  margin: 0 0 18px;
  padding: 14px;
  text-align: left;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  font-size: 13px;
  color: #ddd;
}
.aceshop-remind-channels li {
  padding: 4px 0;
  line-height: 1.5;
}
.aceshop-remind-email-display {
  color: #d4af37;
  font-weight: 600;
}

.aceshop-remind-guest-fields {
  margin: 0 0 16px;
  text-align: left;
}
.aceshop-remind-guest-fields label {
  display: block;
  font-size: 13px;
  color: #ddd;
  margin-bottom: 6px;
  font-weight: 500;
}
.aceshop-remind-guest-fields input {
  width: 100%;
  padding: 10px 12px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.aceshop-remind-guest-fields input:focus {
  outline: none;
  border-color: #d4af37;
}
.aceshop-remind-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}
.aceshop-remind-hint a {
  color: #d4af37;
  text-decoration: none;
  font-weight: 500;
}

.aceshop-remind-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.aceshop-remind-cancel,
.aceshop-remind-confirm {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.aceshop-remind-cancel {
  background: #2a2a2a;
  color: #ddd;
}
.aceshop-remind-cancel:hover { background: #3a3a3a; }
.aceshop-remind-confirm {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  color: #0a0a0a;
}
.aceshop-remind-confirm:hover:not(:disabled) {
  transform: translateY(-1px);
}
.aceshop-remind-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aceshop-remind-success,
.aceshop-remind-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.aceshop-remind-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}
.aceshop-remind-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ============================================================
 * GOOGLE LOGIN BUTTON
 *
 * Rendered after the standard WC login form (and registration
 * form) via the woocommerce_login_form_end hook. Visually
 * positioned as an alternative path: divider line with "atau"
 * label, then a white-bg button with the official Google "G"
 * mark — matches the visual language Google recommends for
 * "Sign in with Google" buttons.
 * ============================================================ */

.aceshop-google-divider {
  position: relative;
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.aceshop-google-divider::before,
.aceshop-google-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}
.aceshop-google-divider span {
  padding: 0 12px;
  background: transparent;
}

.aceshop-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.aceshop-google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  color: #1f1f1f;
  text-decoration: none;
}
.aceshop-google-btn:active {
  transform: scale(0.98);
  background: #f1f3f4;
}
.aceshop-google-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.aceshop-google-btn span {
  font-family: 'Roboto', 'Segoe UI', -apple-system, sans-serif;
  letter-spacing: 0.1px;
}

/* Full-page notifications view at /my-account/notifikasi/ */
.aceshop-notif-fullpage {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aceshop-notif-fullpage .aceshop-notif-row {
  display: block;
  padding: 14px 16px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  text-decoration: none;
  color: #ddd;
  transition: border-color 0.15s ease;
}
.aceshop-notif-fullpage .aceshop-notif-row:hover { border-color: #d4af37; }
.aceshop-notif-fullpage .aceshop-notif-row.aceshop-notif-unread {
  border-left: 3px solid #d4af37;
}
.aceshop-notif-fullpage .aceshop-notif-row strong {
  display: block;
  color: #fff;
  font-size: 14px;
  margin-bottom: 4px;
}
.aceshop-notif-fullpage .aceshop-notif-row p {
  margin: 6px 0 0;
  color: #aaa;
  font-size: 13px;
  line-height: 1.5;
}
.aceshop-notif-fullpage .aceshop-notif-time {
  display: inline-block;
  font-size: 11px;
  color: #666;
}

