/* ==========================================================================
   Storefront styles — China sourcing shop
   Palette: navy ink + cargo red + packing-tape yellow on cool paper.
   Fonts: Anek Latin (headings), Hind (body).
   ========================================================================== */
:root {
  --ink: #13233f;
  --ink-2: #24385c;
  --red: #c8261e;
  --red-dark: #a51d16;
  --tape: #f2b20f;
  --tape-soft: #fff4d1;
  --paper: #f3f5f8;
  --card: #ffffff;
  --line: #dce1e8;
  --muted: #5e6878;
  --ok: #17804a;
  --ok-soft: #e3f4ea;
  --bad: #b3261e;
  --bad-soft: #fdeceb;
  --info-soft: #e7eef9;
  --radius: 8px;
  --radius-sm: 5px;
  --head: "Anek Latin", "Hind", system-ui, sans-serif;
  --body: "Hind", system-ui, sans-serif;
  --wrap: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
[x-cloak] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hide-sm { display: none; }
@media (min-width: 900px) { .hide-sm { display: initial; } .show-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: 600 1rem/1 var(--body); padding: .8em 1.3em; border-radius: var(--radius-sm); border: 1.5px solid transparent; cursor: pointer; background: var(--ink); color: #fff; transition: background .15s; white-space: nowrap; }
.btn:hover { background: var(--ink-2); color: #fff; }
.btn-red { background: var(--red); }
.btn-red:hover { background: var(--red-dark); }
.btn-tape { background: var(--tape); color: var(--ink); }
.btn-tape:hover { background: #e0a200; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-sm { padding: .5em .9em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { color: var(--red); font-weight: 600; }
label { display: block; font-weight: 600; margin-bottom: .3em; font-size: .95rem; }
.input, select.input, textarea.input { width: 100%; font: inherit; padding: .65em .8em; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(242,178,15,.35); }
textarea.input { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1rem; }
.field-error { color: var(--bad); font-size: .85rem; margin-top: .25em; }
.check { display: flex; gap: .5em; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: .35em; accent-color: var(--red); width: 1.05em; height: 1.05em; }
.grid-2 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Alerts & badges ---------- */
.alert { padding: .8em 1em; border-radius: var(--radius-sm); margin: 1rem 0; border-left: 4px solid; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok); }
.alert-bad { background: var(--bad-soft); border-color: var(--bad); }
.alert ul { margin: 0; padding-left: 1.2em; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15em .6em; border-radius: 999px; background: var(--info-soft); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--tape-soft); color: #7a5600; }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--ink-2); }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #c9d3e3; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-top: .35rem; padding-bottom: .35rem; }
.topbar a:hover { color: var(--tape); }
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.logo { font-family: var(--head); font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .4em; color: var(--ink); }
.logo img { height: 40px; width: auto; }
.logo-mark { width: 34px; height: 34px; background: var(--red); border-radius: 6px; position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; background: var(--tape); }
.search { display: flex; border: 2px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; background: #fff; grid-column: 1 / -1; order: 3; }
.search input { flex: 1; border: 0; font: inherit; padding: .6em .9em; min-width: 0; }
.search input:focus { outline: none; }
.search .cam { background: none; border: 0; border-left: 1px solid var(--line); padding: 0 .8em; cursor: pointer; color: var(--muted); display: flex; align-items: center; }
.search .cam:hover { color: var(--red); }
.search button[type=submit] { border: 0; background: var(--ink); color: #fff; padding: 0 1.2em; cursor: pointer; font: 600 1rem var(--body); }
@media (min-width: 900px) { .search { grid-column: auto; order: 0; } }
.head-actions { display: flex; align-items: center; gap: .3rem; }
.icon-btn { position: relative; display: flex; align-items: center; gap: .35em; padding: .45em .6em; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn .count[hidden] { display: none; }
.icon-btn .count { position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff; font-size: .7rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding-top: .3rem; padding-bottom: .3rem; }
.catbar a { padding: .35em .8em; border-radius: 999px; white-space: nowrap; font-size: .92rem; }
.catbar a:hover { background: var(--paper); color: var(--ink); }

/* ---------- Home ---------- */
.home-top { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 900px) { .home-top { grid-template-columns: 240px 1fr 260px; } }
.side-cats { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; display: none; }
@media (min-width: 900px) { .side-cats { display: block; } }
.side-cats a { display: flex; align-items: center; gap: .6em; padding: .45em .6em; border-radius: var(--radius-sm); font-size: .95rem; }
.side-cats a:hover { background: var(--paper); color: var(--red); }
.side-cats img, .side-cats .dot { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; flex: none; }
.side-cats .dot { background: var(--paper); border: 1px dashed var(--line); }
.hero { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 260px; background: var(--ink); color: #fff; }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: flex-end; opacity: 0; transition: opacity .6s; }
.hero-slide.on { opacity: 1; position: relative; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,20,40,.78), rgba(10,20,40,0) 70%); }
.hero-copy { position: relative; padding: 1.5rem; max-width: 560px; }
.hero-copy h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin-bottom: .3em; }
.hero-dots { position: absolute; right: 1rem; bottom: 1rem; display: flex; gap: 6px; z-index: 2; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.hero-dots button.on { background: var(--tape); }
/* Typographic hero used when no banner image is uploaded */
.hero-type { padding: 1.8rem 1.6rem; display: flex; flex-direction: column; justify-content: center; min-height: 260px; background:
  repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 64px), var(--ink); }
.hero-type h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -.01em; max-width: 14em; }
.hero-type .route { display: flex; align-items: center; gap: .6em; font-family: var(--head); font-weight: 600; color: var(--tape); margin-bottom: .8rem; }
.hero-type .route i { flex: 0 0 64px; border-top: 2px dashed var(--tape); }
.side-banners { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .side-banners { grid-template-columns: 1fr; } }
.side-banner { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); position: relative; min-height: 120px; }
.side-banner img { width: 100%; height: 100%; object-fit: cover; }
.side-banner .cap { position: absolute; left: .8rem; bottom: .6rem; right: .8rem; color: #fff; font-family: var(--head); font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.howto { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.howto h3 { margin: 0; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .55rem; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: .5rem; font-size: .93rem; line-height: 1.4; }
.howto li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--tape); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.section { margin: 2rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .8rem; border-bottom: 2px solid var(--ink); padding-bottom: .4rem; }
.section-head h2 { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(8, 1fr); } }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .4rem; text-align: center; font-size: .88rem; line-height: 1.3; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.cat-tile:hover { border-color: var(--ink); color: var(--ink); }
.cat-tile img, .cat-tile .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.cat-tile .ph { background: var(--paper); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 1.3rem; color: var(--red); }

/* ---------- Product cards ---------- */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1150px) { .products { grid-template-columns: repeat(5, 1fr); } }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--ink); color: var(--ink); }
.pcard .img { aspect-ratio: 1; background: var(--paper); }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: .6rem .7rem .7rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.pcard .t { font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.2rem; color: var(--red); }
.pcard .meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: auto; }
.skeleton { background: linear-gradient(90deg, #eceff3 25%, #f6f7f9 50%, #eceff3 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); aspect-ratio: .75; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Search page ---------- */
.search-head { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: flex-end; margin: 1.2rem 0 1rem; }
.search-head h1 { margin: 0; font-size: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters .input { width: auto; padding: .45em .6em; }
.filters .input.num { width: 90px; }

/* ---------- Product page ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin: 1rem 0; }
.crumbs a:hover { color: var(--red); }
.pd { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .pd { grid-template-columns: 460px 1fr; } }
.gallery .main { aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: .4rem; margin-top: .5rem; overflow-x: auto; }
.thumbs button { flex: 0 0 64px; height: 64px; border: 2px solid transparent; border-radius: var(--radius-sm); padding: 0; overflow: hidden; cursor: pointer; background: #fff; }
.thumbs button.on { border-color: var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: 1.45rem; font-weight: 600; }
.price-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.price-big { font-family: var(--head); font-size: 2.1rem; font-weight: 800; color: var(--red); line-height: 1; }
.tiers { display: flex; gap: 0; margin-top: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tiers div { flex: 1; padding: .45rem .6rem; border-right: 1px solid var(--line); font-size: .85rem; }
.tiers div:last-child { border-right: 0; }
.tiers div.on { background: var(--tape-soft); box-shadow: inset 0 -3px 0 var(--tape); }
.tiers strong { display: block; font-family: var(--head); font-size: 1.05rem; }
.opt { margin: 1rem 0; }
.opt-title { font-weight: 600; margin-bottom: .4rem; }
.opt-values { display: flex; flex-wrap: wrap; gap: .4rem; }
.opt-values button { display: flex; align-items: center; gap: .4em; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: .3em .7em; font: inherit; font-size: .92rem; cursor: pointer; }
.opt-values button img { width: 30px; height: 30px; object-fit: cover; border-radius: 3px; }
.opt-values button.on { border-color: var(--red); background: #fff6f5; }
.sku-rows { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 360px; overflow-y: auto; }
.sku-row { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.sku-row:last-child { border-bottom: 0; }
.sku-row .out { color: var(--muted); text-decoration: line-through; }
.stepper { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { width: 32px; border: 0; background: var(--paper); cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.stepper input { width: 56px; border: 0; text-align: center; font: inherit; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.buy-sum { flex: 1 1 100%; background: var(--ink); color: #fff; border-radius: var(--radius); padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.buy-sum strong { font-family: var(--head); font-size: 1.4rem; color: var(--tape); }
.seller-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; font-size: .92rem; }
.notice { background: var(--tape-soft); border-radius: var(--radius); padding: .8rem 1rem; font-size: .9rem; margin-top: 1rem; }
.tabs-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 2rem 0; }
.tabs-nav { display: flex; border-bottom: 1px solid var(--line); }
.tabs-nav button { background: none; border: 0; font: 600 1rem var(--body); padding: .8rem 1.2rem; cursor: pointer; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs-nav button.on { color: var(--ink); border-color: var(--red); }
.tabs-body { padding: 1rem; overflow-x: auto; }
.desc img { margin: 0 auto; height: auto; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); font-size: .93rem; }
.spec-table th { width: 35%; color: var(--muted); font-weight: 600; }

/* ---------- Cart / checkout ---------- */
.page-title { margin: 1.3rem 0 1rem; }
.two-col { display: grid; gap: 1.2rem; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 360px; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.panel + .panel { margin-top: 1rem; }
.panel h3 { margin-bottom: .8rem; }
.cart-group { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1rem; }
.cart-group-head { padding: .6rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); font-weight: 600; font-size: .9rem; display: flex; justify-content: space-between; gap: 1rem; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper); }
.cart-line .row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-top: .4rem; }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.sum-row.total { border-top: 2px solid var(--ink); margin-top: .4rem; padding-top: .6rem; font-family: var(--head); font-weight: 700; font-size: 1.2rem; }
.sum-row.hl { background: var(--tape-soft); margin: .4rem -1rem; padding: .6rem 1rem; font-weight: 700; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem; border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; cursor: pointer; background: #fff; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--red); background: #fff9f8; }
.choice input { margin-top: .3em; accent-color: var(--red); }

/* ---------- Account ---------- */
.account { display: grid; gap: 1.2rem; margin: 1.3rem 0 2rem; align-items: start; }
@media (min-width: 900px) { .account { grid-template-columns: 230px 1fr; } }
.acc-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; display: flex; gap: .2rem; overflow-x: auto; }
@media (min-width: 900px) { .acc-nav { flex-direction: column; } }
.acc-nav a, .acc-nav button { padding: .55em .8em; border-radius: var(--radius-sm); white-space: nowrap; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.acc-nav a.on { background: var(--ink); color: #fff; }
.acc-nav a:hover:not(.on), .acc-nav button:hover { background: var(--paper); }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.stat b { display: block; font-family: var(--head); font-size: 1.6rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--paper); font-weight: 600; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }

/* ---------- Route timeline (signature element) ---------- */
.route-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.2rem 1.2rem 1rem; margin-bottom: 1rem; }
.route-ends { display: flex; justify-content: space-between; font-family: var(--head); font-weight: 700; font-size: 1.1rem; }
.route-ends span:last-child { text-align: right; }
.route-ends small { display: block; font-family: var(--body); font-weight: 400; font-size: .8rem; color: #9fb0cc; }
.route-line { position: relative; height: 34px; margin: .6rem 0 .9rem; }
.route-line::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; border-top: 2px dashed #506384; }
.route-line .done { position: absolute; left: 0; top: 15px; height: 4px; background: var(--tape); border-radius: 2px; }
.route-line .box { position: absolute; top: 3px; width: 30px; height: 28px; margin-left: -15px; background: var(--tape); color: var(--ink); border-radius: 4px; display: grid; place-items: center; }
.route-line .box svg { width: 18px; height: 18px; }
.route-now { font-family: var(--head); font-size: 1.3rem; font-weight: 700; }
.route-steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0; }
.route-steps li { display: grid; grid-template-columns: 22px 1fr; gap: .7rem; padding-bottom: .8rem; position: relative; }
.route-steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #506384; margin: .45em 0 0 4px; background: var(--ink); z-index: 1; }
.route-steps li::after { content: ""; position: absolute; left: 9px; top: 1.2em; bottom: -.2em; border-left: 2px solid #33476a; }
.route-steps li:last-child::after { display: none; }
.route-steps li.done::before { background: var(--tape); border-color: var(--tape); }
.route-steps li.now::before { background: var(--red); border-color: #fff; box-shadow: 0 0 0 3px rgba(200,38,30,.45); }
.route-steps li:not(.done):not(.now) { color: #7f90ad; }
.route-steps small { display: block; color: #9fb0cc; font-size: .82rem; }

/* ---------- Auth ---------- */
.auth-box { max-width: 440px; margin: 2.5rem auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.auth-box h1 { font-size: 1.6rem; }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin: 1.5rem 0; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 .6rem; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .off { color: #aab2bf; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c3cde0; margin-top: 3rem; padding: 2.5rem 0 1rem; font-size: .93rem; }
.footer .cols { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: 1.05rem; }
.footer a:hover { color: var(--tape); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer .bottom { border-top: 1px solid #2c4068; margin-top: 2rem; padding-top: 1rem; font-size: .83rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: var(--radius); z-index: 60; box-shadow: 0 6px 24px rgba(0,0,0,.25); border-left: 4px solid var(--tape); }
.prose h2 { margin-top: 1.4em; }
.prose img { height: auto; }
.float-wa { position: fixed; right: 16px; bottom: 16px; width: 52px; height: 52px; border-radius: 50%; background: #1faa53; color: #fff; display: grid; place-items: center; z-index: 50; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.float-wa:hover { color: #fff; }

/* ---------- Print (invoice) ---------- */
@media print {
  .no-print, .topbar, .header, .catbar, .footer, .float-wa { display: none !important; }
  body { background: #fff; }
}

/* ---------- Phase 3 additions ---------- */
.skip { position: absolute; left: -999px; top: 0; background: var(--tape); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice-bar { background: var(--tape); color: var(--ink); text-align: center; font-weight: 600; font-size: .92rem; padding: .45rem 1rem; }
.notice-bar a:hover { color: var(--ink); text-decoration: underline; }
.socials { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .88rem; }
.socials a { text-decoration: underline; text-underline-offset: 3px; }
.seo-text { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; color: #2c3a52; }
.seo-text h2 { font-size: 1.25rem; margin-top: 1.2em; } .seo-text h2:first-child { margin-top: 0; }
.seo-text p, .seo-text li { max-width: 75ch; }
.blocked-box { background: var(--bad-soft); border-left: 4px solid var(--bad); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 1rem 0; }
.post-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--ink); color: var(--ink); }
.post-card .cover { aspect-ratio: 1200/630; background: var(--ink); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .cover.ph { display: grid; place-items: center; color: var(--tape); font-family: var(--head); font-weight: 700; font-size: 1.1rem; padding: 1rem; text-align: center; }
.post-card .b { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.post-card h3 { margin: 0; font-size: 1.1rem; }
.article { max-width: 760px; margin: 1.3rem auto 2rem; }
.article .body { font-size: 1.07rem; line-height: 1.8; }
.article .body h2 { margin-top: 1.6em; }
.article .body img { height: auto; border-radius: var(--radius); margin: 1rem 0; }
.article .body a { color: var(--red); text-decoration: underline; }
.article .cover-img { width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.thread { display: flex; flex-direction: column; gap: .6rem; max-height: 420px; overflow-y: auto; padding: .2rem; }
.bubble { max-width: 85%; padding: .6rem .8rem; border-radius: 10px; background: var(--paper); font-size: .95rem; }
.bubble.me { align-self: flex-end; background: var(--info-soft); }
.bubble.staff { border-left: 3px solid var(--tape); }
.bubble small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: .2rem; }
.bubble img { max-width: 220px; border-radius: 6px; margin-top: .4rem; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-family: var(--head); }

/* ---------- Phase 4: services, trust, reviews ---------- */
.catbar-svc { font-weight: 600; color: var(--red); }
.svc-cards { display: grid; gap: .7rem; grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
@media (min-width: 900px) { .svc-cards { grid-template-columns: repeat(4, 1fr); } }
.svc-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.svc-card strong { font-family: var(--head); font-size: 1.1rem; }
.svc-card span { font-size: .88rem; color: var(--muted); }
.svc-card:hover { border-color: var(--ink); border-left-color: var(--red); color: var(--ink); }
.trust { display: grid; gap: .7rem; grid-template-columns: 1fr; margin-top: .8rem; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1rem 1.2rem; }
@media (min-width: 700px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust div { display: flex; flex-direction: column; border-left: 3px solid var(--tape); padding-left: .7rem; }
.trust strong { font-family: var(--head); color: var(--tape); }
.trust span { font-size: .88rem; color: #c3cde0; }
.review-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.review-card blockquote { margin: 0; font-size: .95rem; }
.review-card figcaption { font-size: .85rem; color: var(--muted); margin-top: auto; }
.stars { color: var(--tape); letter-spacing: 2px; font-size: 1.1rem; }
.stars span { color: var(--line); }
.svc-hero { display: grid; gap: 1.2rem; margin: 1.3rem 0; align-items: start; }
@media (min-width: 900px) { .svc-hero { grid-template-columns: 1fr 380px; } }
.svc-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.eyebrow { display: inline-block; font-family: var(--head); font-weight: 700; color: var(--red); margin-bottom: .3rem; }
.steps-inline { padding-left: 1.2rem; display: grid; gap: .3rem; }
.rate-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--tape); border-radius: var(--radius); padding: 1rem; }
.wh-box { background: #fff; border: 2px dashed var(--ink); border-radius: var(--radius); padding: 1rem; }
.wh-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.wh-code { background: var(--tape); color: var(--ink); font-family: var(--head); font-weight: 700; padding: .1rem .7rem; border-radius: 999px; }
.wh-addr { font-family: "Noto Sans SC", "Microsoft YaHei", var(--body); white-space: pre-wrap; background: var(--paper); padding: .8rem; border-radius: var(--radius-sm); margin: 0 0 .6rem; font-size: .95rem; }
.eta { display: inline-flex; gap: .4rem; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: .15rem .8rem; font-weight: 600; font-size: .9rem; }
.eta.late { background: var(--bad-soft); color: var(--bad); }
.photo-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.photo-grid a { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); display: block; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; }
.rating-input input { position: absolute; opacity: 0; }
.rating-input label { font-size: 1.8rem; color: var(--line); cursor: pointer; margin: 0; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--tape); }
.ship-est { background: var(--paper); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; margin-top: .6rem; }

/* ---------- PWA: install sheet, app tab bar ---------- */
.pwa-sheet { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(10,20,40,.28); padding: 1rem 1rem .9rem; border-top: 4px solid var(--tape); max-width: 460px; margin: 0 auto; }
@media (max-width: 899px) { .pwa-sheet { bottom: calc(70px + env(safe-area-inset-bottom)); } }
.pwa-row { display: flex; gap: .8rem; align-items: flex-start; padding-right: 1.4rem; }
.pwa-row img { border-radius: 12px; flex: none; }
.pwa-row strong { font-family: var(--head); font-size: 1.1rem; }
.pwa-row p { margin: .15rem 0 0; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.pwa-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: .3rem; }
.pwa-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.pwa-ios { margin: .8rem 0 0; padding-left: 1.3rem; font-size: .92rem; display: grid; gap: .3rem; }
.install-link { display: none; }
.can-install .install-link { display: list-item; }
.tabbar { display: none; }
@media (max-width: 899px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(10,20,40,.06); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem 0 .4rem; font-size: .72rem; color: var(--muted); }
  .tabbar a.on { color: var(--red); }
  .tabbar .svg { width: 22px; height: 22px; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .float-wa { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* Opened as installed app: feel native — no browser-style top strip */
.is-app .topbar { display: none; }
.is-app .header { padding-top: env(safe-area-inset-top); }
.link-cta { display: grid; gap: 1rem; align-items: center; margin: 1.5rem 0; border-left: 4px solid var(--tape, #f2b20f); }
@media (min-width: 900px) { .link-cta { grid-template-columns: 1.1fr 1fr; } }
.link-cta-form { display: flex; gap: .5rem; min-width: 0; }
.link-cta-form .input { flex: 1; min-width: 0; }
