:root {
  --bg: #f5f6f8; --card: #fff; --text: #1c2230; --muted: #6a7282; --line: #e2e5ea;
  --brand: #047f86; --brand-dark: #03656b; --brand-logo: #05b1ba; --ok: #1a8a4a; --warn: #b26a00; --err: #c0392b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.site { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(6px); }
header.site .wrap { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.logo img { height: 26px; width: auto; display: block; }
.logo span { color: var(--brand); }
.tagline { color: var(--muted); font-size: 14px; }
footer.site { padding: 32px 0; font-size: 14px; }
main.wrap, main { padding-top: 24px; padding-bottom: 24px; min-height: 60vh; }
h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 24px 0 12px; }
h3 { font-size: 17px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
a { color: var(--brand); }

.steps { display: flex; gap: 4px; margin: 0 0 24px; padding: 0; list-style: none; flex-wrap: wrap; }
.steps li { flex: 1; min-width: 90px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--muted); border-radius: 6px; }
.steps li.done { color: var(--ok); }
.steps li.active { border-color: var(--brand); color: var(--brand); font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tile { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tile:hover { border-color: #b8c4d8; }
.tile.sel { border-color: var(--brand); background: #e9f7f8; }
.tile .count { display: block; color: var(--muted); font-size: 13px; }

.models { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 12px; }
.models a { display: block; text-decoration: none; }
.models button, .models a { text-align: left; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.models button:hover, .models a:hover { border-color: #b8c4d8; }
.models button.sel { border-color: var(--brand); background: #e9f7f8; font-weight: 600; }
input[type=search], input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid #c9ced8; border-radius: 8px; background: #fff; width: 100%; color: inherit;
}
textarea { min-height: 90px; resize: vertical; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 641px) { .row2.erp-row { grid-template-columns: 2fr 1fr 2fr; } }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

.btn { display: inline-block; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { background: var(--err); border-color: var(--err); }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 12px; }
.summary .line { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 15px; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-weight: 700; font-size: 17px; }

.offer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.offer.sel { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.offer.na { opacity: .7; }
.offer .head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.offer .price { font-weight: 700; white-space: nowrap; }
.offer .config { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #eef1f5; color: var(--muted); }
.tag.warn { background: #fff4e0; color: var(--warn); }
.tag.ok { background: #e5f5ec; color: var(--ok); }

.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-bottom: 8px; cursor: pointer; }
.radio input { margin-top: 4px; }
.radio.sel { border-color: var(--brand); background: #e9f7f8; }
.radio.disabled { opacity: .55; cursor: not-allowed; }

.error { background: #fdecea; color: var(--err); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.notice { background: #fff4e0; color: #6b4300; border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.success { background: #e5f5ec; color: #135c33; border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.testpay { border: 2px dashed var(--warn); }
[hidden] { display: none !important; }
.tiers .radio { margin-bottom: 6px; }
.tiers .tprice { color: var(--brand); font-weight: 600; white-space: nowrap; }
.neg{color:#b42318}

.offers .sup-offer { white-space: nowrap; }
.offers .sup-offer.best { font-weight: 600; }
.offers .sup-offer.na { opacity: .65; }
.ok { color: #067647; }
.nowrap { white-space: nowrap; }
.cp-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.summary .line.disc { color: var(--ok, #1a7f37); }

/* Lisävarusteet korjauksen yhteydessä */
.acc-title { margin-top: 28px; }
.acc-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 8px; }
.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.acc.sel { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.acc img, .acc .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 6px; }
.acc .noimg { background: var(--bg); }
.acc-name { font-size: 13px; line-height: 1.35; flex: 1; }
.acc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* ---------- Tarvikekauppa ---------- */
.shop-head { display: flex; gap: 10px; align-items: center; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.shop-head form { flex: 1; min-width: 200px; max-width: 420px; display: flex; }
.shop-head input[type=search] { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.cartbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 600; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); white-space: nowrap; }
.cartbtn .n { background: var(--brand); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 36px 32px; color: #fff; background: linear-gradient(120deg, #03656b 0%, #047f86 45%, #05b1ba 100%); margin-bottom: 20px; }
.hero h1 { font-size: 32px; line-height: 1.15; margin: 0 0 10px; max-width: 560px; }
.hero p { margin: 0 0 18px; max-width: 520px; opacity: .92; }
.hero .pick { display: flex; gap: 8px; flex-wrap: wrap; max-width: 560px; position: relative; z-index: 1; }
.hero .pick select { flex: 1; min-width: 220px; padding: 11px 12px; border-radius: 8px; border: 0; font: inherit; }
.hero .pick .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.hero svg.deco { position: absolute; right: -20px; bottom: -30px; width: 340px; height: 260px; opacity: .9; }
@media (max-width: 760px) { .hero { padding: 26px 18px; } .hero h1 { font-size: 25px; } .hero svg.deco { opacity: .18; } }
.usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 20px; }
.usp div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.usp svg { flex: none; width: 26px; height: 26px; color: var(--brand); }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat svg { width: 40px; height: 40px; color: var(--brand); }
.cat strong { font-size: 16px; }
.cat span { color: var(--muted); font-size: 13px; }
.sect { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.sect h2 { margin: 0; }
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); position: relative; }
.pcard:hover { border-color: #b8c4d8; }
.pcard img, .pcard .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 6px; }
.pcard .noimg { background: var(--bg); }
.pcard .brand { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pcard .nm { font-size: 14px; line-height: 1.35; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .ft { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pcard .price { font-weight: 700; font-size: 16px; }
.pcard .fit { font-size: 12px; color: var(--muted); }
.pcard .instore { font-size: 12px; color: var(--ok); font-weight: 600; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.brands { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.filters .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input[type=search] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; min-width: 0; }
.filters input[type=search] { flex: 1 1 180px; }
.filters select.model { flex: 1 1 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .c { opacity: .7; margin-left: 4px; }
.chip.clear { border-style: dashed; color: var(--muted); }
.resinfo { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.more { text-align: center; margin: 18px 0; }
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 760px) { .pdetail { grid-template-columns: 1fr; } }
.gallery .main { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery .thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.gallery .thumbs img { width: 60px; height: 60px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.gallery .thumbs img.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pinfo .brand { color: var(--muted); text-transform: uppercase; font-size: 13px; letter-spacing: .03em; }
.pinfo h1 { font-size: 24px; }
.pinfo .price { font-size: 28px; font-weight: 700; margin: 8px 0 4px; }
.pinfo .stock { color: var(--ok); font-size: 14px; font-weight: 600; }
.pinfo .stock.order { color: #b45309; }
.pinfo .buy { display: flex; gap: 8px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.pinfo .buy select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.pinfo ul.facts { list-style: none; padding: 0; margin: 12px 0; font-size: 14px; }
.pinfo ul.facts li { padding: 4px 0 4px 24px; position: relative; }
.pinfo ul.facts li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 700; }
.desc { font-size: 15px; }
.desc h4 { margin: 14px 0 4px; font-size: 16px; }
.attrs { width: 100%; border-collapse: collapse; font-size: 14px; }
.attrs th { text-align: left; color: var(--muted); font-weight: 500; width: 40%; padding: 6px 0; border-bottom: 1px solid var(--line); }
.attrs td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.fitlist { display: flex; flex-wrap: wrap; gap: 6px; }
.fitlist a { font-size: 13px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: #fff; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast a { color: #8fe3e8; margin-left: 8px; }
.hero .pick select { color: var(--text); background: #fff; width: auto; }
.filters select, .pinfo .buy select { width: auto; }
.filters select.model { flex: 2 1 220px; }
.filters select:not(.model) { flex: 0 1 auto; }
@media (max-width: 520px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard .ft { flex-direction: column; align-items: stretch; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .pick { flex-direction: column; }
  .hero .pick select { min-width: 0; width: 100%; }
}

.stockline { margin: 4px 0; color: var(--muted); }
.stockline.ok, .small.ok { color: var(--ok); font-weight: 600; }

/* Sivuston ylävalikko (sama kuin etusivulla) */
.topnav { display: flex; gap: 20px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--brand-dark); }
.topnav a.on { color: var(--brand); border-bottom-color: var(--brand); }
@media (max-width: 760px) { header.site .wrap { gap: 8px 14px; } .topnav { order: 3; width: 100%; gap: 16px; } .topnav a { font-size: 14px; } }
/* Korjaustilauksen laitevalinta */
.hero .devpick { max-width: 820px; }
.hero .devpick select { min-width: 180px; }
.hero .pick .btn:disabled { opacity: .65; cursor: not-allowed; }
header.site .topnav:last-child { margin-left: auto; }
@media (max-width: 760px) { header.site .topnav:last-child { margin-left: 0; } }
@media (max-width: 760px) { .shop-head { flex-wrap: nowrap; flex: 1; min-width: 0; } .shop-head form { min-width: 0; } .shop-head .cartbtn { padding: 8px 10px; } }
