/* ============================================================
   VoltLink storefront — premium light theme for US/UK/AU/NZ
   Loaded AFTER style.css; overrides base styles for the shop.
   ============================================================ */
:root {
  --s-bg: #f6f7f9;
  --s-surface: #ffffff;
  --s-border: #e5e7eb;
  --s-text: #111827;
  --s-muted: #6b7280;
  --s-primary: #1f4fd8;
  --s-primary-soft: #eef2ff;
  --s-accent: #0ea5e9;
  --s-good: #16a34a;
  --s-warn: #d97706;
  --s-bad: #dc2626;
  --s-radius: 14px;
  --s-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --s-shadow-lift: 0 8px 30px rgba(16, 24, 40, .12);
}
body { background: var(--s-bg); color: var(--s-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Inter", sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--s-muted); }
.btn { border-radius: 10px; font-size: 14px; font-weight: 600; }
.btn-primary { background: var(--s-primary); color: #fff; border: none; }
.btn-primary:hover { background: #1a42b8; }
.btn.ghost { border: 1px solid var(--s-border); background: #fff; color: var(--s-text); }
.btn.gray { background: #eef0f3; color: var(--s-text); border: none; }
.btn.sm { font-size: 12px; padding: 5px 10px; }

/* ---------- header ---------- */
.shop-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--s-border); }
.shop-header-inner { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-header .brand { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--s-primary); }
.shop-header-right { display: flex; align-items: center; gap: 10px; }
.country-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--s-primary-soft); color: var(--s-primary); border: 1px solid #dbe3fd; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.lang button { background: none; border: none; color: var(--s-muted); font-weight: 600; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.lang button.active { background: #eef0f3; color: var(--s-text); }
.cart-btn { position: relative; }
.cart-btn .n { position: absolute; top: -6px; right: -6px; background: var(--s-bad); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 5px; }

/* ---------- login ---------- */
.login-wrap { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: 20px; box-shadow: var(--s-shadow); padding: 36px; width: 100%; max-width: 400px; }
.login-logo { font-size: 40px; text-align: center; margin-bottom: 8px; }
.login-card h2 { text-align: center; font-size: 22px; margin: 0 0 20px; letter-spacing: -.01em; }
.login-card .field { margin-bottom: 14px; }
.login-card input { width: 100%; padding: 11px 14px; border: 1px solid var(--s-border); border-radius: 10px; font-size: 15px; background: #fbfbfc; }
.login-card input:focus { outline: none; border-color: var(--s-primary); box-shadow: 0 0 0 3px rgba(31,79,216,.12); }
.err { color: var(--s-bad); font-size: 13px; min-height: 18px; margin-bottom: 6px; }

/* ---------- main layout ---------- */
.shop-main { max-width: 960px; margin: 0 auto; padding: 24px 20px 80px; }
.tabs { display: flex; gap: 6px; background: #e9ebef; border-radius: 12px; padding: 5px; width: fit-content; margin-bottom: 14px; }
.tab { border: none; background: transparent; padding: 10px 26px; border-radius: 9px; font-size: 15px; font-weight: 700; color: var(--s-muted); cursor: pointer; transition: .15s; }
.tab.active { background: #fff; color: var(--s-text); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { border: 1px solid var(--s-border); background: #fff; color: var(--s-muted); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.pill:hover { border-color: var(--s-primary); color: var(--s-primary); }
.pill.active { background: var(--s-primary-soft); border-color: var(--s-primary); color: var(--s-primary); }

/* ---------- filter bar (search + chips + sort) ---------- */
.filterbar { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 14px 16px; margin-bottom: 18px; }
.fb-row { display: flex; gap: 12px; align-items: center; }
.fb-row .stock-toggle { flex-shrink: 0; }
.searchwrap { position: relative; flex: 1; }
.searchwrap .s-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .55; pointer-events: none; }
.searchwrap input { width: 100%; padding: 11px 40px 11px 40px; border: 1px solid var(--s-border); border-radius: 999px; font-size: 14px; background: #fafbfc; transition: .15s; }
.searchwrap input:focus { outline: none; border-color: var(--s-primary); background: #fff; box-shadow: 0 0 0 3px rgba(31,79,216,.12); }
.searchwrap .s-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; background: #e9ebef; border-radius: 999px; width: 22px; height: 22px; font-size: 11px; color: var(--s-muted); cursor: pointer; }
.sortwrap select { padding: 10px 14px; border: 1px solid var(--s-border); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--s-text); background: #fff; cursor: pointer; }
.sortwrap select:focus { outline: none; border-color: var(--s-primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { border: 1px solid var(--s-border); background: #fff; color: var(--s-muted); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; }
.chip:hover { border-color: var(--s-primary); color: var(--s-primary); }
.chip.active { background: var(--s-primary); border-color: var(--s-primary); color: #fff; box-shadow: 0 2px 8px rgba(31,79,216,.25); }
@media (max-width: 640px) {
  .fb-row { flex-direction: column; align-items: stretch; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
}
.catalog-meta { color: var(--s-muted); font-size: 13px; margin-bottom: 12px; }

/* ---------- product list ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.prod { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); overflow: hidden; }
.prod-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; }
.prod-row:hover { background: #fafbfc; }
.prod-thumb { width: 64px; height: 64px; border-radius: 12px; background: #f1f3f6; border: 1px solid var(--s-border); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; font-size: 28px; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-info { flex: 1; min-width: 0; }
.prod-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.prod-code { font-size: 12px; color: var(--s-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 3px; }
.prod-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.tag.factory { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag.overseas { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag.dropship { background: #fdf4ff; color: #a21caf; border: 1px solid #f5d0fe; }
.tag.combo { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.tag.stock { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag.stock.low { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag.stock.out { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.prod-right { text-align: right; flex-shrink: 0; }
.prod-price { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.prod-price small { font-size: 12px; font-weight: 600; color: var(--s-muted); }
.prod-ship { font-size: 12px; color: var(--s-muted); margin-top: 2px; }
.prod-chev { color: #c3c9d2; font-size: 18px; margin-left: 6px; }

/* ---------- detail (expanded config) ---------- */
.prod-detail { border-top: 1px solid var(--s-border); background: #fafbfc; padding: 18px; display: none; }
.prod.open .prod-detail { display: block; }
.prod.open .prod-chev { transform: rotate(180deg); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 22px; margin-bottom: 16px; }
.detail-item { font-size: 13.5px; }
.detail-item b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--s-muted); font-weight: 600; margin-bottom: 2px; }
.components { margin-bottom: 16px; }
.components h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--s-muted); margin: 0 0 8px; }
.comp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--s-border); }
.comp-row:last-child { border-bottom: none; }
.comp-row span:last-child { font-weight: 600; }
.detail-buy { display: flex; align-items: center; gap: 10px; }
.qty-input { width: 76px; padding: 8px 10px; border: 1px solid var(--s-border); border-radius: 10px; font-size: 14px; text-align: center; }
.add-btn { background: var(--s-primary); color: #fff; border: none; border-radius: 10px; padding: 9px 20px; font-size: 14px; font-weight: 700; cursor: pointer; }
.add-btn:hover { background: #1a42b8; }
.add-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* ---------- cart drawer ---------- */
.drawer { position: fixed; top: 0; right: -420px; width: 380px; max-width: 92vw; height: 100vh; background: #fff; box-shadow: -12px 0 40px rgba(16,24,40,.18); z-index: 300; transition: right .25s ease; display: flex; flex-direction: column; }
.drawer.open { right: 0; }
.drawer .head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--s-border); font-size: 16px; }
.drawer .items { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer .foot { padding: 16px 18px; border-top: 1px solid var(--s-border); }
.cart-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f3f6; font-size: 13.5px; }
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 600; line-height: 1.3; }
.cart-item .ci-meta { color: var(--s-muted); font-size: 12px; margin-top: 2px; }
.cart-item .ci-x { background: none; border: none; color: var(--s-muted); cursor: pointer; font-size: 15px; }

/* ---------- orders ---------- */
.orders-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.orders-head h3 { margin: 0; font-size: 20px; }
.order-card { background: #fff; border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 16px 18px; margin-bottom: 14px; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-no { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 14px; }
.badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.badge.pending { background: #f3f4f6; color: #374151; }
.badge.submitted { background: #eff6ff; color: #1d4ed8; }
.badge.confirmed, .badge.processing { background: #fffbeb; color: #b45309; }
.badge.shipped { background: #f0fdf4; color: #15803d; }
.badge.completed { background: #f0fdf4; color: #15803d; }
.badge.cancelled { background: #fef2f2; color: #b91c1c; }
.order-meta { color: var(--s-muted); font-size: 12.5px; margin-top: 4px; }
.order-total { font-size: 16px; font-weight: 800; }
.fulfill-card { background: #fafbfc; border: 1px solid var(--s-border); border-radius: 12px; padding: 16px; margin-top: 12px; }
.fulfill-card h4 { margin: 0 0 12px; font-size: 14px; }
.fulfill-card .field { margin-bottom: 10px; }
.fulfill-card input, .fulfill-card textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--s-border); border-radius: 9px; font-size: 13.5px; background: #fff; }
.addr-view { font-size: 13.5px; line-height: 1.6; }
.pay-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--s-border); margin-top: 8px; }

/* ---------- logistics tracking timeline ---------- */
.timeline { position: relative; margin: 12px 0 4px; padding-left: 4px; }
.tl-item { position: relative; padding: 0 0 18px 26px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: -4px; width: 2px; background: var(--s-border); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--s-border); }
.tl-item.latest .tl-dot { border-color: var(--s-primary); background: var(--s-primary); box-shadow: 0 0 0 4px rgba(31,79,216,.15); }
.tl-time { font-size: 11.5px; color: var(--s-muted); font-weight: 600; }
.tl-desc { font-size: 13.5px; margin-top: 2px; }
.tl-loc { font-size: 12.5px; color: var(--s-muted); margin-top: 2px; }
.tl-item.latest .tl-desc { font-weight: 600; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16,24,40,.5); z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--s-shadow-lift); padding: 24px; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; position: relative; }
.modal .close { position: absolute; top: 12px; right: 14px; background: #f1f3f6; border: none; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; }
.modal h3 { margin: 0 0 10px; font-size: 18px; }
.modal h4 { margin: 14px 0 8px; font-size: 14px; }
.modal .field { margin-bottom: 10px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--s-border); border-radius: 9px; font-size: 13.5px; }

/* ---------- ip banner / toast ---------- */
.ipbanner { position: sticky; top: 60px; z-index: 95; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff7e6; border-bottom: 1px solid #ffd591; color: #874d00; padding: 8px 16px; font-size: 13px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 11px 20px; border-radius: 10px; z-index: 500; opacity: 0; transition: .2s; font-size: 14px; }
.toast.show { opacity: 1; }
.empty { text-align: center; color: var(--s-muted); padding: 60px 20px; font-size: 15px; }
.row2 { display: flex; gap: 12px; } .row2 > * { flex: 1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--s-muted); margin-bottom: 5px; }
.divider { height: 1px; background: var(--s-border); margin: 14px 0; }

@media (max-width: 640px) {
  .prod-row { padding: 12px; gap: 12px; }
  .prod-thumb { width: 52px; height: 52px; font-size: 22px; }
  .prod-price { font-size: 16px; }
  .tab { padding: 9px 16px; font-size: 14px; }
}

/* ---------- layout: sidebar + content ---------- */
.shop-layout { max-width: 1200px; margin: 0 auto; padding: 24px 20px 80px; display: flex; gap: 24px; align-items: flex-start; }
.sidebar { width: 200px; flex-shrink: 0; position: sticky; top: 84px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--s-muted); cursor: pointer; transition: .15s; text-align: left; width: 100%; }
.nav-item .ni-ico { font-size: 16px; }
.nav-item:hover { background: #f3f5f9; color: var(--s-text); }
.nav-item.active { background: var(--s-primary-soft); color: var(--s-primary); }
.side-points { margin-top: 12px; background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 14px; display: flex; align-items: center; gap: 8px; }
.side-points .sp-ico { font-size: 18px; }
.side-points .sp-num { font-size: 20px; font-weight: 800; color: var(--s-primary); }
.side-points .sp-lbl { font-size: 12px; color: var(--s-muted); font-weight: 600; }
.shop-content { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .shop-layout { flex-direction: column; padding-top: 12px; }
  .sidebar { width: 100%; position: static; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex-shrink: 0; width: auto; }
  .side-points { display: none; }
}

/* ---------- points shop / balance ---------- */
.pts-balance { background: linear-gradient(135deg, #1f4fd8, #0ea5e9); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(31,79,216,.25); }
.pb-label { font-size: 13px; opacity: .85; font-weight: 600; }
.pb-num { font-size: 40px; font-weight: 800; margin: 4px 0; letter-spacing: -.02em; }
.pb-rule { font-size: 12.5px; opacity: .9; }
.pts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pts-card { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); overflow: hidden; display: flex; flex-direction: column; }
.pts-thumb { height: 130px; background: #f1f3f6; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.pts-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pts-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pts-name { font-size: 14px; font-weight: 700; line-height: 1.35; }
.pts-code { font-size: 11.5px; color: var(--s-muted); font-family: ui-monospace, Menlo, monospace; }
.pts-meta { display: flex; align-items: center; justify-content: space-between; }
.pts-cost { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; }
.pts-btn { margin-top: auto; }

/* ---------- points table ---------- */
.table-wrap { background: #fff; border: 1px solid var(--s-border); border-radius: var(--s-radius); overflow: hidden; box-shadow: var(--s-shadow); }
.pts-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pts-table th { text-align: left; background: #f8fafc; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--s-muted); border-bottom: 1px solid var(--s-border); }
.pts-table td { padding: 10px 14px; border-bottom: 1px solid #f1f3f6; }
.pts-table tr:last-child td { border-bottom: none; }
.chg-plus { color: var(--s-good); font-weight: 700; }
.chg-minus { color: var(--s-bad); font-weight: 700; }

/* ---------- account ---------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.acct-card { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 20px; }
.acct-card h4 { margin: 0 0 14px; font-size: 15px; }
.acct-card .field { margin-bottom: 12px; }
.acct-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--s-border); border-radius: 10px; font-size: 14px; }

.acct-pts { font-size: 44px; font-weight: 800; color: var(--s-primary); margin: 6px 0; }

/* ---------- warranty / after-sales ---------- */
.warranty-card { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 22px; }
.warranty-card h4 { margin: 0 0 10px; font-size: 15px; }
.warranty-content { white-space: pre-wrap; line-height: 1.7; font-size: 13.5px; color: var(--s-text); margin-top: 10px; }
.warranty-content ul { margin: 6px 0; padding-left: 20px; }
.warranty-content li { margin: 4px 0; }
.modal textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--s-border); border-radius: 10px; font-size: 13.5px; font-family: inherit; }

/* ---------- brand logo ---------- */
.brand-logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; vertical-align: middle; }
@media (max-width: 640px) { .brand-logo { height: 28px; max-width: 130px; } }

/* ---------- avatar dress-up ---------- */
.avatar-item { background:#fff; border:2px solid #e5e7eb; border-radius:12px; padding:8px; text-align:center; transition:.15s; }
.avatar-item.sel { border-color:#2563eb; background:#eff6ff; }
.av-mini { display:flex; justify-content:center; align-items:center; height:58px; }
.av-name { font-size:12px; color:#374151; margin:4px 0 6px; min-height:16px; }
.avatar-item .btn { width:100%; }
