/* The shop.
 *
 * Built on the sell journey's own furniture (public/sellmygadget/index.html): the same logo, the
 * same navy gradient hero, the same overlapping white trust strip, the same dark footer. A customer
 * who sold us a phone and now buys one must not feel handed to a different company, so the shell is
 * a copy of that page's and only the middle differs.
 */
:root {
  --navy:        #0E2E5C;
  --navy-2:      #143B7A;
  --brand:       #1E54C7;
  --brand-dark:  #173F95;
  --accent:      #3FB6F0;
  --accent-dark: #2A9ED6;
  --ink:         #1F2937;
  --muted:       #6B7280;
  --line:        #E5E7EB;
  --bg:          #F4F8FD;
  --white:       #FFFFFF;
  --good:        #0F7B4F;
  --warn:        #B45309;
  --radius:      14px;
  --shadow:      0 10px 30px rgba(14, 46, 92, .10), 0 2px 6px rgba(14, 46, 92, .05);
  --max:         1180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button { font-family: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header — lifted from the sell page ---------- */
header.site { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.logo { height: 56px; width: auto; display: block; }
nav.links { display: flex; gap: 26px; align-items: center; }
nav.links a { font-size: 15px; font-weight: 500; color: var(--ink); }
nav.links a.on { color: var(--brand); font-weight: 600; }
.cta-quote {
  background: var(--accent); color: var(--white);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s;
}
.cta-quote:hover { background: var(--accent-dark); }
.basket-count {
  background: rgba(255,255,255,.28); border-radius: 999px; min-width: 20px; height: 20px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; padding: 0 6px;
}
@media (max-width: 720px) {
  nav.links a { display: none; }
  .brand img.logo { height: 44px; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 460px at 85% -10%, rgba(63,182,240,0.22), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(30,84,199,0.25), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  padding: 56px 0 64px;
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(28px, 4.6vw, 46px); line-height: 1.1; margin: 0 0 12px;
  letter-spacing: -0.8px; font-weight: 800;
}
.hero h1 span { color: var(--accent); }
.hero-sub { font-size: clamp(15px, 1.6vw, 18px); opacity: .92; margin: 0 0 28px; }
.hero-tools { display: flex; gap: 10px; max-width: 600px; margin: 0 auto; }
.hero-tools input, .hero-tools select {
  font: inherit; font-size: 16px; border: 0; border-radius: 999px;
  padding: 15px 22px; background: var(--white); color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.hero-tools input { flex: 1; min-width: 0; }
.hero-tools input::placeholder { color: #9AA6B6; }
.hero-tools select { flex: 0 0 auto; font-weight: 600; padding-right: 16px; }
.hero-tools input:focus, .hero-tools select:focus { outline: 3px solid rgba(63,182,240,.5); }

/* ---------- Trust strip, overlapping the hero ---------- */
.trust-section { padding: 0; transform: translateY(-30px); }
.trust-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.trust-strip .item {
  display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  font-size: 14px; color: var(--ink); font-weight: 500; border-right: 1px solid var(--line);
}
.trust-strip .item:last-child { border-right: 0; }
.trust-strip .tick {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(63,182,240,.15); display: grid; place-items: center; color: var(--brand);
}
@media (max-width: 820px) {
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip .item:nth-child(2) { border-right: 0; }
  .trust-strip .item:nth-child(1), .trust-strip .item:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 460px) {
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip .item { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-strip .item:last-child { border-bottom: 0; }
}

/* ---------- Catalogue ---------- */
main.shop { padding-bottom: 20px; }
.sec-head { text-align: center; margin: 18px 0 26px; }
.sec-head h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 6px; color: var(--navy); letter-spacing: -.4px; }
.sec-head p { margin: 0; color: var(--muted); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .shot { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #F8FAFD; padding: 16px; }
.card .shot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card .shot .fallback { color: #C7D2E1; font-size: 13px; }
.card .body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card h3 { margin: 0; font-size: 16px; color: var(--navy); line-height: 1.35; }
.card .avail { font-size: 13px; color: var(--muted); }
.card .from { margin-top: 6px; font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.4px; }
.card .from small { font-size: 12px; font-weight: 500; color: var(--muted); display: block; letter-spacing: 0; }
.card .pick {
  margin-top: 13px; border: 0; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 11px 16px; font-weight: 600; font-size: 15px; width: 100%;
}
.card .pick:hover { background: var(--brand-dark); }

/* ---------- One model, expandable to its handsets ---------- */
.back { background: none; border: 0; color: var(--brand); font-weight: 600; padding: 0; margin: 26px 0 16px; font-size: 15px; }
.model { display: grid; gap: 28px; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
@media (max-width: 800px) { .model { grid-template-columns: 1fr; } }
.model .shot {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; place-items: center; aspect-ratio: 1;
}
.model .shot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.model h2 { margin: 0 0 6px; font-size: 28px; color: var(--navy); letter-spacing: -.5px; }
.model .desc { color: var(--muted); margin: 0 0 20px; }

.grade { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.grade > summary {
  padding: 16px 18px; cursor: pointer; display: flex; align-items: baseline;
  justify-content: space-between; gap: 14px; list-style: none;
}
.grade > summary::-webkit-details-marker { display: none; }
.grade > summary:hover { background: #FAFCFF; }
.grade .gname { font-weight: 700; color: var(--navy); font-size: 17px; }
.grade .gblurb { color: var(--muted); font-size: 13.5px; margin-top: 3px; max-width: 56ch; }
.grade .gprice { font-weight: 800; color: var(--navy); font-size: 20px; white-space: nowrap; letter-spacing: -.3px; }
.grade .gprice small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: right; letter-spacing: 0; }
.units { border-top: 1px solid var(--line); }
.unit { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #F1F5F9; flex-wrap: wrap; }
.unit:last-child { border-bottom: 0; }
.unit .meta { flex: 1 1 240px; min-width: 0; }
.unit .line1 { font-weight: 600; color: var(--navy); font-size: 14.5px; }
.unit .line2 { color: var(--muted); font-size: 13px; }
.unit .note { color: var(--warn); font-size: 13px; margin-top: 2px; }
.unit .price { font-weight: 800; color: var(--navy); font-size: 18px; }
.unit button {
  border: 1px solid var(--brand); background: var(--white); color: var(--brand);
  border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 14px;
}
.unit button:hover { background: var(--brand); color: #fff; }
.unit button.in { background: var(--good); border-color: var(--good); color: #fff; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }
.pill.batt { background: #E7F6EE; color: var(--good); }
.pill.seen { background: #FEF3E2; color: var(--warn); }

/* ---------- Basket ---------- */
.scrim { position: fixed; inset: 0; background: rgba(14, 46, 92, .45); z-index: 90; }
.scrim[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--bg);
  z-index: 100; display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(14, 46, 92, .2);
}
.drawer[hidden] { display: none; }
.drawer header { padding: 18px 20px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer header h2 { margin: 0; font-size: 18px; color: var(--navy); }
.drawer .close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); padding: 0 4px; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 18px 20px 10px; }
.drawer .foot { background: var(--white); border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.bline { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.bline .meta { flex: 1; min-width: 0; }
.bline .t { font-weight: 600; color: var(--navy); font-size: 14.5px; }
.bline .s { color: var(--muted); font-size: 13px; }
.bline .p { font-weight: 700; color: var(--navy); }
.bline .rm { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 0; text-decoration: underline; }
.bline .rm:hover { color: #B91C1C; }
.totals { font-size: 14.5px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 20px; font-weight: 800; color: var(--navy); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.field input { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
.field input:focus { outline: 2px solid rgba(30, 84, 199, .25); border-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.pay { width: 100%; border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 15px; font-size: 16px; font-weight: 700; margin-top: 6px; }
.pay:hover { background: var(--brand-dark); }
.pay:disabled { background: #9CB3DE; cursor: not-allowed; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 9px; text-align: center; }

.alert { border-radius: 10px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }
.alert.bad { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert.info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

.empty { text-align: center; padding: 50px 20px 70px; color: var(--muted); }
.empty h2 { color: var(--navy); margin: 0 0 8px; font-size: 22px; }

/* ---------- Footer — the sell page's ---------- */
footer.site { background: #0A2247; color: #B6C5DC; padding: 44px 0 28px; margin-top: 44px; font-size: 14px; }
footer.site .footer-logo img { height: 56px; width: auto; display: block; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .95; }
footer.site h4 { color: #fff; margin: 0 0 8px; font-size: 15px; }
footer.site p { margin: 0 0 14px; max-width: 78ch; line-height: 1.65; }
footer.site a { color: var(--accent); }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding-top: 18px; font-size: 13px; opacity: .85; }

/* ---------- Confirmation ---------- */
.confirm { max-width: 640px; margin: 44px auto 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.confirm h1 { margin: 0 0 6px; font-size: 26px; color: var(--navy); letter-spacing: -.5px; }
.confirm .ref { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); font-size: 17px; }
.tick-big { width: 48px; height: 48px; border-radius: 50%; background: #E7F6EE; color: var(--good); display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }

/* ---------- Phones ----------
   At 375px the header kept brand, links and basket on one row: the links wrapped and the basket was
   clipped off the right edge. Above 720px the sell page hides its text links on mobile; the shop
   does the same and keeps only the basket. */
@media (max-width: 560px) {
  .hero { padding: 40px 0 52px; }
  .hero-tools { flex-direction: column; }
  .hero-tools input, .hero-tools select { border-radius: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
  .grade > summary { flex-direction: column; gap: 8px; }
  .grade .gprice, .grade .gprice small { text-align: left; }
  .unit { gap: 10px; }
  .unit .price { margin-left: auto; }
  .confirm { padding: 24px; }
}
