/* Däckverkstan draft site styles. Base from the one-page draft, plus catalogue, basket and forms. */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1c1a17;
  --muted: #5a554d;
  --line: #d9d3c9;
  --accent: #0f4c81;
  --accent-ink: #ffffff;
  --accent-2: #b8471e;
  --soft: #ece6dc;
  --placeholder: #e4ddd0;
  --placeholder-ink: #6b6459;
  --focus: #e39b1b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15161a;
    --surface: #1e2026;
    --ink: #f1ede6;
    --muted: #b4ada2;
    --line: #35373f;
    --accent: #7fb3e6;
    --accent-ink: #0e1a26;
    --accent-2: #f08a5d;
    --soft: #262930;
    --placeholder: #2b2e36;
    --placeholder-ink: #a8a195;
    --focus: #f2b94f;
  }
}
:root[data-theme="dark"] {
  --bg: #15161a;
  --surface: #1e2026;
  --ink: #f1ede6;
  --muted: #b4ada2;
  --line: #35373f;
  --accent: #7fb3e6;
  --accent-ink: #0e1a26;
  --accent-2: #f08a5d;
  --soft: #262930;
  --placeholder: #2b2e36;
  --placeholder-ink: #a8a195;
  --focus: #f2b94f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Draft ribbon: removed before any publication */
.draft {
  background: var(--accent-2);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 6px 16px;
}

header.top {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand { font-weight: 700; letter-spacing: 0.01em; text-decoration: none; color: var(--ink); }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
nav a { margin-left: 14px; font-size: 15px; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) { nav { display: none; } }

.hero { padding-top: 40px; padding-bottom: 28px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.01em; }
.hero h1 span { display: block; color: var(--accent); }
.hero p.lead { font-size: clamp(18px, 2.2vw, 21px); margin: 0 0 22px; max-width: 42em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-radius: 10px;
  font-weight: 600; text-decoration: none; font-size: 17px;
  border: 2px solid var(--accent); color: var(--accent); background: var(--surface);
  min-height: 48px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn svg { width: 20px; height: 20px; }
.hours-line { color: var(--muted); margin: 0; }

/* Janne's notice from data/site.json: one line under the header on every page */
.notice { background: var(--focus); color: #1c1a17; font-weight: 600; padding: 10px 0; }
.notice .wrap { white-space: pre-line; overflow-wrap: anywhere; }
.hours-week { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
.hours-week dt { font-weight: 600; text-transform: capitalize; }
.hours-week dd { margin: 0; }
.hours-week .is-today { color: var(--accent); }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 820px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } }

.photo {
  background: var(--placeholder);
  color: var(--placeholder-ink);
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 16px; font-size: 15px; min-height: 180px;
}
.photo.tall { min-height: 260px; }

section { padding: 36px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(24px, 3vw, 30px); margin: 0 0 16px; }
section p { max-width: 42em; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
address { font-style: normal; }
.map {
  background: var(--placeholder); color: var(--placeholder-ink);
  border: 1px dashed var(--line); border-radius: 12px;
  min-height: 240px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
}

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; color: var(--muted); font-weight: 600; background: var(--soft); }
tr:last-child td { border-bottom: 0; }
td.price { font-weight: 600; }
.ph { color: var(--placeholder-ink); background: var(--placeholder); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.note { font-size: 15px; color: var(--muted); }
@media (max-width: 640px) {
  th, td { padding: 10px 10px; }
  body { font-size: 16px; }
  /* Services table stacks into cards on phones */
  table.services thead { display: none; }
  table.services tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  table.services tr:last-child { border-bottom: 0; }
  table.services td { display: block; border: 0; padding: 2px 0; }
  table.services td.what { color: var(--muted); font-size: 15px; }
  table.services td.price::before { content: "Pris: "; font-weight: 400; color: var(--muted); }
}

ul.plain { padding-left: 20px; margin: 0 0 12px; }
ul.plain li { margin-bottom: 6px; }

.callout { background: var(--soft); border-left: 4px solid var(--accent); padding: 14px 16px; border-radius: 8px; margin: 16px 0; }

.en { background: var(--surface); }
.en h2 small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--muted); }
footer .cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { footer .cols { grid-template-columns: 1fr 1fr 1fr; } }
footer strong { color: var(--ink); }
.eyebrow { font-weight: 700; letter-spacing: .02em; color: var(--muted); margin: 0 0 8px; font-size: 15px; }
.status { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: 6px; margin-right: 8px; font-size: 15px; }
a[href^="tel:"] { white-space: nowrap; }

/* ---------- header: nav, languages, basket ---------- */
.top .wrap { gap: 10px 16px; }
.top-tools { display: flex; align-items: center; gap: 8px; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.langs button { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 10px; min-height: 40px; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cart-btn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 8px; padding: 6px 12px; min-height: 40px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cart-btn .count { background: var(--accent-2); color: #fff; border-radius: 999px; font-size: 13px; padding: 0 7px; line-height: 20px; }
.cart-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  nav { display: flex; order: 3; width: 100%; overflow-x: auto; gap: 4px; }
  nav a { margin-left: 0; margin-right: 14px; white-space: nowrap; padding: 6px 0; }
}

/* ---------- page head ---------- */
.page-head { padding-top: 32px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 4.5vw, 40px); margin: 0 0 8px; }
.page-head p { max-width: 42em; margin: 0 0 8px; }

/* ---------- cards and grids ---------- */
.grid3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.svc-card .price-line { margin: 8px 0 0; }
.muted { color: var(--muted); }
.brand-name { font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.card h3 .brand-name { display: block; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
select, input, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; max-width: 100%; }
textarea { width: 100%; min-height: 0; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 6px; padding: 2px 8px; background: var(--soft); color: var(--muted); }
.badge.demo { background: var(--accent-2); color: #fff; }
.badge.season-winter_studded, .badge.season-winter_nordic { background: var(--accent); color: var(--accent-ink); }
.tyre-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tyre .size { font-weight: 600; margin: 0 0 8px; }
.eu { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chip { font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: var(--surface); }
.chip.cls-A, .chip.cls-B { border-color: #2e7d32; }
.chip.cls-C, .chip.cls-D { border-color: #c9a227; }
.chip.cls-E { border-color: #c62828; }
.label-note { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.price-line { margin: 4px 0 0; }
.price-line strong { font-size: 20px; }
.btn.ok { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.btn.wide { width: 100%; justify-content: center; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- tyre search form ---------- */
.search { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.search label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.search fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.search legend { font-size: 14px; color: var(--muted); margin-bottom: 4px; width: 100%; }
.search .pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); font-size: 15px; color: var(--ink); }
.search .pill input { min-height: 0; }
.list-head { font-weight: 600; margin: 20px 0 10px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 15px; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.form label.check input { min-height: 0; width: 20px; height: 20px; }
.form input, .form select { width: 100%; }
.error { color: var(--accent-2); font-weight: 600; margin: 0; }
.result { margin-top: 16px; }
.result textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

/* ---------- order drawer ---------- */
.drawer { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { background: var(--bg); width: min(460px, 100%); height: 100%; overflow-y: auto; padding: 16px; box-shadow: -4px 0 24px rgba(0,0,0,.25); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-head h2 { margin: 0; font-size: 22px; }
.icon-btn { font-size: 28px; line-height: 1; border: 0; background: transparent; color: var(--ink); width: 44px; height: 44px; cursor: pointer; }
.basket { list-style: none; padding: 0; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.basket li { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.basket li:last-child { border-bottom: 0; }
.basket .qty { font-weight: 700; white-space: nowrap; }
.basket .name { flex: 1; }
.basket .empty { color: var(--muted); }
.link-btn { border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; padding: 4px; }
body.locked { overflow: hidden; }

/* ---------- used tyres (begagnat) ---------- */
.used-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.used-photos .photo { min-height: 72px; padding: 6px; font-size: 12px; border-radius: 8px; }
.used-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.used .facts { list-style: none; padding: 0; margin: 0 0 8px; font-size: 15px; }
.used .facts li { margin-bottom: 4px; }
.badge.status-for_sale { background: #2e7d32; color: #fff; }
.badge.status-reserved { background: var(--focus); color: #1c1a17; }
.badge.status-sold { background: var(--muted); color: var(--surface); }
.used-reserved { opacity: .85; }
.icon-link svg { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- shop ---------- */
.shop-group { border-top: 0; padding-top: 8px; }
.shop-group h2 small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }

/* ---------- v1.1: lighter first screen, compact lists, tyre drawings ---------- */
.hero .hours-line { margin: 0 0 8px; color: var(--ink); }
.near { margin: 0 0 16px; }
.near a { text-decoration: none; font-weight: 600; }
.hero .lead { font-size: 17px; color: var(--muted); margin: 0 0 8px; }
.svc-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 0; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.svc-list li { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 16px; }
.svc-list li:last-child { border-bottom: 0; }
.svc-list .muted { font-size: 15px; }
@media (min-width: 760px) { .svc-list { grid-template-columns: 1fr 1fr; } .svc-list li:nth-last-child(2):nth-child(odd) { border-bottom: 0; } .svc-list li:nth-child(odd) { border-right: 1px solid var(--line); } }
.product-list { list-style: none; padding: 0; margin: 0 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.product-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.product-row:last-child { border-bottom: 0; }
.product-text { flex: 1 1 220px; }
.product-row .brand-name { display: inline; font-size: 12px; }
.product-actions { display: flex; align-items: center; gap: 8px; }
.product-actions .btn { padding: 8px 14px; min-height: 40px; font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tyre-art { margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.tyre-art-img { width: 150px; height: 90px; flex: none; }
.tyre-art-img svg, .photo.art svg { width: 100%; height: 100%; display: block; }
.tyre-art figcaption { font-size: 12px; color: var(--muted); }
.tyre-art-photo { width: 150px; height: 110px; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.product-photo { width: 64px; height: 64px; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.photo.art { padding: 6px; background: var(--soft); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }
.draft { font-size: 13px; padding: 4px 16px; }
@media (max-width: 640px) { .brand small { display: none; } .top .wrap { min-height: 0; } }

[hidden] { display: none !important; }

/* ---------- v1.2: photos, map, example prices ---------- */
.pic { margin: 0; }
.pic img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 3 / 2; object-fit: cover; }
.pic figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.map-frame iframe { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 12px; display: block; }
.svc-price { font-weight: 600; white-space: nowrap; }

/* ---------- booking: free times from slots.json (radio buttons, no own calendar) ---------- */
.slots { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 0; min-width: 0; }
.slots legend { font-size: 15px; color: var(--muted); padding: 0 4px; }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.form label.slot-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 44px; background: var(--surface); color: var(--ink); font-size: 15px; cursor: pointer; }
.form label.slot-pill input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.form label.slot-pill:has(input:checked) { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.form label.slot-pill:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.form .link-btn { justify-self: start; text-align: left; padding: 4px 0; }

/* Tyre size check (dack.html, boka.html) */
.wheelcheck { margin-bottom: 12px; }
.wheelcheck .btn { justify-self: start; }
.wheel-parts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.wheel-parts div { display: grid; gap: 2px; }
.wheel-parts dt { font-size: 13px; color: var(--muted); }
.wheel-parts dd { margin: 0; font-weight: 600; color: var(--ink); }
[data-wheel-out]:empty { display: none; }
[data-wheel-out] p { margin: 6px 0 0; }
