/* ============================================================
   SR Melvi Production — Katalog Publik / Akun / Keranjang / Checkout
   Komponen tambahan di atas assets/css/style.css (variabel warna &
   font sudah didefinisikan di sana lewat :root, dipakai ulang di sini).
   ============================================================ */

.app-body { background: var(--cream); min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- App header (halaman non-landing) — mengambang seperti site-header di halaman utama ---------- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  padding: 14px 0;
  box-shadow: 0 4px 18px rgba(12, 23, 48, 0.18);
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}
.app-header.is-scrolled {
  padding: 10px 0;
  box-shadow: 0 8px 26px rgba(0,0,0,0.28);
}
.app-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-700) 0%, var(--red-600) 50%, var(--navy-700) 100%);
  background-size: 200% auto;
  animation: shineLine 4s linear infinite;
}
@keyframes shineLine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.app-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.app-header .brand { display: flex; align-items: center; gap: 10px; }
.app-header .brand img { height: 34px; width: auto; }
.app-header .brand-name { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 15px; color: #fff; }
.app-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.app-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: rgba(255,255,255,0.82);
  transition: color 0.15s;
  position: relative;
}
.app-nav a:hover { color: #fff; }
.app-nav a.is-active { color: #fff; }
.app-nav a.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--red-600); border-radius: 2px;
}
.app-nav .cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red-600); color: #fff;
  border-radius: 999px; font-size: 10.5px; font-weight: 800;
  margin-left: 4px; vertical-align: middle;
}
.app-nav-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.2); display: inline-block; }
.app-nav-user { font-size: 13px; color: rgba(255,255,255,0.65); }
.app-nav-logout { color: #fba6a8 !important; }
.app-nav-logout:hover { color: #fff !important; }
.app-nav .btn { padding: 9px 18px; font-size: 12.5px; }

/* ---------- Account avatar + dropdown (header, halaman publik login) ---------- */
.app-nav-account { position: relative; }
.app-nav-avatar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}
.app-nav-avatar-btn:hover,
.app-nav-avatar-btn[aria-expanded="true"] { border-color: var(--red-600); background: rgba(225,29,46,0.16); }
.app-nav-avatar {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.app-nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 120;
}
.app-nav-dropdown[hidden] { display: none; }
.app-nav-dropdown-head {
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.app-nav-dropdown-head .name {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy-900);
}
.app-nav-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.app-nav-dropdown-item:hover,
.app-nav-dropdown-item.is-active { background: var(--navy-100); color: var(--navy-900); }
.app-nav-dropdown-item.is-danger { color: var(--red-600); }
.app-nav-dropdown-item.is-danger:hover { background: var(--red-100); color: var(--red-700); }

.app-main { padding-top: calc(var(--app-header-h, 78px) + 40px); padding-bottom: 80px; flex: 1 0 auto; }
.app-footer { margin-top: 0; flex-shrink: 0; }

/* ---------- Page heading ---------- */
.page-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.page-head.left { text-align: left; margin: 0 0 32px; max-width: none; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.page-head p { font-size: 15px; margin: 0; }

/* ---------- Alerts ---------- */
.alert-box {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.alert-box.error { background: var(--red-100); color: var(--red-700); border: 1px solid rgba(225,29,46,0.25); }
.alert-box.success { background: #e8f6ec; color: #1f7a3d; border: 1px solid rgba(31,122,61,0.25); }
.alert-box.info { background: var(--navy-100); color: var(--navy-800); border: 1px solid rgba(16,32,63,0.15); }
.alert-box ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }

/* ---------- Auth forms (login/daftar) ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 36px 32px;
}
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; font-size: 13.5px; margin-bottom: 26px; }
.auth-switch { text-align: center; font-size: 13.5px; margin-top: 18px; }
.auth-switch a { color: var(--red-600); font-weight: 700; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 13px 20px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-google:hover { background: var(--navy-100); border-color: var(--navy-700); }

/* ---------- Form fields (dipakai di semua form baru) ---------- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--navy-900);
  margin-bottom: 6px;
}
.form-group .hint { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-muted); margin-top: 4px; }
.form-control {
  width: 100%;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--navy-700); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Product catalog grid ---------- */
.catalog-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box {
  position: relative;
  flex: 1 1 260px;
}
.search-box svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-muted); pointer-events: none;
  z-index: 1;
}
.search-box .form-control {
  padding-left: 40px;
  -webkit-appearance: none;
  appearance: none;
}
/* Reset ikon/tombol bawaan <input type="search"> di browser mobile (WebKit)
   supaya tidak tumpuk/bentrok dengan ikon kaca pembesar kustom di atas */
.search-box .form-control::-webkit-search-decoration,
.search-box .form-control::-webkit-search-cancel-button,
.search-box .form-control::-webkit-search-results-button,
.search-box .form-control::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}
#catalog-kategori-filter { flex: 0 1 220px; cursor: pointer; }

.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.catalog-toolbar .count { font-size: 13.5px; color: var(--ink-muted); }

/* Kartu yang disembunyikan filter/pencarian - pakai class (bukan atribut [hidden])
   dengan !important supaya tidak kalah specificity dari display:flex mode list */
.product-card.is-filtered-out { display: none !important; }
.product-grid.is-empty-result { display: none !important; }

.js-open-detail { cursor: pointer; }
.product-info h3.js-open-detail:hover { color: var(--red-600); }

/* ---------- Popup detail produk ---------- */
.product-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 23, 48, 0.6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.product-modal-overlay[hidden] { display: none; }
.product-modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.product-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(12, 23, 48, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.product-modal-close svg { width: 16px; height: 16px; }
.product-modal-close:hover { background: var(--red-600); }
.product-modal-img { aspect-ratio: 1 / 1; background: #f1efe9; overflow: hidden; }
.product-modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-modal-body { padding: 22px 24px 26px; }
.product-modal-body h3 { font-size: 18px; margin-bottom: 10px; }
.product-modal-body .desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  white-space: pre-line;
}
#productModalPrice .price { font-size: 17px; margin-bottom: 16px; }
#productModalPrice .price-locked { margin-bottom: 16px; }
#productModalActions .add-cart-form { gap: 10px; }
#productModalActions .btn { width: auto; }

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #c7c2b8;
  background: #f1efe9;
}
.thumb-placeholder svg { width: 34%; height: 34%; }

.product-card .desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 4px 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .price { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; color: var(--navy-900); font-size: 15px; margin-bottom: 10px; }
.product-card .price span { font-weight: 500; font-size: 11.5px; color: var(--ink-muted); }
.product-card .price-locked {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700; font-size: 12.5px;
  color: var(--red-600);
}
.product-info { margin-bottom: 10px; }
.product-info:last-child { margin-bottom: 0; }
.add-cart-form { display: flex; gap: 8px; align-items: center; }
.qty-input {
  width: 58px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  text-align: center;
}
.product-actions .btn { width: 100%; justify-content: center; }

/* ---------- Cart (keranjang.php) ---------- */
.cart-table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-line .cart-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #f1efe9; }
.cart-line .cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .cart-name { font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; font-size: 14px; color: var(--navy-900); }
.cart-line .cart-price { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.cart-line .cart-subtotal { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; color: var(--navy-900); font-size: 14px; white-space: nowrap; }
.cart-remove-btn {
  background: none; border: none; color: var(--red-600); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 8px;
}
.cart-remove-btn:hover { text-decoration: underline; }

.cart-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  margin-top: 24px;
}
.cart-summary .row { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; margin-bottom: 8px; }
.cart-summary .row.total { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 18px; color: var(--navy-900); border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 10px; }
.cart-summary .note { font-size: 12px; color: var(--ink-muted); margin-top: 10px; line-height: 1.6; }
.cart-summary .btn { width: 100%; justify-content: center; margin-top: 16px; }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state p { margin-bottom: 20px; }

/* ---------- Akun (pengaturan akun) ---------- */
.account-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.account-profile-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 24px;
  text-align: center;
}
.account-avatar-lg {
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 28px;
}
.account-profile-card h3 { font-size: 16.5px; margin-bottom: 4px; }
.account-profile-card .email { font-size: 13px; word-break: break-word; margin-bottom: 14px; }
.role-badge {
  display: inline-block;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-800);
}
.account-forms { display: flex; flex-direction: column; gap: 24px; }
.account-card { padding: 28px 28px 32px; }
.account-card h2 { font-size: 16.5px; margin-bottom: 20px; }
.account-card .btn { margin-top: 4px; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.checkout-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 28px 8px;
}
.checkout-summary-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.checkout-summary-item:last-child { border-bottom: none; }
.checkout-summary-item .name { font-weight: 700; color: var(--navy-900); }
.checkout-summary-item .meta { color: var(--ink-muted); font-size: 12px; }

/* ---------- Order / Confirmation ---------- */
.order-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; font-size: 11.5px;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}
.order-badge.quotation { background: #fff4e0; color: #a5670c; }
.order-badge.invoice { background: #e8f6ec; color: #1f7a3d; }
.order-badge.diproses { background: var(--navy-100); color: var(--navy-800); }
.order-badge.selesai { background: #eee; color: #666; }

.confirm-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  max-width: 640px;
  margin: 0 auto;
}
.confirm-card .order-no { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 22px; color: var(--navy-900); margin: 10px 0 4px; }
.confirm-grand-total { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 24px; color: var(--red-600); }
.confirm-divider { border: none; border-top: 1px dashed var(--line); margin: 22px 0; }
.bank-box {
  background: var(--navy-100);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--navy-900);
}
.bank-box strong { display: block; margin-bottom: 4px; }
.btn-wa {
  background: #25D366; color: #fff; box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
}
.btn-wa:hover { background: #1fb955; }

/* ---------- Pesanan saya ---------- */
.order-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.order-item-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.order-item-card .top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.order-item-card .meta { font-size: 13px; color: var(--ink-muted); line-height: 1.7; margin-bottom: 12px; }
.order-item-card .total { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; color: var(--navy-900); font-size: 16px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 48px 1fr; grid-template-areas: "thumb name" "thumb price" "qty qty" "sub remove"; }
  .cart-line .cart-thumb { width: 48px; height: 48px; grid-area: thumb; }
}
/* ---------- Nav cart icon ---------- */
.app-nav-cart { display: inline-flex; align-items: center; gap: 7px; }
.app-nav-cart .cart-icon { width: 20px; height: 20px; flex-shrink: 0; }
.app-nav-cart .cart-count { margin-left: 0; }

/* ---------- Toast / snackbar ---------- */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast-msg {
  background: var(--navy-950);
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast-msg.is-visible { opacity: 1; transform: translateY(0); }
.toast-msg.toast-error { background: var(--red-700); }

/* ---------- Katalog view toggle (grid/list) ---------- */
.view-toggle { display: inline-flex; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.view-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: none; border-radius: 999px;
  background: transparent; color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn svg { width: 16px; height: 16px; }
.view-toggle-btn:hover { color: var(--navy-800); }
.view-toggle-btn[aria-pressed="true"] { background: var(--navy-800); color: #fff; }

.product-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-grid.view-list .product-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.product-grid.view-list .product-card:hover { transform: none; }
.product-grid.view-list .img-wrap { width: 108px; height: 108px; flex-shrink: 0; aspect-ratio: 1 / 1; }
.product-grid.view-list .product-card-body {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.product-grid.view-list .product-info { margin-bottom: 0; min-width: 0; }
.product-grid.view-list .product-card .desc { -webkit-line-clamp: 2; margin-bottom: 6px; }
.product-grid.view-list .product-actions { flex-shrink: 0; width: auto; }
.product-grid.view-list .add-cart-form,
.product-grid.view-list .product-actions > a.btn { width: auto; }
.product-grid.view-list .add-cart-form .btn,
.product-grid.view-list .product-actions .btn { width: auto; white-space: nowrap; }

/* ---------- Checkout progress steps ---------- */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
  flex-wrap: wrap;
}
.checkout-steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink-muted);
}
.checkout-steps .step-num {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
  font-size: 12px;
}
.checkout-steps .step.is-done .step-num { background: var(--navy-800); color: #fff; }
.checkout-steps .step.is-current .step-num { background: var(--red-600); color: #fff; }
.checkout-steps .step.is-current .step-label { color: var(--navy-900); }
.checkout-steps .step-sep { width: 26px; height: 1px; background: var(--line); flex-shrink: 0; }

/* ---------- Keranjang qty stepper ---------- */
.cart-qty-stepper { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.cart-qty-stepper .qty-btn {
  width: 30px; height: 30px;
  border: none; background: var(--navy-100); color: var(--navy-800);
  font-size: 16px; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cart-qty-stepper .qty-btn:hover:not(:disabled) { background: var(--navy-800); color: #fff; }
.cart-qty-stepper .qty-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cart-qty-stepper .qty-input {
  width: 44px; height: 30px;
  border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center; font-size: 13px; padding: 0;
}
.cart-line.is-busy { opacity: 0.6; pointer-events: none; }
.cart-line.is-removing { opacity: 0; transform: translateX(12px); transition: opacity 0.2s ease, transform 0.2s ease; }

/* ---------- Pesanan saya: aksi per kartu ---------- */
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-actions .btn[disabled],
.order-actions button.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  background: var(--navy-100);
  color: var(--ink-muted);
  border-color: transparent;
}
.order-actions .btn[disabled]:hover { transform: none; }

/* ---------- Halaman kebijakan (Syarat, Privasi, Pembayaran, Refund) ---------- */
.legal-wrap { max-width: 780px; margin: 0 auto; }
.legal-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 40px clamp(24px, 5vw, 56px) 48px;
}
.legal-updated { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 30px; }
.legal-card h2 {
  font-size: 18px;
  margin-top: 34px;
  margin-bottom: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal-card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.legal-card p { font-size: 14.5px; line-height: 1.8; margin-bottom: 14px; }
.legal-card ul, .legal-card ol { margin: 0 0 14px; padding-left: 22px; }
.legal-card li { font-size: 14.5px; line-height: 1.8; color: var(--ink-muted); margin-bottom: 6px; }
.legal-card strong { color: var(--navy-900); }
.legal-card .legal-contact-box {
  background: var(--navy-100);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--navy-900);
  margin-top: 8px;
}
.legal-nav { text-align: center; margin-top: 28px; }
.legal-nav a { font-size: 13px; font-weight: 700; color: var(--navy-800); }

/* ---------- Tracking (Leaflet) ---------- */
.tracking-map { height: 440px; width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); background: var(--navy-100); }
.driver-pill {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--line);
  margin-bottom: 8px;
}
.driver-pill .dot { width: 11px; height: 11px; border-radius: 50%; background: #28a745; flex-shrink: 0; animation: pulseDot 1.5s infinite; }
.driver-pill .dot.is-offline { background: #adb5bd; animation: none; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(40,167,69,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(40,167,69,0); }
  100% { box-shadow: 0 0 0 0 rgba(40,167,69,0); }
}
.driver-pill strong { display: block; font-family: 'Montserrat', Arial, sans-serif; font-size: 13.5px; color: var(--navy-900); }
.driver-pill span.meta { font-size: 12px; color: var(--ink-muted); }

@media (max-width: 860px) {
  .product-grid.view-list .img-wrap { width: 84px; height: 84px; }
  .product-grid.view-list .product-card-body { padding: 12px 14px; gap: 12px; }
}
@media (max-width: 640px) {
  .app-nav { gap: 12px; }
  .app-nav-user { display: none; }
  .app-nav-cart .cart-label { display: none; }
  .checkout-steps { gap: 6px; }
  .checkout-steps .step-label { display: none; }
  .checkout-steps .step-sep { width: 14px; }
  .catalog-filters { flex-direction: column; }
  .search-box { flex: 0 0 auto; width: 100%; }
  #catalog-kategori-filter { flex: 0 0 auto; width: 100%; }
  .product-grid.view-list .img-wrap { width: 64px; height: 64px; }
  .product-grid.view-list .product-card-body { padding: 10px 12px; gap: 10px; }
  .product-grid.view-list .product-info h3 { font-size: 13.5px; }
  .product-grid.view-list .product-card .desc { -webkit-line-clamp: 1; font-size: 11.5px; margin-bottom: 4px; }
  .product-grid.view-list .qty-input { width: 44px; padding: 8px 6px; }
  .product-grid.view-list .product-actions .btn { padding: 8px 12px; font-size: 12px; }
}
