/* ===================================================
   BIAS Store: storefront
   Monochrome, near-black accent #1b1b1b. Separate brand from Little English (see DESIGN.md, Out of scope).
   =================================================== */

/* Elements with the hidden attribute stay hidden even when a class gives them a display value. */
[hidden] { display: none !important; }

:root {
  --ink-50:   #f5f5f5;
  --ink-100:  #ebebeb;
  --ink-200:  #d4d4d4;
  --ink-300:  #b8b8b8;
  --ink-400:  #7a7a7a;
  --ink-500:  #505050;
  --ink-600:  #1b1b1b;
  --ink-700:  #111111;

  --bg:           #f8fafc;
  --surface:      #ffffff;
  --border:       #cbd5e1;
  --border-light: #e2e8f0;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #64748b;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --header-h:  64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text-primary);
  margin: 0; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-600); text-decoration: none; }
a:hover { color: var(--ink-700); }
img { max-width: 100%; display: block; }

/* ===== HEADER ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 16px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.logo-img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.logo-name { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; letter-spacing: -.2px; }
.logo-sub  { font-size: 13.5px; color: var(--text-muted); }

.search-wrap { flex: 1; max-width: 440px; margin-right: auto; }
.search-input-wrap { position: relative; }
.search-input {
  width: 100%; height: 44px; padding: 0 42px 0 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; color: var(--text-primary);
  background: var(--bg); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--ink-500); box-shadow: 0 0 0 3px rgba(27,27,27,.12); background: var(--surface); }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  position: absolute; right: 0; top: 0; bottom: 0; width: 42px;
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: color .15s;
}
.search-btn:hover { color: var(--ink-600); }
.search-btn .mdi { font-size: 17px; }

.search-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  z-index: 200; max-height: 400px; overflow-y: auto; display: none;
}
.suggestion-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; transition: background .1s;
  border-bottom: 1px solid var(--border-light);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--ink-50); }
.suggestion-item img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }
.suggestion-item .s-name  { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.suggestion-item .s-price { font-size: 14.5px; color: var(--ink-600); font-weight: 600; margin-top: 2px; }

/* ===== CART TOAST ===== */
.cart-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1b1b1b; color: #fff; border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 15.5px; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.25); z-index: 9999;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
  max-width: calc(100vw - 32px);
}
.cart-toast-btn {
  flex-shrink: 0; white-space: nowrap;
  padding: 5px 11px; background: #fff; color: #1b1b1b;
  border-radius: 6px; font-size: 14.5px; font-weight: 700; text-decoration: none;
}
@media (max-width: 480px) {
  .cart-toast { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== SALES NOTIFICATION (social proof popup) ===== */
.sales-notify {
  position: fixed; left: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 320px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 12px 34px 12px 12px;
  display: flex; align-items: flex-start; gap: 10px;
  z-index: 800; opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: opacity .25s, transform .25s;
}
.sales-notify.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sn-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink-600); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.sn-body { min-width: 0; }
.sn-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sn-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.sn-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.sn-close {
  position: absolute; top: 6px; right: 8px; width: 20px; height: 20px;
  border: none; background: none; color: var(--text-muted); cursor: pointer;
  font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.sn-close:hover { color: var(--text-primary); }
@media (max-width: 480px) {
  .sales-notify { left: 12px; right: 12px; max-width: none; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.wa-float {
  position: fixed; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 700; transition: transform .15s, box-shadow .15s;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(0,0,0,.3); color: #fff; }
@media (max-width: 480px) {
  body.has-bottom-bar .wa-float { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

@keyframes cartBump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.18); }
  60%  { transform: scale(0.94); }
  80%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.cart-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; background: var(--ink-600); color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  text-decoration: none; transition: background .15s; white-space: nowrap; flex-shrink: 0;
  transform-origin: center;
}
.cart-btn:hover { background: var(--ink-700); color: #fff; }
.cart-btn .mdi { font-size: 17px; }
.cart-btn.cart-bump { animation: cartBump .4s ease; }
.cart-bump .cart-badge { animation: badgePop .4s ease; }
.cart-badge {
  background: #fff; color: var(--ink-600);
  font-size: 13.5px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.cart-badge.has-items { background: #fbbf24; color: #78350f; }

/* ===== CONTAINER ===== */
.page-container { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #2d2d2d 0%, #111111 100%);
  border-radius: var(--radius-lg); padding: 48px 48px;
  margin-bottom: 36px; display: flex; align-items: center;
  justify-content: space-between; gap: 32px;
  overflow: hidden; position: relative;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.06); pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-text h1 { font-size: 27px; font-weight: 700; color: #fff; margin: 0 0 10px; letter-spacing: -.4px; line-height: 1.3; }
.hero-text p { color: rgba(255,255,255,.75); font-size: 16px; margin: 0 0 22px; max-width: 380px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--ink-700);
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); color: var(--ink-700); }
.hero-cta .mdi { font-size: 16.5px; }

/* ===== SECTION ===== */
.section { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0; display: flex; align-items: center; gap: 8px; }
.section-title .mdi { font-size: 19px; color: var(--ink-600); }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-xs); margin-bottom: 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.filter-chip {
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px;
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
  background: var(--surface); cursor: pointer;
  transition: all .15s; text-decoration: none; white-space: nowrap;
}
.filter-chip:hover, .filter-chip.active { background: var(--ink-600); color: #fff; border-color: var(--ink-600); }

/* ===== PRODUCT GRID ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }

.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card a { display: block; text-decoration: none; color: inherit; }
.product-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-img { transform: scale(1.04); }
.product-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.badge-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1.5; }
.badge-out    { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }
.badge-low    { background: #fefce8; color: #854d0e; border: 1px solid #fde047; }
.badge-bundle { background: var(--ink-50); color: var(--ink-700); border: 1px solid var(--ink-200); }
.product-info { padding: 12px 14px; }
.product-cat  { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.product-name { font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 16px; font-weight: 700; color: var(--ink-600); }
.product-price-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.product-price-original { font-size: 14.5px; color: var(--text-muted); text-decoration: line-through; font-weight: 400; }
.badge-discount { background: #ef4444 !important; color: #fff !important; }

/* ===== PRODUCT DETAIL ===== */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.product-carousel-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.carousel-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.carousel-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.carousel-thumb.active, .carousel-thumb:hover { border-color: var(--ink-600); }
.product-detail-title { font-size: 21px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; letter-spacing: -.3px; }
.product-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 15px; color: var(--text-secondary); margin-bottom: 10px; }
.product-meta-item { display: flex; align-items: center; gap: 3px; }
.product-meta-link { text-decoration: none; color: inherit; }
.product-meta-link:hover { text-decoration: underline; }
.product-meta-sep { color: var(--border); }
.product-detail-price-wrap { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }
.product-detail-price { font-size: 25px; font-weight: 800; color: var(--ink-600); letter-spacing: -.5px; }
.product-compare-price { font-size: 17px; color: var(--text-muted); text-decoration: line-through; font-weight: 400; }
.product-discount-badge { background: #ef4444; color: #fff; font-size: 14.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px; letter-spacing: .3px; }
.stock-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.stock-ok  { background: #dcfce7; color: #14532d; }
.stock-low { background: #fefce8; color: #854d0e; }
.stock-out { background: #fff1f2; color: #9f1239; }
.product-desc { font-size: 15.5px; color: var(--text-secondary); line-height: 1.7; margin: 16px 0; }
.delivery-estimate {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
  padding: 10px 14px; margin-top: 14px; font-size: 15px; color: #14532d;
}
.delivery-estimate .mdi { font-size: 21px; color: #16a34a; flex-shrink: 0; margin-top: 1px; }
.trust-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.trust-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 10px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
}
.trust-badge .mdi { font-size: 16px; color: var(--ink-600); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.qty-btn { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.qty-btn:hover { background: var(--ink-600); color: #fff; border-color: var(--ink-600); }
.qty-input { width: 64px; text-align: center; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 8px; font-size: 17px; font-weight: 600; font-family: inherit; outline: none; }
.qty-input:focus { border-color: var(--ink-500); box-shadow: 0 0 0 3px rgba(27,27,27,.12); }

/* ===== CART BOTTOM BAR (mobile) ===== */
.cart-bottom-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.cart-bottom-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}
.cbb-btn { height: 44px; font-size: 16px; padding: 0 24px; }
@media (max-width: 480px) {
  .cart-bottom-bar { display: block; }
  .checkout-btn-desktop { display: none !important; }
  .checkout-submit-desktop { display: none !important; }
}

/* ===== PRODUCT BOTTOM BAR (mobile) ===== */
.product-bottom-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  padding: env(safe-area-inset-bottom, 0) 0 0;
}
.product-bottom-bar-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0));
}
.pbb-qty {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0;
}
.pbb-qty-btn {
  width: 36px; height: 42px; border: none; background: var(--bg);
  font-size: 19px; font-weight: 600; cursor: pointer;
  color: var(--text-primary); display: flex; align-items: center; justify-content: center;
  transition: background .1s;
}
.pbb-qty-btn:hover { background: var(--ink-100); }
#pbbQty {
  min-width: 36px; height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: 16.5px; font-weight: 700; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 0 6px;
}
.pbb-add-btn { flex: 1; height: 42px; font-size: 16px; }
.pbb-cart-btn { flex: 0 0 auto; width: 42px; height: 42px; padding: 0; font-size: 19px; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 22px; border-radius: var(--radius-sm); font-size: 15.5px; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: all .15s; text-decoration: none; white-space: nowrap; min-height: 44px; }
.btn-primary { background: var(--ink-600); color: #fff; }
.btn-primary:hover { background: var(--ink-700); color: #fff; }
.btn-outline { background: transparent; color: var(--ink-600); border: 2px solid var(--ink-600); }
.btn-outline:hover { background: var(--ink-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm  { padding: 9px 16px; font-size: 14.5px; min-height: 38px; }
.btn-lg  { padding: 16px 30px; font-size: 17px; min-height: 50px; }
.btn-full { width: 100%; }
.product-cta-row { display: flex; gap: 12px; }
.product-cta-row .btn { flex: 1; }
.btn .mdi { font-size: 17px; }

/* ===== CART ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }

/* Cart item cards */
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; position: relative;
  box-shadow: var(--shadow-xs);
}
.cart-item-img { flex-shrink: 0; }
.cart-item-img img {
  width: 88px; height: 88px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border); display: block;
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  text-decoration: none; display: block;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4; margin-bottom: 3px;
}
.cart-item-name:hover { text-decoration: underline; }
.cart-item-cat { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.cart-item-price { font-size: 15px; color: var(--text-secondary); margin-bottom: 10px; }
.cart-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-item-sub { font-size: 17px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.cart-item-del {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-secondary); transition: color .15s, background .15s;
}
.cart-item-del:hover { color: #ef4444; background: #fef2f2; }

/* Qty stepper */
.cart-qty-wrap { display: flex; align-items: center; gap: 0; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cart-qty-btn {
  width: 38px; height: 38px; border: none; background: var(--bg);
  font-size: 18px; font-weight: 600; cursor: pointer; color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: background .1s; flex-shrink: 0; line-height: 1;
}
.cart-qty-btn:hover:not(:disabled) { background: var(--ink-100); }
.cart-qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.cart-qty-input {
  width: 44px; height: 38px; border: none; border-left: 2px solid var(--border); border-right: 2px solid var(--border);
  text-align: center; font-size: 16px; font-weight: 600; font-family: inherit;
  background: var(--surface); color: var(--text-primary); outline: none;
  -moz-appearance: textfield;
}
.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.summary-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); padding: 20px; position: sticky; top: calc(var(--header-h) + 16px); }
.summary-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 15.5px; margin-bottom: 10px; color: var(--text-secondary); }
.summary-row.total { font-size: 17px; font-weight: 700; color: var(--text-primary); border-top: 1px solid var(--border-light); padding-top: 12px; margin-top: 4px; }
.summary-row.total span:last-child { color: var(--ink-600); }
.voucher-wrap { display: flex; gap: 8px; margin: 14px 0; max-width: 100%; }
.voucher-input { flex: 1; min-width: 0; padding: 8px 12px; font-size: 15px; font-family: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; text-transform: uppercase; }
.voucher-input:focus { border-color: var(--ink-500); box-shadow: 0 0 0 3px rgba(27,27,27,.12); }
.voucher-wrap .btn { flex-shrink: 0; }
.voucher-applied { display: flex; align-items: center; justify-content: space-between; background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 15px; color: var(--ink-700); font-weight: 500; }
.voucher-msg { font-size: 14.5px; margin-top: 4px; }

/* ===== CHECKOUT ===== */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.checkout-section { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); margin-bottom: 16px; }
.checkout-section-header { padding: 16px 20px; border-bottom: 1.5px solid var(--border-light); font-size: 17px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; border-radius: var(--radius) var(--radius) 0 0; }
.checkout-section-header .mdi { font-size: 19px; color: var(--ink-600); }
.checkout-section-body { padding: 20px; border-radius: 0 0 var(--radius) var(--radius); }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 7px; }
.form-control { width: 100%; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; font-family: inherit; color: var(--text-primary); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.form-control:focus { border-color: var(--ink-500); box-shadow: 0 0 0 3px rgba(27,27,27,.12); }
.form-control::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shipping-option { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 12px; }
.shipping-option:hover { border-color: var(--ink-200); background: var(--ink-50); }
.shipping-option.selected { border-color: var(--ink-600); background: var(--ink-50); }
.shipping-option input[type=radio] { accent-color: var(--ink-600); flex-shrink: 0; width: 20px; height: 20px; }
.shipping-name  { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.shipping-eta   { font-size: 14px; color: var(--text-secondary); margin-top: 3px; }
.shipping-price { margin-left: auto; font-size: 16px; font-weight: 700; color: var(--ink-600); white-space: nowrap; }
.payment-option { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; cursor: pointer; transition: all .15s; }
.payment-option:hover { border-color: var(--ink-200); background: var(--ink-50); }
.payment-option.selected { border-color: var(--ink-600); background: var(--ink-50); }
.payment-option input[type=radio] { accent-color: var(--ink-600); margin-right: 10px; width: 20px; height: 20px; vertical-align: middle; }

/* ===== PAYMENT ===== */
.payment-wrap { max-width: 520px; margin: 32px auto; }
.payment-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 32px; text-align: center; }
.payment-card h2 { font-size: 19px; font-weight: 700; margin: 0 0 4px; color: var(--text-primary); }
.payment-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
.qr-wrap { margin: 0 auto 20px; width: 200px; }
.qr-wrap img { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: var(--radius); }
.countdown { font-size: 36px; font-weight: 800; color: #ef4444; letter-spacing: 2px; line-height: 1; }
.countdown-label { font-size: 14.5px; color: var(--text-muted); margin-top: 4px; margin-bottom: 20px; }
.amount-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; margin: 16px 0; font-size: 16px; color: var(--text-secondary); }
.amount-box .val { font-size: 19px; font-weight: 800; color: var(--ink-600); }
.bsi-card { background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 18px; text-align: left; margin: 16px 0; }
.bsi-card .bank { font-size: 14.5px; font-weight: 700; color: var(--ink-700); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.bsi-card .account { font-size: 23px; font-weight: 800; color: var(--ink-700); letter-spacing: 2px; margin: 2px 0; }
.bsi-card .name { font-size: 14.5px; color: var(--ink-600); }

/* ===== TRACKING ===== */
.tracking-wrap { max-width: 680px; margin: 32px auto; }
.tracking-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); padding: 20px 24px; margin-bottom: 16px; }
.tracking-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.tracking-card h3 .mdi { font-size: 17px; color: var(--ink-600); }
.timeline-item { display: flex; gap: 14px; }
.timeline-spine { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding-top: 2px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-600); flex-shrink: 0; border: 2px solid var(--ink-100); }
.timeline-line { width: 1px; flex: 1; background: var(--border); margin: 3px 0 0; min-height: 16px; }
.timeline-item:last-child .timeline-line { display: none; }
.timeline-body { padding-bottom: 16px; flex: 1; }
.timeline-status { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.timeline-note { font-size: 14.5px; color: var(--text-secondary); margin-top: 2px; }
.timeline-time { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* Status pills */
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: 14.5px; font-weight: 600; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.s-pending_payment { background: #fefce8; color: #854d0e; }
.s-paid            { background: var(--ink-50); color: var(--ink-700); }
.s-processing      { background: #eef2ff; color: #4338ca; }
.s-shipped         { background: #ecfdf5; color: #065f46; }
.s-delivered       { background: #dcfce7; color: #14532d; }
.s-cancelled       { background: #fff1f2; color: #9f1239; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 15px; display: flex; align-items: flex-start; gap: 8px; }
.alert .mdi { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #dcfce7; color: #14532d; border-left: 3px solid #22c55e; }
.alert-error   { background: #fff1f2; color: #9f1239; border-left: 3px solid #f43f5e; }
.alert-info    { background: var(--ink-50); color: var(--ink-700); border-left: 3px solid var(--ink-500); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-state .mdi { font-size: 48px; display: block; margin-bottom: 12px; opacity: .3; }
.empty-state h3 { font-size: 16.5px; font-weight: 600; color: var(--text-secondary); margin: 0 0 6px; }
.empty-state p  { font-size: 15px; margin: 0 0 20px; }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--ink-600); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 500; }

/* ===== FOOTER ===== */
.site-footer { background: #1e293b; color: #cbd5e1; padding: 32px 24px; margin-top: 48px; text-align: center; font-size: 15px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(203,213,225,.2); font-size: 13.5px; }
.footer-links a { color: #94a3b8; }
.footer-links a:hover { color: #fff; }

/* ===== INFO PAGES (FAQ / kebijakan / syarat) ===== */
.info-page { max-width: 820px; margin: 0 auto; }
.info-page .page-title { font-size: 25px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px; letter-spacing: -.4px; }
.info-page .page-subtitle { font-size: 15px; color: var(--text-muted); margin: 0 0 24px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; }
.info-card h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.info-card h2 .mdi { color: var(--ink-600); font-size: 19px; }
.info-card p { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary, var(--text-primary)); margin: 0 0 10px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card ul { margin: 0 0 10px; padding-left: 20px; font-size: 14.5px; line-height: 1.7; color: var(--text-secondary, var(--text-primary)); }
.info-card ul:last-child { margin-bottom: 0; }
.info-highlight { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.6; color: #991b1b; margin-bottom: 10px; }
.info-highlight .mdi { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.faq-item { border-bottom: 1px solid var(--border-light); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item .faq-q { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; display: flex; gap: 8px; }
.faq-item .faq-q .mdi { color: var(--ink-600); font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.faq-item .faq-a { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary, var(--text-primary)); margin: 0; padding-left: 26px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page-container { padding: 20px 16px; }
  .hero { padding: 28px 24px; flex-direction: column; }
  .hero-text h1 { font-size: 21px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .logo-text { display: none; }
  .header-inner { gap: 10px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-grid-bundling { grid-template-columns: 1fr; }
  .product-bottom-bar { display: block; }
  .add-btn-desktop { display: none; }
  .qty-row { display: none; }
  body.has-bottom-bar .page-container { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== REVIEWS ===== */
.review-summary {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
}
.review-avg-box { text-align: center; flex-shrink: 0; min-width: 90px; }
.review-avg-num { font-size: 40px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.review-avg-stars { font-size: 17px; margin: 6px 0 4px; }
.review-avg-count { font-size: 14.5px; color: var(--text-muted); }
.review-dist-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.review-dist-row { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.review-dist-label { width: 28px; text-align: right; color: var(--text-secondary); flex-shrink: 0; }
.review-dist-track { flex: 1; min-width: 0; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.review-dist-fill { height: 100%; background: #f59e0b; border-radius: 4px; transition: width .4s; }
.review-dist-count { width: 24px; text-align: right; color: var(--text-muted); flex-shrink: 0; }

.review-item {
  padding: 18px 0; border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 19px; flex-shrink: 0;
}
.review-meta { flex: 1; min-width: 0; }
.review-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.review-stars { font-size: 15px; margin: 2px 0; }
.review-date { font-size: 14px; color: var(--text-muted); }
.review-source-badge {
  font-size: 13px; font-weight: 600; color: #fff;
  padding: 2px 7px; border-radius: 4px; flex-shrink: 0; margin-top: 2px;
}
.review-aspects { font-size: 15px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
.aspect-label { font-weight: 600; color: var(--text-primary); }
.review-body { font-size: 15.5px; color: var(--text-primary); line-height: 1.6; margin-bottom: 10px; }

/* Media thumbnails */
.review-media-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.review-media-thumb {
  width: 80px; height: 80px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; position: relative;
  flex-shrink: 0; background: var(--bg);
  transition: opacity .15s;
}
.review-media-thumb:hover, .review-media-thumb.active { opacity: .85; outline: 2px solid var(--ink-600); outline-offset: 1px; }
.rm-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); color: #fff; font-size: 23px;
}
.rm-duration {
  position: absolute; bottom: 4px; left: 4px;
  font-size: 13px; color: #fff; background: rgba(0,0,0,.55);
  padding: 1px 4px; border-radius: 3px;
}

/* Inline viewer */
.review-media-viewer {
  margin: 8px 0 12px; padding: 12px; background: var(--bg);
  border-radius: var(--radius); border: 1px solid var(--border);
  position: relative; text-align: center;
}
.rmv-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; color: var(--text-muted);
  transition: background .12s;
}
.rmv-close:hover { background: var(--bg); color: var(--text-primary); }

.review-likes { font-size: 14.5px; color: var(--text-muted); margin-top: 8px; }
.review-likes .mdi { font-size: 16px; }

@media (max-width: 600px) {
  .review-summary { flex-direction: column; gap: 16px; align-items: stretch; }
  .review-avg-box { display: flex; align-items: center; gap: 12px; text-align: left; }
  .review-media-thumb { width: 70px; height: 70px; }
}

/* ── Public review form ── */
.form-field {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 15px; font-family: inherit; color: var(--text-primary);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.form-field:focus { border-color: var(--ink-400); box-shadow: 0 0 0 3px rgba(27,27,27,.08); }
.form-field::placeholder { color: var(--text-muted); }

.pub-star-picker { display: flex; gap: 4px; }
.pub-star-btn { background: none; border: none; font-size: 30px; color: #d1d5db; cursor: pointer; padding: 0; line-height: 1; user-select: none; transition: color .1s; }

/* Public photo zone */
.pub-photo-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 10px; cursor: pointer; transition: border-color .2s, background .2s;
  min-height: 80px;
}
.pub-photo-zone.drag-over { border-color: var(--ink-500); background: var(--ink-50); }
.pub-photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.pub-photo-item {
  position: relative; width: 76px; height: 76px;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg); cursor: default;
}
.pub-photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pub-photo-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0;
}
.pub-photo-item:hover .pub-photo-del { opacity: 1; }

.pub-add-tile {
  width: 76px; height: 76px; border: 2px dashed var(--border); border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); font-size: 13.5px; gap: 3px; flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.pub-add-tile:hover { border-color: var(--ink-500); color: var(--ink-500); }
.pub-photo-zone:not(.has-photos) .pub-add-tile {
  width: 100%; border-style: dashed; height: 72px; flex-direction: row; gap: 8px;
}
.pub-photo-zone:not(.has-photos) .pub-add-tile i { font-size: 21px; }

/* Keyboard focus: one visible ring everywhere (near-black on white, 17:1). */
:focus-visible { outline: 3px solid var(--ink-600); outline-offset: 2px; }
.search-input:focus-visible, .form-control:focus-visible, .qty-input:focus-visible, .voucher-input:focus-visible, .form-field:focus-visible { outline: none; }
