:root {
  --bg: oklch(0.985 0.002 260);
  --fg: oklch(0.2 0.012 260);
  --muted: oklch(0.52 0.015 260);
  --card: #fff;
  --surface-2: oklch(0.972 0.004 260);
  --surface-3: oklch(0.95 0.006 260);
  --border: oklch(0.91 0.006 260);
  --primary: oklch(0.52 0.2 262);
  --primary-fg: #fff;
  --primary-subtle: oklch(0.955 0.03 262);
  --ok: oklch(0.55 0.14 155);
  --ok-subtle: oklch(0.95 0.04 155);
  --warn: oklch(0.6 0.15 60);
  --danger: oklch(0.55 0.2 25);
  --ring: oklch(0.52 0.2 262 / 0.5);
  --shadow-md: 0 4px 12px -2px oklch(0.2 0.01 260 / 0.10), 0 0 0 1px oklch(0.2 0.01 260 / 0.05);
  --radius: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 0; }

/* header / footer */
.site-head { position: sticky; top: 0; z-index: 20; background: oklch(0.985 0.002 260 / 0.88); backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.logo b { color: var(--primary); font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--fg); background: var(--surface-3); }
.quote-btn { display: inline-flex; align-items: center; gap: 8px; }
.count-pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-weight: 600; }
.site-foot { border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

/* hero */
.hero { padding: 44px 0 8px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; letter-spacing: -.02em; margin: 8px 0 10px; max-width: 760px; }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 640px; margin: 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-points span::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

/* buttons, badges, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 600; font-size: 14px; background: var(--surface-3); color: var(--fg); transition: background .15s, transform .15s; }
.btn:hover { background: var(--border); }
.btn.primary { background: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { background: oklch(0.46 0.2 262); }
.btn.outline { background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
.btn.outline:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--fg); white-space: nowrap; }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
.badge.new { background: var(--primary-subtle); color: var(--primary); }
.badge.aplus { background: var(--ok-subtle); color: var(--ok); }
.badge.b { background: oklch(0.96 0.04 70); color: oklch(0.5 0.12 60); }
.badge.stock { background: var(--ok-subtle); color: var(--ok); }
.badge.out { background: var(--surface-3); color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }

/* catalog layout */
.catalog { display: grid; grid-template-columns: 240px 1fr; gap: 28px; margin-top: 28px; align-items: start; }
.filters { position: sticky; top: 82px; display: grid; gap: 22px; }
.filters h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.swatch { width: 14px; height: 14px; border-radius: 99px; box-shadow: inset 0 0 0 1px oklch(0 0 0 / .15); flex: none; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .input { max-width: 340px; }
.toolbar select.input { width: auto; }
.toolbar .result-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.filter-toggle { display: none; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .2s, transform .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card .photo { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.card .photo img { width: 100%; height: 100%; object-fit: contain; padding: 14px; mix-blend-mode: multiply; }
.card .photo .badge { position: absolute; top: 10px; left: 10px; }
.card .body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card .badges { display: flex; flex-wrap: wrap; gap: 4px; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card .brand { font-size: 12px; color: var(--muted); }
.card .meta { font-size: 12px; color: var(--muted); }
.card .dots { display: flex; gap: 4px; flex-wrap: wrap; }
.card .dots .swatch { width: 12px; height: 12px; }
.card .dots .swatch.off { opacity: .3; }
.card .price { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 6px; }
.card .price strong { font-size: 18px; }
.card .price small { color: var(--muted); font-size: 12px; }
.empty { padding: 64px 16px; text-align: center; color: var(--muted); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }

/* product page */
.crumbs { margin: 24px 0 18px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--fg); }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gallery { border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; position: sticky; top: 82px; }
.gallery img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.pdp h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 6px 0 8px; line-height: 1.15; }
.pdp .price-row { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; }
.pdp .price-row strong { font-size: 30px; letter-spacing: -.01em; }
.opt { margin-top: 20px; }
.opt h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.opt h4 span { font-weight: 400; color: var(--muted); }
.buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.qty { display: inline-flex; align-items: center; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); background: var(--card); height: 48px; }
.qty button { width: 40px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty input { width: 56px; text-align: center; border: 0; background: none; height: 100%; }
.specs { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs th { width: 38%; color: var(--muted); font-weight: 500; }
.desc { margin-top: 36px; max-width: 760px; }
.desc h2, .related h2 { font-size: 20px; margin: 0 0 10px; }
.desc p { margin: 0 0 12px; color: oklch(0.32 0.012 260); }
.related { margin-top: 48px; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .25s; z-index: 50; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* quote page */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); padding: 20px; }
.qline { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.qline:last-child { border-bottom: 0; }
.qline img { width: 64px; height: 64px; object-fit: contain; background: var(--surface-2); border-radius: 10px; padding: 4px; }
.qline .ctrl { display: flex; align-items: center; gap: 8px; }
.qline .ctrl input { width: 64px; }
.total-row { display: flex; justify-content: space-between; padding-top: 14px; font-weight: 600; font-size: 16px; }
.form-grid { display: grid; gap: 14px; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; display: none; padding: 16px; background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border); }
  .filters.open { display: grid; }
  .filter-toggle { display: inline-flex; }
  .pdp, .quote-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; }
  .nav a.hide-sm { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .grid { gap: 10px; }
  .card .body { padding: 10px 12px 12px; }
  .card h3 { font-size: 14px; }
  .toolbar .input { max-width: none; }
  .toolbar .result-count { margin-left: 0; width: 100%; }
}

/* ---- phone cards, v2 (Max's reference design 11/15) ---- */
:root { --price: oklch(0.55 0.25 292); --left: oklch(0.55 0.15 50); --font: "Figtree", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { font-family: var(--font); }
.wrap { max-width: 1320px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { border-radius: 22px; box-shadow: inset 0 0 0 2px oklch(0.94 0.004 260); padding: 22px; }
.card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px oklch(0.9 0.006 260), var(--shadow-md); }
.card .photo { border-radius: 16px; background: oklch(0.975 0.003 260); aspect-ratio: 1.27; }
.card .photo img { padding: 8px; }
.card .body { padding: 22px 0 0; gap: 0; }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.card .l2 { margin-top: 8px; font-size: 17px; color: var(--muted); }
.card .l3 { margin-top: 8px; font-size: 17px; color: var(--muted); line-height: 1.5; }
.card .price { margin-top: auto; padding-top: 18px; font-size: 26px; font-weight: 700; color: var(--price); letter-spacing: -.01em; display: block; }
.card .stockline { margin-top: 6px; font-size: 17px; font-weight: 600; }
.stockline .left { color: var(--left); }
.stockline .instock { color: var(--ok); }
.stockline .out { color: var(--muted); font-weight: 500; }
.badge.left { background: oklch(0.96 0.04 60); color: var(--left); }
.pdp .pprice { color: var(--price); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 10px; border-radius: 16px; }
  .card .body { padding-top: 10px; }
  .card h3 { font-size: 15px; }
  .card .l2, .card .l3, .card .stockline { font-size: 12.5px; margin-top: 4px; }
  .card .price { font-size: 18px; padding-top: 8px; }
}

/* ---- cases ---- */
.brand-tabs { display: flex; gap: 8px; margin-top: 26px; border-bottom: 1px solid var(--border); }
.brand-tab { border: 0; background: none; padding: 12px 16px; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.brand-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--primary); }
.model-strip { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: thin; }
.model-strip .chip { flex: none; }
a.chip { text-decoration: none; }
.card h3.case-title { font-size: 17px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#grid .card .l2 { font-size: 15px; }
#grid .card .l3 { font-size: 14px; }
@media (max-width: 520px) { .card h3.case-title { font-size: 13.5px; } .brand-tab { font-size: 14px; padding: 10px 10px; } }
.quote-btn { white-space: nowrap; }
@media (max-width: 520px) { #grid .card .l2, #grid .card .l3 { font-size: 12.5px; } .nav { gap: 2px; } .nav a { padding: 8px 8px; } }
