/* Bestway storefront — "parcel post" identity: cool paper, spruce ink, postage-stamp ships-from labels. */
:root {
  --paper: #f1f2ec;
  --sheet: #fbfbf8;
  --ink: #1c2826;
  --muted: #59645f;
  --line: #d3d8cd;
  --spruce: #1f4d45;
  --spruce-2: #2b6a5f;
  --marigold: #e8b34a;
  --airmail: #2f5ba8;
  --warn: #8a4b06;
  --focus: #2f5ba8;
  --serif: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 0.4em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: #8f2d1f; }
.warn { color: var(--warn); background: #fbf0d9; padding: 10px 12px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* promise strip */
.promise { background: var(--spruce); color: #eef4f1; font-size: 14px; }
.promise ul { list-style: none; margin: 0 auto; padding: 9px var(--gutter); display: flex; gap: 10px 28px; justify-content: center; flex-wrap: wrap; max-width: 1280px; }
.promise li { display: flex; align-items: center; gap: 10px; }
.promise li + li::before { content: ""; width: 6px; height: 6px; background: var(--marigold); transform: rotate(45deg); margin-left: -18px; }

/* masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter); max-width: 1280px; margin: 0 auto; }
.wordmark { font-family: var(--serif); font-size: 30px; text-decoration: none; letter-spacing: -0.01em; }
.masthead nav { display: flex; align-items: center; gap: 22px; font-weight: 500; }
.masthead nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.masthead nav a[aria-current="page"] { border-color: var(--ink); }
.cart-btn { background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px 8px 16px; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.cart-count { background: var(--marigold); color: var(--ink); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }

main { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* gift finder: the sentence is the hero */
.finder { padding: clamp(20px, 4vw, 48px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.finder-kicker { color: var(--muted); margin: 0 0 18px; max-width: 60ch; }
.finder-sentence { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 60px); line-height: 1.22; max-width: 17em; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.28em; letter-spacing: -0.01em; }
.finder-sentence > span:has(+ select), .finder-sentence > span { white-space: nowrap; }
.finder-sentence select + span { margin-left: -0.28em; }
.finder-sentence select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-bottom: 3px solid var(--marigold);
  font-family: var(--serif); font-size: inherit; line-height: 1.1; color: var(--spruce); padding: 0 1.05em 0 0; border-radius: 0; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%231f4d45' stroke-width='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.15em center; background-size: 0.5em auto; max-width: 100%;
}
.finder-sentence select:hover { color: var(--spruce-2); }
.finder-count { color: var(--muted); margin: 20px 0 0; min-height: 1.5em; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 44px 28px; }
.card { min-width: 0; }
.card-hit { display: block; width: 100%; padding: 0; border: 0; background: none; position: relative; text-align: left; border-radius: 6px; }
.art { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #dfe3da; }
.art svg, .art img { width: 100%; height: 100%; object-fit: cover; }
.card-hit:hover .art svg, .card-hit:focus-visible .art svg { transform: scale(1.02); }
.art svg { transition: transform 0.35s ease; }
.card-text { padding-top: 26px; }
.card h3 { font-size: 21px; margin-bottom: 2px; }
.maker { color: var(--muted); margin: 0 0 8px; font-size: 15px; }
.price { font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.tag { font-size: 12px; font-weight: 600; color: var(--spruce); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
.shipline { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* the postage stamp */
.stamp {
  --r: 4px; --s: 11px;
  position: relative; min-width: 120px; flex: none;
  padding: 11px 30px 10px 15px; background: var(--sheet); color: var(--ink);
  display: grid; gap: 1px; text-align: left; transform: rotate(-2deg);
  -webkit-mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(-1 * var(--r)) calc(-1 * var(--r)) / var(--s) var(--s) round,
                linear-gradient(#000 0 0) calc(var(--r) + 1px) calc(var(--r) + 1px) / calc(100% - 2 * var(--r) - 2px) calc(100% - 2 * var(--r) - 2px) no-repeat;
          mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(-1 * var(--r)) calc(-1 * var(--r)) / var(--s) var(--s) round,
                linear-gradient(#000 0 0) calc(var(--r) + 1px) calc(var(--r) + 1px) / calc(100% - 2 * var(--r) - 2px) calc(100% - 2 * var(--r) - 2px) no-repeat;
  box-shadow: inset 0 0 0 7px var(--sheet), inset 0 0 0 8px var(--line);
}
.stamp-kicker { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.stamp-city { font-family: var(--serif); font-size: 17px; line-height: 1.15; }
.stamp-country { font-size: 11px; font-weight: 700; color: var(--spruce); }
.postmark {
  position: relative; margin-left: -18px; margin-top: -10px; flex: none; width: 86px; height: 86px; border-radius: 50%;
  border: 2px solid var(--airmail); color: var(--airmail); display: grid; place-content: center; text-align: center;
  transform: rotate(-12deg); background: rgba(251, 251, 248, 0.55); line-height: 1.1;
}
.postmark span { font-size: 11px; }
.postmark strong { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.postmark::before, .postmark::after { content: ""; position: absolute; right: -46px; width: 44px; height: 2px; background: var(--airmail);
  border-radius: 2px; }
.postmark::before { top: 34px; }
.postmark::after { top: 46px; }
.label { position: absolute; left: 14px; bottom: -18px; display: flex; align-items: center; max-width: calc(100% - 20px); }
.label.lg { bottom: 16px; left: 18px; }
.nw { white-space: nowrap; }

.empty { text-align: center; padding: 40px 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--spruce); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* how it works */
.how { margin: 88px 0 24px; padding: 36px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 24px 48px; }
.how h2 { font-size: 30px; }
.how ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.how li { counter-increment: step; color: var(--muted); }
.how li::before { content: counter(step); font-family: var(--serif); font-size: 28px; color: var(--spruce); display: block; margin-bottom: 6px; }
.how strong { color: var(--ink); display: block; font-weight: 600; }

/* buttons + forms */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: var(--spruce); color: #fff; border: 0; border-radius: 10px;
  padding: 13px 20px; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--spruce-2); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-quiet { background: transparent; border: 1.5px solid var(--ink); border-radius: 8px; padding: 7px 12px; font-weight: 600; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
input, select, textarea { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 11px; font-weight: 400; font-size: 16px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--spruce); outline: none; box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.18); }

/* drawers */
.scrim { position: fixed; inset: 0; background: rgba(20, 30, 28, 0.42); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(540px, 100vw); background: var(--paper); z-index: 41; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.28s ease; box-shadow: -18px 0 40px rgba(20, 30, 28, 0.18); }
.drawer.open { transform: none; }
.close { position: fixed; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sheet);
  font-size: 26px; line-height: 1; z-index: 2; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
#cart-body, .pd-main { padding: 24px 28px 40px; }
#cart-body { padding-top: 28px; }
.pd-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.pd-art svg { width: 100%; height: 100%; }
.pd-main h2 { font-size: 32px; }
.pd-price { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.soldby { color: var(--muted); margin: 0 0 18px; }
.estimate { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.estimate-line { margin: 0 0 10px; }
.estimate-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.estimate-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.maker-story { margin: 24px 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.maker-story blockquote { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.maker-story figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.add { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: end; margin-top: 18px; }
.add .full { grid-column: 1 / -1; }

/* cart parcels */
.parcel { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.parcel header { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-bottom: 10px; align-items: baseline; }
.parcel-n { font-family: var(--serif); font-size: 18px; }
.parcel-from { font-size: 14px; color: var(--muted); }
.parcel-eta { grid-column: 1 / -1; font-weight: 700; color: var(--airmail); font-size: 15px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.line-art { width: 64px; height: 48px; border-radius: 6px; overflow: hidden; }
.line-art svg { width: 100%; height: 100%; }
.line-title { margin: 0; font-weight: 600; }
.line p { margin: 0; }
.totals { margin: 18px 0; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; font-size: 18px; }
.totals .total dt { color: var(--ink); }
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkout h3, .checkout p, .checkout .full { grid-column: 1 / -1; }
.checkout h3 { font-size: 22px; margin: 6px 0 0; }
.checkout p { margin: -6px 0 0; }
.demo-risk { font-size: 14px; color: var(--muted); }
.demo-risk summary { cursor: pointer; }
.demo-risk label { margin-top: 8px; }

/* tracking */
.track-head { padding: 48px 0 24px; max-width: 760px; }
.track-head h1 { font-size: clamp(34px, 5vw, 52px); }
.track-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; margin-top: 20px; }
.hint { color: var(--muted); font-size: 14px; }
#track-result { max-width: 860px; padding-bottom: 60px; }
.order-head { margin: 12px 0 8px; }
.order-head h2 { font-size: 30px; }
.parcels { display: grid; gap: 4px; }
.parcel-track { padding: 18px 20px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 4px 0 14px; counter-reset: s; }
.steps li { position: relative; padding-top: 18px; font-size: 14px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 4px; background: var(--line); }
.steps li::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done::before, .steps li.done::after { background: var(--spruce); }
.convo, .help { margin-top: 36px; }
.convo h3, .help h3 { font-size: 24px; }
.ticket { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.msg { margin: 6px 0; }
.who { font-weight: 700; margin-right: 6px; }
.msg-customer .who { color: var(--muted); }
#help-form { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 620px; }
#help-form .btn { justify-self: start; }
.reply { margin-top: 16px; max-width: 620px; background: var(--sheet); border-left: 4px solid var(--spruce); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.reply p { margin: 0 0 8px; }
.who-line { font-weight: 700; font-size: 14px; color: var(--spruce); }
.promise-timer { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--spruce); margin: 0 0 6px; }
.clock { width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.clock::before { content: ""; position: absolute; left: 6px; top: 2px; width: 2px; height: 6px; background: currentColor; }
.clock::after { content: ""; position: absolute; left: 6px; top: 7px; width: 5px; height: 2px; background: currentColor; }

/* footer */
.foot { max-width: 1280px; margin: 40px auto 0; padding: 32px var(--gutter) 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2fr 1fr; gap: 24px; color: var(--muted); font-size: 15px; }
.foot-brand { font-family: var(--serif); font-size: 24px; color: var(--ink); margin: 0 0 6px; }
.foot p { max-width: 62ch; }
.foot-demo { align-self: end; justify-self: end; text-align: right; }

@media (max-width: 860px) {
  .how { grid-template-columns: 1fr; }
  .how ol { grid-template-columns: 1fr; }
  .track-form { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .foot-demo { justify-self: start; text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .promise ul { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; gap: 28px; scrollbar-width: none; }
  .promise li { white-space: nowrap; }
  .masthead { padding-top: 16px; padding-bottom: 16px; }
  .wordmark { font-size: 26px; }
  .masthead nav { gap: 14px; font-size: 15px; }
  .masthead nav a[data-nav="shop"] { display: none; }
  .grid { grid-template-columns: 1fr; gap: 48px; }
  .checkout { grid-template-columns: 1fr; }
  #cart-body, .pd-main { padding: 20px 18px 36px; }
}
