/* ==========================================================================
   Antibuy — page styles (shop, product, cart, checkout, orders, parcels, qc)
   ========================================================================== */

/* page header */
.page-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; }
.page-head h1 { flex: 1; min-width: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.back-btn { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }
.back-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; }
[dir="rtl"] .back-btn svg { transform: scaleX(-1); }

/* ------------------------------------------------------------------- home */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-inline: 16px; }
.trust-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 10px; display: flex; flex-direction: column; gap: 6px; }
.trust-item svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.trust-item span { font-size: 10px; line-height: 1.35; font-weight: 600; color: var(--ink-2); }

.promo {
  margin: 20px 16px 0; border-radius: var(--radius-lg); position: relative; overflow: hidden;
  background: linear-gradient(115deg, var(--brand) 0%, var(--brand-ink) 100%);
  color: #fff; padding: 20px 18px; min-height: 132px; display: flex; align-items: center;
}
.promo .copy { position: relative; z-index: 2; max-width: 66%; }
.promo h3 { font-family: var(--serif); font-size: 24px; line-height: 1.05; text-transform: uppercase; letter-spacing: -.01em; }
.promo p { font-size: 11px; opacity: .85; margin-top: 5px; }
.promo .btn { margin-top: 12px; height: 34px; font-size: 11.5px; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.promo .art { position: absolute; inset-block: 0; inset-inline-end: -6px; width: 44%; }
.promo .art svg { width: 100%; height: 100%; }

.svc-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-inline: 16px; }
.svc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; transition: transform .16s; }
.svc:active { transform: scale(.96); }
.svc svg { width: 21px; height: 21px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc span { font-size: 10.5px; font-weight: 600; text-align: center; line-height: 1.2; }

/* --------------------------------------------------------------- category */
.cat-hero { margin: 0 16px; border-radius: var(--radius-lg); overflow: hidden; height: 116px; position: relative; display: flex; align-items: center; padding: 0 18px; background: var(--sand); color: var(--ink); }
.cat-hero h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.cat-hero p { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.cat-hero .n { font-family: var(--serif); font-size: 56px; position: absolute; inset-inline-end: 12px; opacity: .16; letter-spacing: -.04em; }

.sortbar { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: none; }
.sortbar::-webkit-scrollbar { display: none; }
.sortbtn { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 2px; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.sortbtn.on { color: var(--ink); font-weight: 700; }
.sortbtn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.result-line { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 12px; font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- product */
.gallery { position: relative; margin: 0 16px; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand); }
.gallery .main { aspect-ratio: 1 / 1.06; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .dots { position: absolute; bottom: 12px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.gallery .dots i { width: 5px; height: 5px; border-radius: 99px; background: rgba(23,19,15,.22); }
.gallery .dots i.on { width: 15px; background: var(--ink); }
.gallery .float { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; flex-direction: column; gap: 8px; }
.gallery .float button { width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.gallery .float svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 1.8; }

.pd { padding: 16px; }
.pd .brandline { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pd h1 { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; margin-top: 6px; }
.pd .pricerow { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.pd .meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.pd .meta .star { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 700; }
.pd .meta .star svg { width: 13px; height: 13px; fill: var(--accent); stroke: var(--accent); }

.opt-block { margin-top: 16px; }
.opt-block .lbl { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { min-width: 40px; height: 36px; padding: 0 13px; border-radius: 10px; border: 1.3px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.opt.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.swatch { width: 36px; height: 36px; border-radius: 999px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line) inset; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }

.fee-card { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fee-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 12.5px; }
.fee-row + .fee-row { border-top: 1px dashed var(--line); }
.fee-row .k { color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.fee-row .k .info { width: 14px; height: 14px; border-radius: 99px; background: var(--sand); display: grid; place-items: center; font-size: 9px; color: var(--muted); font-weight: 700; }
.fee-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.fee-row.total { background: var(--sand); border-top: 1px solid var(--line); }
.fee-row.total .v { font-size: 15px; font-weight: 800; color: var(--brand); }

.seller { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.seller .logo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.seller .t { font-size: 13px; font-weight: 700; }
.seller .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* 页面级吸底操作条（位于内容区与 tabbar 之间，不随内容滚动） */
.pagebar {
  position: relative; z-index: 25;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.pagebar[hidden] { display: none; }
/* 有吸底操作条时：抬高一档底部留白并收紧中间悬浮按钮，避免两者叠在一起 */
body[data-pagebar="1"] .pagebar { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
body[data-pagebar="1"] .tab.center .fab { margin-top: 0; width: 44px; height: 44px; border-radius: 14px; }
.pd-actions { display: flex; gap: 10px; }
.pd-actions .btn { flex: 1; }

/* ------------------------------------------------------------------- cart */
.cart-line { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .ph { width: 78px; height: 96px; flex: none; border-radius: 12px; }
.cart-line .t { font-size: 13px; font-weight: 600; line-height: 1.35; }
.cart-line .s { font-size: 11px; color: var(--muted); margin-top: 3px; }
.cart-line .bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.sum-card { margin: 14px 16px 0; }
.sum-line { display: flex; justify-content: space-between; padding: 7px 15px; font-size: 12.5px; color: var(--ink-2); }
.sum-line b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-line.discount b { color: var(--ok); }

/* --------------------------------------------------------------- checkout */
.block { margin: 14px 16px 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.block-head h3 { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.addr { display: flex; gap: 11px; padding: 14px; }
.addr .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.addr .ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.addr .t { font-size: 13px; font-weight: 700; }
.addr .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: var(--card); border: 1.3px solid var(--line); border-radius: 14px; transition: border-color .18s; }
.pay-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--card)); }
.pay-opt .logo { width: 40px; height: 26px; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; background: var(--ink-2); }
.pay-opt .logo.mada { background: #009B77; }
.pay-opt .logo.visa { background: #1A1F71; }
.pay-opt .logo.apple { background: #111; }
.pay-opt .logo.wallet { background: var(--brand); }
.pay-opt .logo svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pay-opt .t { font-size: 13px; font-weight: 600; }
.pay-opt .s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.pay-opt .radio { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--sand-2); margin-inline-start: auto; display: grid; place-items: center; }
.pay-opt.on .radio { border-color: var(--brand); background: var(--brand); }
.pay-opt.on .radio::after { content: ''; width: 6px; height: 6px; border-radius: 99px; background: #fff; }

.coupon-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; }
.coupon-row input { border: 0; background: transparent; flex: 1; font-size: 13px; outline: none; letter-spacing: .06em; text-transform: uppercase; }

/* ----------------------------------------------------------------- orders */
.status-pill { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--sand); color: var(--ink-2); }
.status-pill.paid { background: #FDF0DC; color: #A86A15; }
.status-pill.purchased { background: #E7EEF9; color: #2B5A9B; }
.status-pill.qc_passed { background: #E4F1E9; color: var(--ok); }
.status-pill.consolidated, .status-pill.shipped { background: var(--brand-soft); color: var(--brand); }
.status-pill.delivered { background: #E9E9E4; color: #5A5F55; }
.status-pill.cancelled { background: #F2E7E7; color: #9A4A44; }

.order-card { margin: 12px 16px 0; }
.order-card .head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.order-card .no { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.order-card .date { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.order-card .items { padding: 12px 15px; display: flex; gap: 10px; overflow-x: auto; }
.order-card .items::-webkit-scrollbar { display: none; }
.order-card .thumb { width: 56px; height: 68px; border-radius: 10px; background: var(--sand); overflow: hidden; flex: none; }
.order-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-card .foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; border-top: 1px solid var(--line); }
.order-card .track { display: flex; align-items: center; gap: 7px; padding: 9px 15px; background: var(--sand); font-size: 11px; color: var(--ink-2); }
.order-card .track svg { width: 14px; height: 14px; stroke: var(--brand); fill: none; stroke-width: 1.8; }

.timeline { padding: 4px; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; inset-inline-start: 6px; top: 16px; bottom: 0; width: 1.5px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item .dot { width: 13px; height: 13px; border-radius: 999px; border: 2px solid var(--sand-2); background: var(--card); flex: none; margin-top: 2px; z-index: 1; }
.tl-item.done .dot { border-color: var(--brand); background: var(--brand); }
.tl-item.now .dot { border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-item .t { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.tl-item .s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tl-item:not(.done):not(.now) .t { color: var(--muted); font-weight: 500; }

.track-hero { margin: 0 16px; border-radius: var(--radius); background: var(--ink); color: var(--paper); padding: 16px; }
.track-hero .no { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.track-hero .big { font-family: var(--serif); font-size: 19px; margin-top: 4px; }
.track-hero .eta { font-size: 11.5px; opacity: .8; margin-top: 3px; }

/* ---------------------------------------------------------------- parcels */
.saving { margin: 0 16px; border-radius: var(--radius-lg); padding: 16px 18px; background: linear-gradient(120deg, var(--brand), var(--brand-ink)); color: #fff; }
.saving .row1 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.saving .row1 svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.saving .big { font-family: var(--serif); font-size: 30px; letter-spacing: -.02em; }
.saving .sub { font-size: 11px; opacity: .8; }
.saving .hint { font-size: 11.5px; opacity: .92; margin-top: 8px; }

.parcel { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.parcel:last-child { border-bottom: 0; }
.parcel .ph { width: 54px; height: 64px; flex: none; border-radius: 10px; }
.parcel .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.parcel .s { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.check { width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--sand-2); display: grid; place-items: center; flex: none; }
.check.on { background: var(--brand); border-color: var(--brand); }
.check svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 2.6; display: none; }
.check.on svg { display: block; }

.channel { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.3px solid var(--line); border-radius: 13px; background: var(--card); }
.channel + .channel { margin-top: 8px; }
.channel.best { border-color: var(--brand); }
.channel .t { font-size: 12.5px; font-weight: 700; }
.channel .s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* -------------------------------------------------------------------- qc */
.qc-hero { margin: 0 16px; padding: 16px; border-radius: var(--radius); background: var(--brand-soft); display: flex; align-items: center; gap: 12px; }
.qc-hero .seal { width: 44px; height: 44px; border-radius: 999px; background: var(--brand); display: grid; place-items: center; flex: none; }
.qc-hero .seal svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.4; }
.qc-hero .t { font-size: 14px; font-weight: 800; color: var(--brand-ink); }
.qc-hero .s { font-size: 11px; color: var(--brand-ink); opacity: .75; margin-top: 2px; }
.qc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.qc-photo { aspect-ratio: 1; border-radius: 10px; background: var(--sand); display: grid; place-items: center; position: relative; overflow: hidden; }
.qc-photo svg { width: 26px; height: 26px; stroke: var(--sand-2); fill: none; stroke-width: 1.5; }
.qc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qc-photo span { position: absolute; bottom: 4px; inset-inline-start: 5px; z-index: 2; font-size: 8px; color: var(--ink-2); background: rgba(255,255,255,.86); border-radius: 4px; padding: 1px 4px; font-weight: 700; letter-spacing: .05em; }
.check-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.check-row:last-child { border: 0; }
.check-row .ok { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.check-row .ok svg { width: 13px; height: 13px; stroke: var(--ok); fill: none; stroke-width: 2.6; }
