/* Fondasi header bersama untuk halaman non-index; V5 tetap mengatur tampilan utama. */
.site-header.thb-global-header, .site-header.thb-global-header *, .site-header.thb-global-header *::before, .site-header.thb-global-header *::after {box-sizing:border-box}
.site-header.thb-global-header{width:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.45;color:#1d392c}
.site-header.thb-global-header .header-shell{width:100%;position:relative}
.site-header.thb-global-header .brand-block{display:flex;align-items:center;text-decoration:none;color:#193629}
.site-header.thb-global-header .brand-block img{object-fit:contain}
.site-header.thb-global-header .brand-block span{display:flex;flex-direction:column;min-width:0}
.site-header.thb-global-header .brand-block strong{display:block;margin:0}
.site-header.thb-global-header .brand-block small{display:block;margin:0;font-weight:500}
.site-header.thb-global-header .thb-header-search{margin:0;max-width:none;min-width:0}
.site-header.thb-global-header .thb-header-search input{display:block;width:100%;min-width:0;height:auto!important;margin:0!important;max-width:none;padding:10px 0!important;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;outline:none!important;font-weight:500!important}
.site-header.thb-global-header .thb-header-search button{width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;white-space:nowrap;line-height:1.3;box-shadow:none!important}
.site-header.thb-global-header .main-nav{min-height:40px;box-sizing:border-box}
.site-header.thb-global-header .main-nav a{font-family:inherit;text-decoration:none;line-height:1.4}
.site-header.thb-global-header .main-nav a[aria-current="page"]{background:#e7f1ea!important;color:#18583b!important}
.site-header.thb-global-header .thb-header-actions{display:flex;align-items:center}
.site-header.thb-global-header .nav-cart{min-width:0;flex:0 0 auto}
.site-header.thb-global-header .thb-cart-ico{width:21px;height:21px;display:block;flex:0 0 21px}
.site-header.thb-global-header .cart-count-badge{font-family:inherit}
.site-header.thb-global-header .header-visitor-icon{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#e8f3eb;color:#217044;flex:0 0 26px;font-size:.75rem}
.site-header.thb-global-header .header-visitor > span:last-child{display:flex;flex-direction:column;line-height:1.1}
.site-header.thb-global-header .header-visitor strong{font-size:13px;color:#185a3a}
.site-header.thb-global-header .header-visitor small{font-size:9px;color:#738578;letter-spacing:.07em;text-transform:uppercase;margin-top:3px}
.site-header.thb-global-header .live-notification-wrap{position:relative;flex:0 0 auto}
.site-header.thb-global-header .live-notification-bell{position:relative;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #d9e4db;border-radius:12px;width:42px;height:42px;padding:8px;min-height:0;cursor:pointer;color:#174d32}
.site-header.thb-global-header .live-notification-bell svg{width:21px;height:21px}
.site-header.thb-global-header .live-notification-badge{position:absolute;right:-7px;top:-7px;background:#d83939;color:#fff;font:800 11px/1 system-ui;border-radius:20px;min-width:19px;padding:4px;display:flex;justify-content:center}
.site-header.thb-global-header [hidden]{display:none!important}
.site-header.thb-global-header .live-notification-panel{position:absolute;right:0;top:calc(100% + 11px);width:min(375px,calc(100vw - 24px));max-width:none;border:1px solid #dce6dd;border-radius:16px;background:#fff;box-shadow:0 20px 48px rgba(26,55,38,.18);z-index:9999;overflow:hidden}
.site-header.thb-global-header .live-notification-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 15px;border-bottom:1px solid #edf0ed}
.site-header.thb-global-header .live-notification-head strong{font-size:14px;color:#203929}
.site-header.thb-global-header .live-notification-head button{width:auto;min-height:0;margin:0;padding:3px;border:0;background:transparent;color:#216442;font-size:11px;font-weight:700;cursor:pointer;box-shadow:none}
.site-header.thb-global-header .live-notification-list{max-height:300px;overflow:auto}
.site-header.thb-global-header .live-notification-item{display:block;padding:12px 15px;text-decoration:none;color:#203728;border-bottom:1px solid #eef0ee;font-size:12px}
.site-header.thb-global-header .live-notification-item.unread{background:#f1f7f2}
.site-header.thb-global-header .live-notification-item:hover{background:#ebf4ef}
.site-header.thb-global-header .live-notification-title{display:block;font-size:12px;font-weight:800}
.site-header.thb-global-header .live-notification-message,.site-header.thb-global-header .live-notification-time{display:block;color:#657568;font-size:11px;margin-top:4px}
.site-header.thb-global-header .live-notification-empty{padding:22px 14px;text-align:center;font-size:12px;color:#68766b}
.site-header.thb-global-header .live-notification-footer{display:block;padding:12px;text-decoration:none;text-align:center;color:#226844;font-size:12px;font-weight:800}
.site-header.thb-global-header .thb-header-logout{margin-left:auto;margin-top:0;margin-bottom:0;display:block}
.site-header.thb-global-header .thb-header-logout button{width:auto;min-height:0;margin:0;padding:7px 13px;border-radius:9px;border:1px solid #d5e4d8;color:#1e6040;background:white;font:700 12px/1.5 system-ui;cursor:pointer;box-shadow:none}
.site-header.thb-global-header .thb-checkout-secure{margin-left:auto;color:#486e57;font-size:12px;font-weight:750;white-space:nowrap}
@media(max-width:850px){.site-header.thb-global-header .main-nav .thb-header-logout{margin-left:0;flex:0 0 auto}.site-header.thb-global-header .thb-checkout-secure{display:none}.site-header.thb-global-header .thb-header-actions{min-width:0}.site-header.thb-global-header .live-notification-panel{position:fixed;right:12px;left:12px;top:150px;width:auto}.site-header.thb-global-header .main-nav a[aria-current="page"]{flex:0 0 auto}}
@media(max-width:390px){.site-header.thb-global-header .brand-block strong{font-size:.89rem!important}.site-header.thb-global-header .thb-header-actions{gap:5px!important}}


/* Member header: samakan ukuran, proporsi, dan tombol dengan header index.php. */
.site-header.thb-global-header .header-action-btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  min-height:38px!important;padding:8px 13px!important;border:1px solid #d7e4da!important;
  border-radius:999px!important;background:#fff!important;color:#1e5c3a!important;
  font:700 12px/1.2 Figtree,system-ui,sans-serif!important;white-space:nowrap!important;
  box-shadow:0 4px 14px rgba(31,78,50,.04)!important;cursor:pointer!important;transition:background .18s,border-color .18s,transform .18s!important;
}
.site-header.thb-global-header .header-action-btn:hover{background:#f5faf6!important;border-color:#bfd6c4!important;transform:translateY(-1px)!important}
.site-header.thb-global-header .header-action-btn[hidden]{display:none!important}
.site-header.thb-global-header .header-action-btn:disabled{cursor:default!important;opacity:.78!important;transform:none!important}
.site-header.thb-global-header .notify-enable-btn.is-active{background:#edf7ef!important;border-color:#c7dec9!important;color:#1b6a3d!important}
.site-header.thb-global-header .thb-login-bell{position:relative!important;display:grid!important;place-items:center!important;width:34px!important;height:34px!important;flex:0 0 34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#173f2b!important;text-decoration:none!important;box-shadow:none!important}
.site-header.thb-global-header .thb-login-bell:hover{background:#eef5ef!important}
.site-header.thb-global-header .thb-login-bell svg{display:block!important;width:19px!important;height:19px!important;stroke:currentColor!important;fill:none!important}
.site-header.thb-global-header .thb-header-logout button{min-height:36px!important;padding:8px 16px!important;border:1px solid #d7e4da!important;border-radius:999px!important;background:#fff!important;color:#1e6040!important;font:700 12px/1.2 Figtree,system-ui,sans-serif!important}
.site-header.thb-global-header .thb-header-logout button:hover{background:#eef5ef!important}
@media(max-width:1023px){
  .site-header.thb-global-header .header-action-btn{display:none!important}
}


/* Master header alignment: mirror index.php layout, green promo strip, white two-row header. */
.thb-topline{display:block!important;height:27px!important;min-height:27px!important;padding:0!important;margin:0!important;overflow:hidden!important;background:#173f2b!important;color:#eaf3ec!important;text-align:center!important;font:600 10px/27px Figtree,system-ui,-apple-system,"Segoe UI",sans-serif!important;letter-spacing:0!important}
.thb-topline:before{content:"Diskon buku pilihan setiap hari  ·  Lacak pesanan kapan saja";display:block!important}
.site-header.thb-premium-header.thb-global-header{position:relative!important;top:auto!important;z-index:100!important;width:100%!important;overflow:visible!important;margin:0!important;padding:0!important;background:#fff!important;color:#193f2d!important;border:0!important;border-bottom:1px solid #e2ebe4!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
.site-header.thb-premium-header.thb-global-header .header-shell{display:grid!important;grid-template-columns:250px minmax(300px,1fr) auto!important;grid-template-rows:auto auto!important;align-items:center!important;gap:10px 28px!important;width:100%!important;max-width:1180px!important;min-width:0!important;margin:0 auto!important;padding:13px 18px 9px!important;box-sizing:border-box!important}
.site-header.thb-premium-header.thb-global-header .brand-block{grid-column:1!important;grid-row:1!important;display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;text-decoration:none!important;color:#173f2b!important}
.site-header.thb-premium-header.thb-global-header .brand-block img{width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important;object-fit:contain!important;border:0!important;border-radius:11px!important;padding:3px!important;background:#f0f6f1!important;box-shadow:none!important}
.site-header.thb-premium-header.thb-global-header .brand-block strong{display:block!important;margin:0!important;color:#173f2b!important;font:800 17px/1.15 Figtree,system-ui,sans-serif!important;letter-spacing:-.035em!important}
.site-header.thb-premium-header.thb-global-header .brand-block small{display:none!important}
.site-header.thb-premium-header.thb-global-header .thb-header-search{grid-column:2!important;grid-row:1!important;position:relative!important;display:flex!important;align-items:center!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:46px!important;margin:0!important;padding:5px 5px 5px 18px!important;box-sizing:border-box!important;border:0!important;border-radius:999px!important;background:#eef5ef!important;box-shadow:none!important;overflow:visible!important;z-index:220!important}
.site-header.thb-premium-header.thb-global-header .thb-header-search svg{width:18px!important;height:18px!important;flex:0 0 18px!important;color:#7c9585!important}
.site-header.thb-premium-header.thb-global-header .thb-header-search input{display:block!important;flex:1!important;min-width:0!important;width:100%!important;height:auto!important;margin:0!important;padding:10px 0!important;border:0!important;border-radius:0!important;outline:0!important;background:transparent!important;color:#253c2e!important;font:500 12px/1.4 Figtree,system-ui,sans-serif!important;box-shadow:none!important}
.site-header.thb-premium-header.thb-global-header .thb-header-search button{flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:10px 21px!important;border:0!important;border-radius:999px!important;background:#173f2b!important;color:#fff!important;font:700 12px/1.3 Figtree,system-ui,sans-serif!important;white-space:nowrap!important;box-shadow:none!important}
.site-header.thb-premium-header.thb-global-header .thb-header-actions{grid-column:3!important;grid-row:1!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;min-width:0!important;padding:0!important}
.site-header.thb-premium-header.thb-global-header .live-notification-bell,.site-header.thb-premium-header.thb-global-header .thb-login-bell,.site-header.thb-premium-header.thb-global-header .nav-cart{display:inline-flex!important;align-items:center!important;justify-content:center!important;color:#173f2b!important;background:transparent!important;border:0!important;box-shadow:none!important}
.site-header.thb-premium-header.thb-global-header .nav-cart{position:relative!important;min-height:34px!important;width:34px!important;padding:0!important}
.site-header.thb-premium-header.thb-global-header .thb-cart-label{display:none!important}
.site-header.thb-premium-header.thb-global-header .header-visitor{display:flex!important;align-items:center!important;gap:8px!important;padding-left:12px!important;border-left:1px solid #e0e8e2!important;color:#244332!important}
.site-header.thb-premium-header.thb-global-header .header-visitor-icon{display:none!important}
.site-header.thb-premium-header.thb-global-header .header-visitor strong{display:block!important;font-size:12px!important;color:#244332!important}
.site-header.thb-premium-header.thb-global-header .header-visitor small{display:block!important;color:#829086!important;font-size:9px!important}
.site-header.thb-premium-header.thb-global-header .main-nav{grid-column:1/-1!important;grid-row:2!important;display:flex!important;align-items:center!important;gap:7px!important;min-height:34px!important;margin:0!important;padding:0!important;flex-wrap:wrap!important;overflow:visible!important}
.site-header.thb-premium-header.thb-global-header .main-nav>a{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:9px 14px!important;border:0!important;border-radius:999px!important;background:transparent!important;color:#53685b!important;font:650 12px/1.2 Figtree,system-ui,sans-serif!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important}
.site-header.thb-premium-header.thb-global-header .main-nav>a[aria-current="page"]{background:#173f2b!important;color:#fff!important}
.site-header.thb-premium-header.thb-global-header .main-nav>a:hover{background:#eef5ef!important;color:#173f2b!important}
.site-header.thb-premium-header.thb-global-header .main-nav>a[aria-current="page"]:hover{background:#173f2b!important;color:#fff!important}
@media(max-width:900px){
 .site-header.thb-premium-header.thb-global-header .header-shell{grid-template-columns:minmax(150px,1fr) minmax(0,2fr)!important;gap:10px 14px!important}
 .site-header.thb-premium-header.thb-global-header .thb-header-search{grid-column:2!important;grid-row:1!important}
 .site-header.thb-premium-header.thb-global-header .thb-header-actions{grid-column:1/-1!important;grid-row:2!important;justify-content:flex-end!important}
 .site-header.thb-premium-header.thb-global-header .main-nav{grid-row:3!important}
}
@media(max-width:600px){
 .thb-topline{font-size:9px!important}
 .site-header.thb-premium-header.thb-global-header .header-shell{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;padding:10px 12px 8px!important;gap:9px!important}
 .site-header.thb-premium-header.thb-global-header .brand-block{grid-column:1!important;grid-row:1!important}
 .site-header.thb-premium-header.thb-global-header .thb-header-search{grid-column:1!important;grid-row:2!important;min-height:42px!important}
 .site-header.thb-premium-header.thb-global-header .thb-header-actions{grid-column:1!important;grid-row:3!important;justify-content:flex-start!important}
 .site-header.thb-premium-header.thb-global-header .main-nav{grid-column:1!important;grid-row:4!important;gap:3px!important}
 .site-header.thb-premium-header.thb-global-header .main-nav>a{padding:8px 10px!important;font-size:11px!important}
}


/* THB shared header spacing + mobile consistency v3 */
.site-header.thb-premium-header.thb-global-header .header-shell {
  row-gap: 6px !important;
  padding-bottom: 5px !important;
}
.site-header.thb-premium-header.thb-global-header + main,
.site-header.thb-premium-header.thb-global-header + .page-main,
.site-header.thb-premium-header.thb-global-header + .order-lookup-main {
  margin-top: 18px !important;
}
@media (max-width: 600px) {
  .site-header.thb-premium-header.thb-global-header .header-shell {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    align-items: center !important;
    gap: 7px 7px !important;
    padding: 9px 13px 6px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .site-header.thb-premium-header.thb-global-header .brand-block {
    grid-column: 1 !important; grid-row: 1 !important;
    min-width: 0 !important; gap: 7px !important;
  }
  .site-header.thb-premium-header.thb-global-header .brand-block img {
    width: 36px !important; height: 36px !important;
    min-width: 36px !important; flex-basis: 36px !important;
  }
  .site-header.thb-premium-header.thb-global-header .brand-block strong {
    font-size: 13px !important; white-space: nowrap !important;
  }
  .site-header.thb-premium-header.thb-global-header .brand-block small { display:none !important; }
  .site-header.thb-premium-header.thb-global-header .thb-header-actions {
    grid-column: 2 !important; grid-row: 1 !important;
    display:flex !important; align-items:center !important; justify-content:flex-end !important;
    gap:5px !important; min-width:max-content !important; width:auto !important; margin:0 !important;
  }
  .site-header.thb-premium-header.thb-global-header .thb-header-search {
    grid-column: 1 / -1 !important; grid-row: 2 !important;
    width:100% !important; min-width:0 !important; min-height:40px !important;
  }
  .site-header.thb-premium-header.thb-global-header .thb-header-search input { min-width:0 !important; font-size:12px !important; }
  .site-header.thb-premium-header.thb-global-header .thb-header-search button { padding:8px 13px !important; }
  .site-header.thb-premium-header.thb-global-header .header-visitor { display:none !important; }
  .site-header.thb-premium-header.thb-global-header .nav-cart {
    display:inline-flex !important; position:relative !important;
    flex:0 0 34px !important; width:34px !important; min-width:34px !important;
    height:35px !important; visibility:visible !important; opacity:1 !important;
  }
  .site-header.thb-premium-header.thb-global-header .nav-cart .thb-cart-ico { width:22px !important; height:22px !important; }
  .site-header.thb-premium-header.thb-global-header .nav-cart .cart-count-badge {
    display:inline-flex !important; position:absolute !important; top:-3px !important; right:-4px !important;
  }
  .site-header.thb-premium-header.thb-global-header .main-nav {
    grid-column:1 / -1 !important; grid-row:3 !important;
    display:flex !important; flex-wrap:nowrap !important; align-items:center !important;
    gap:3px !important; width:100% !important; min-width:0 !important;
    min-height:34px !important; margin:0 !important; padding:0 0 2px !important;
    overflow-x:auto !important; overflow-y:hidden !important; white-space:nowrap !important;
    -webkit-overflow-scrolling:touch !important; scrollbar-width:none !important;
  }
  .site-header.thb-premium-header.thb-global-header .main-nav::-webkit-scrollbar { display:none !important; }
  .site-header.thb-premium-header.thb-global-header .main-nav > a {
    flex:0 0 auto !important; min-height:31px !important;
    padding:7px 9px !important; font-size:10.5px !important; white-space:nowrap !important;
  }
}
@media (max-width:380px) {
  .site-header.thb-premium-header.thb-global-header .header-shell { padding-left:10px !important; padding-right:10px !important; }
  .site-header.thb-premium-header.thb-global-header .brand-block strong { font-size:12px !important; }
  .site-header.thb-premium-header.thb-global-header .brand-block img { width:32px !important;height:32px !important;min-width:32px !important;flex-basis:32px !important; }
}
