/* =========================================================
   tradeJK — shared stylesheet for every page
   ========================================================= */
:root {
  --orange: #F7931E;
  --orange-600: #E07A06;
  --orange-50: #FFF4E6;
  --ink: #1C1B19;
  --ink-2: #3A3835;
  --muted: #6B6760;
  --line: #E7E2DA;
  --bg: #FAF8F5;
  --card: #FFFFFF;
  --dark: #171614;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(28,27,25,.07);
  --shadow-lg: 0 18px 50px rgba(28,27,25,.16);
  --container: 1180px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
/* phone numbers always stay on one line */
a[href^="tel:"], a[href^="tel:"] span { white-space: nowrap; }
.phone-btn { flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--orange); color: var(--ink); box-shadow: 0 6px 18px rgba(247,147,30,.35); }
.btn-primary:hover { background: #FFA43A; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline[aria-pressed="true"] { background: var(--ink); color: #fff; }
.btn-sm { padding: .55em 1em; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(23,22,20,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  color: #fff;
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; color: #fff; flex: none; }
.brand img { height: 40px; width: auto; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { white-space: nowrap;
  position: relative; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.8);
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a.active { color: var(--orange); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--orange); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent; color: rgba(255,255,255,.75);
  font: inherit; font-size: .78rem; font-weight: 700; padding: 5px 9px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--orange); color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 560px) {
  .phone-btn span { display: none; }
}
@media (max-width: 1180px) {
  .burger { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 12px 16px 24px;
    background: var(--dark); border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .25s ease, opacity .25s, visibility .25s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .main-nav a.active::after { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand img { height: 32px; }
  .header-actions { gap: 6px; }
  .lang button { padding: 5px 7px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: min(88vh, 760px); display: flex; align-items: center;
  background: var(--dark);
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 30%;
  transform: scale(1.08); transition: transform 1.6s ease-out;
}
.hero.ready .hero-bg { transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(23,22,20,.94) 0%, rgba(23,22,20,.78) 45%, rgba(23,22,20,.25) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 80px 20px; max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--orange); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Stats ---------- */
.stats { margin-top: -56px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 2.4rem; font-weight: 800; color: var(--orange-600); line-height: 1.1; }
.stat span { color: var(--muted); font-weight: 600; font-size: .95rem; }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .stat:last-child { border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 640px) { .section { padding: 60px 0; } }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--orange-50); color: var(--orange-600); margin-bottom: 18px;
  transition: background .25s, color .25s;
}
.card:hover .card-icon { background: var(--orange); color: var(--ink); }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.2rem; font-weight: 800; }
.card p { color: var(--muted); flex: 1; }
.card .more { font-weight: 700; color: var(--orange-600); display: inline-flex; align-items: center; gap: 6px; }
.card .more svg { transition: transform .2s; }
.card:hover .more svg { transform: translateX(4px); }

/* ---------- Video ---------- */
.video-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.video-facade {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #000 center/cover no-repeat; box-shadow: var(--shadow-lg); cursor: pointer; border: 0; padding: 0; width: 100%;
}
.video-facade::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); transition: background .2s; }
.video-facade:hover::after { background: rgba(0,0,0,.1); }
.video-facade .play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 84px; height: 84px; border-radius: 50%; background: var(--orange); display: grid; place-items: center;
  box-shadow: 0 0 0 0 rgba(247,147,30,.6); animation: pulse 2s infinite;
}
.video-facade .play svg { width: 34px; height: 34px; margin-left: 5px; color: var(--ink); }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
@keyframes pulse { 70% { box-shadow: 0 0 0 22px rgba(247,147,30,0); } 100% { box-shadow: 0 0 0 0 rgba(247,147,30,0); } }
@media (max-width: 860px) { .video-wrap { grid-template-columns: 1fr; gap: 28px; } }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.vcard { display: flex; flex-direction: column; gap: 10px; }
.vcard .video-facade { box-shadow: var(--shadow); }
.vcard .video-facade .play { width: 60px; height: 60px; }
.vcard .video-facade .play svg { width: 24px; height: 24px; margin-left: 3px; }
.vcard h3 { font-size: 1.05rem; font-weight: 800; margin: 4px 0 0; }
.vcard a { color: var(--orange-600); font-weight: 700; font-size: .9rem; text-decoration: none; }
.vcard a:hover { text-decoration: underline; }
.video-credit { color: var(--muted); font-size: .9rem; margin: 24px 0 0; }
.video-credit a { color: inherit; font-weight: 700; }
@media (max-width: 860px) { .video-grid { grid-template-columns: 1fr; gap: 28px; } }
.mat-table .p.old { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.mat-table td.p:last-child { color: var(--orange-600); font-size: 1.05rem; }
.mat-notes { color: var(--muted); padding-left: 20px; margin: 16px 0 0; }
.mat-notes li { margin-bottom: 4px; }
@media (max-width: 720px) {
  .mat-table tr { grid-template-columns: 1fr auto auto; }
  .mat-table .u { grid-column: 1; grid-row: 2; }
  .mat-table .p.old { grid-column: 2; grid-row: 2; }
  .mat-table td.p:last-child { grid-column: 3; grid-row: 2; }
}

/* ---------- Gallery ---------- */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery.preview { columns: 3 220px; }
.g-item {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; cursor: zoom-in;
  break-inside: avoid; border-radius: 12px; overflow: hidden; position: relative; background: var(--line);
}
.g-item img { width: 100%; height: auto; transition: transform .5s ease, filter .3s; }
.g-item::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(0,0,0,.35));
  opacity: 0; transition: opacity .3s;
}
.g-item:hover img { transform: scale(1.05); }
.g-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(12,12,11,.94);
  display: none; align-items: center; justify-content: center; padding: 60px 70px;
}
.lightbox.open { display: flex; animation: fade .25s ease; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background .2s;
}
.lb-btn:hover { background: var(--orange); color: var(--ink); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-weight: 600; font-size: .9rem; }
@media (max-width: 640px) {
  .lightbox { padding: 60px 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--orange); color: var(--ink); border-radius: 24px; padding: 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin: 0 0 6px; }
.cta-band p { margin: 0; font-weight: 500; }
.cta-band .btn-dark { background: var(--ink); color: #fff; position: relative; }
.cta-band .btn-dark:hover { background: #000; }
@media (max-width: 640px) { .cta-band { padding: 32px 24px; } }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  background: var(--dark) radial-gradient(circle at 85% 20%, rgba(247,147,30,.25), transparent 45%);
  color: #fff; padding: 64px 0 56px;
}
.crumbs { font-size: .9rem; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.crumbs a { color: rgba(255,255,255,.8); text-decoration: none; }
.crumbs a:hover { color: var(--orange); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 640px; margin: 0; }

/* ---------- Split (text + image) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.split .text p { font-size: 1.1rem; color: var(--ink-2); }
.note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--orange-50); border-left: 4px solid var(--orange); border-radius: 10px;
  padding: 16px 18px; margin: 20px 0;
}
.note svg { color: var(--orange-600); margin-top: 3px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.partner {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  text-align: center; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  transition: transform .25s, box-shadow .25s;
}
.partner:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.partner .logo-box { height: 110px; display: grid; place-items: center; width: 100%; }
.partner img { max-height: 110px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .3s, opacity .3s; }
.partner:hover img { filter: none; opacity: 1; }
.partner h3 { font-size: 1.1rem; margin: 0; }
.partner span { color: var(--orange-600); font-weight: 600; font-size: .9rem; }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; }
.info-list { display: grid; gap: 14px; }
.info-item {
  display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px;
}
.info-item .card-icon { margin: 0; width: 46px; height: 46px; flex: none; }
.info-item small { display: block; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.info-item a, .info-item strong { font-weight: 700; font-size: 1.05rem; text-decoration: none; word-break: break-word; }
.info-item a:hover { color: var(--orange-600); }
.copy-btn {
  margin-left: auto; border: 1px solid var(--line); background: var(--bg); border-radius: 8px;
  padding: 6px 10px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; color: var(--ink-2); flex: none;
}
.copy-btn:hover { border-color: var(--orange); }
.copy-btn.done { background: #E8F6EC; border-color: #7CC98F; color: #1E7A37; }
.map { width: 100%; height: 280px; border: 0; border-radius: 14px; margin-top: 14px; background: var(--line); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.5rem; font-weight: 800; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247,147,30,.18); background: #fff; }
.field .err { color: #B42318; font-size: .85rem; font-weight: 600; min-height: 1em; }
.field.invalid input, .field.invalid textarea { border-color: #D92D20; }
.form-hint { color: var(--muted); font-size: .85rem; margin-top: 12px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-card { padding: 24px; } }

/* ---------- Prices ---------- */
.price-tools {
  position: sticky; top: var(--header-h); z-index: 20;
  background: rgba(250,248,245,.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; font: inherit; padding: 13px 16px 13px 46px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
}
.search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247,147,30,.18); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; color: var(--ink-2); white-space: nowrap;
}
.chip:hover { border-color: var(--orange); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.price-meta { color: var(--muted); margin: 24px 0 8px; font-size: .95rem; }
.price-cat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; overflow: hidden; }
.cat-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  background: none; border: 0; font: inherit; cursor: pointer; text-align: left; color: inherit;
}
.cat-head h2 { font-size: 1.2rem; font-weight: 800; margin: 0; flex: 1; }
.cat-head .count { background: var(--orange-50); color: var(--orange-600); font-weight: 800; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.cat-head .chev { transition: transform .25s; color: var(--muted); }
.cat-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.cat-body[hidden] { display: none; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 10px 22px; background: var(--bg); border-top: 1px solid var(--line);
}
.price-table td { padding: 12px 22px; border-top: 1px solid var(--line); vertical-align: middle; }
.price-table tr:hover td { background: #FFFBF5; }
.price-table .u { color: var(--muted); white-space: nowrap; }
.price-table .p { font-weight: 800; white-space: nowrap; text-align: right; }
.price-table th.r { text-align: right; }
.price-table .q input {
  width: 92px; font: inherit; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; text-align: right; background: var(--bg);
}
.price-table .q input:focus { outline: none; border-color: var(--orange); background: #fff; }
.price-table .s { text-align: right; font-weight: 700; color: var(--orange-600); white-space: nowrap; min-width: 90px; }
.price-table tr.has-qty td { background: #FFF8EE; }
mark { background: #FFE2B8; color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; display: none; }
.empty.show { display: block; }
@media (max-width: 720px) {
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
  .price-table td { padding: 0; border: 0; background: none !important; }
  .price-table .w { grid-column: 1 / -1; font-weight: 600; }
  .price-table .u { grid-column: 1; }
  .price-table .p { grid-column: 2; grid-row: 2; }
  .price-table .q { grid-column: 1; }
  .price-table .s { grid-column: 2; align-self: center; }
}
.estimate {
  position: fixed; left: 50%; bottom: 18px; z-index: 90; transform: translate(-50%, 150%);
  width: min(720px, calc(100% - 24px));
  background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 16px 14px 22px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.estimate.show { transform: translate(-50%, 0); }
.estimate .sum { flex: 1; min-width: 180px; }
.estimate small { display: block; color: rgba(255,255,255,.65); font-size: .8rem; }
.estimate b { font-size: 1.4rem; color: var(--orange); }
.estimate .btn-sm { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.estimate .btn-sm:hover { background: #fff; color: var(--ink); }
.estimate .btn-primary { color: var(--ink); background: var(--orange); border-color: var(--orange); }

/* ---------- 3D room model ---------- */
.room-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.stage {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #34312C, #151412 70%);
  perspective: 1100px; cursor: grab; touch-action: none; user-select: none; box-shadow: var(--shadow-lg);
}
.stage:active { cursor: grabbing; }
.stage-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .85rem; font-weight: 600; background: rgba(0,0,0,.35);
  padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; transition: opacity .4s;
}
.room {
  --w: 320px; --d: 260px; --h: 190px;
  --wall: #EDE6DA; --floor: #B98A5E; --accent: #F7931E;
  position: absolute; left: 50%; top: 52%; width: 0; height: 0;
  transform-style: preserve-3d;
  transition: transform .08s linear;
}
.room > div, .room .obj > div { position: absolute; transform-style: preserve-3d; backface-visibility: hidden; }
.floor {
  width: var(--w); height: var(--d); left: calc(var(--w) / -2); top: calc(var(--d) / -2);
  background-color: var(--floor);
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.09) 0 2px, transparent 2px 40px), linear-gradient(rgba(255,255,255,.06), rgba(0,0,0,.12));
  transform: rotateX(90deg); transition: background-color .4s;
}
.floor.tiles { background-image: linear-gradient(rgba(0,0,0,.12) 2px, transparent 2px), linear-gradient(90deg, rgba(0,0,0,.12) 2px, transparent 2px); background-size: 40px 40px; }
.wall { background: var(--wall); transition: background-color .4s; box-shadow: inset 0 0 60px rgba(0,0,0,.12); }
.wall-back { width: var(--w); height: var(--h); left: calc(var(--w) / -2); top: calc(var(--h) * -1); transform: translateZ(calc(var(--d) / -2)); }
.wall-left { width: var(--d); height: var(--h); left: calc(var(--d) / -2); top: calc(var(--h) * -1); transform: translateX(calc(var(--w) / -2)) rotateY(90deg); filter: brightness(.92); }
.wall-right { width: var(--d); height: var(--h); left: calc(var(--d) / -2); top: calc(var(--h) * -1); transform: translateX(calc(var(--w) / 2)) rotateY(-90deg); filter: brightness(.86); }
.window {
  position: absolute; left: 34%; top: 18%; width: 32%; height: 42%;
  background: linear-gradient(160deg, #BFE2FF, #7FB6E8); border: 6px solid #fff; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08);
}
.window::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #fff; }
.door { position: absolute; left: 14%; bottom: 0; width: 26%; height: 72%; background: #8A6440; border: 4px solid #F5F1EA; border-bottom: 0; }
.door::after { content: ""; position: absolute; right: 10%; top: 52%; width: 8px; height: 8px; border-radius: 50%; background: #E9C46A; }
.picture { position: absolute; left: 55%; top: 22%; width: 26%; height: 30%; background: linear-gradient(135deg, var(--accent), #F25C3B); border: 5px solid #2B2926; }
/* cuboid helper: .obj with 6 faces */
.obj { position: absolute; transform-style: preserve-3d; }
.obj > div { background: var(--c); }
.obj .top { filter: brightness(1.12); }
.obj .side { filter: brightness(.85); }
.obj .front { filter: brightness(.95); }
.room-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.room-panel h3 { font-size: 1rem; margin: 18px 0 10px; }
.room-panel h3:first-child { margin-top: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line);
  cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s;
}
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--orange); }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .85rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.room-panel .row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.area-box { margin-top: 20px; padding: 14px 16px; background: var(--orange-50); border-radius: 12px; font-size: .95rem; }
.area-box b { color: var(--orange-600); }
@media (max-width: 900px) { .room-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .room { --w: 230px; --d: 190px; --h: 140px; } }

/* ---------- Room planner (three.js) ---------- */
.planner {
  display: grid; grid-template-columns: 340px 1fr; height: min(82vh, 820px); min-height: 560px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.planner.is-full { height: 100vh; border-radius: 0; }
.pl-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: #fff; }
.pl-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); flex: none; }
.pl-tab {
  border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 700; padding: 14px 4px; cursor: pointer;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.pl-tab:hover { color: var(--ink); }
.pl-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.pl-pane { padding: 18px; overflow-y: auto; flex: 1; min-height: 0; }
.pl-pane[hidden] { display: none; }
.pl-pane h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; }
.pl-pane h3:first-child { margin-top: 0; }
.pl-pane p.small { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }
.pl-dim { display: grid; grid-template-columns: 74px 1fr 74px; gap: 10px; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: .9rem; }
.pl-dim input[type=range] { accent-color: var(--orange); width: 100%; }
.pl-dim input[type=number], .pl-sel input[type=number] {
  width: 100%; font: inherit; font-size: .9rem; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg); text-align: right;
}
.pl-dim input:focus, .pl-sel input:focus { outline: none; border-color: var(--orange); }
.pl-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-tpls button, .pl-btn {
  border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px; font: inherit; font-size: .88rem; font-weight: 700;
  cursor: pointer; color: var(--ink); text-align: left; transition: border-color .2s, background .2s;
}
.pl-tpls button:hover, .pl-btn:hover { border-color: var(--orange); background: var(--orange-50); }
.pl-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 8px; }
.pl-btn.primary { background: var(--orange); border-color: var(--orange); justify-content: center; }
.pl-btn.primary:hover { background: #FFA43A; }
.pl-stats { display: grid; gap: 6px; }
.pl-stats div { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 7px 10px; background: var(--bg); border-radius: 8px; }
.pl-stats b { white-space: nowrap; }
.pl-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pl-seg button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.pl-seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-mats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pl-mat { border: 2px solid transparent; background: var(--bg); border-radius: 10px; padding: 4px 4px 6px; cursor: pointer; font: inherit; text-align: center; }
.pl-mat:hover { border-color: var(--line); }
.pl-mat[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-50); }
.pl-mat-img { display: block; aspect-ratio: 1; border-radius: 7px; background-size: cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.pl-mat-name { display: block; font-size: .72rem; font-weight: 700; line-height: 1.2; margin-top: 5px; color: var(--ink-2); }
.pl-colorrow { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: .88rem; font-weight: 600; }
.pl-colorrow input[type=color], .pl-color input { width: 42px; height: 32px; border: 1.5px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.pl-pal, .pl-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.pl-sw:hover { transform: scale(1.12); }
#plFurnCats { margin-bottom: 12px; flex-wrap: wrap; overflow: visible; }
#plFurnCats .chip { padding: 5px 11px; font-size: .78rem; }
.pl-furn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-furn {
  display: flex; align-items: center; gap: 8px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px; font: inherit; cursor: pointer; transition: border-color .2s, transform .15s, box-shadow .2s;
}
.pl-furn:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.pl-furn b { display: block; font-size: .8rem; line-height: 1.2; }
.pl-furn small { color: var(--muted); font-size: .72rem; }
.pl-furn-ic { font-size: 1.35rem; width: 32px; height: 32px; display: grid; place-items: center; background: var(--orange-50); border-radius: 8px; flex: none; }
.pl-qty { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.pl-qty li { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; padding: 6px 10px; background: var(--bg); border-radius: 8px; }
.pl-qty li b { white-space: nowrap; color: var(--orange-600); }
.pl-qty li.muted { color: var(--muted); }

.pl-view { position: relative; min-width: 0; min-height: 0; background: #E8E4DC; overflow: hidden; }
.pl-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.pl-canvas:active { cursor: grabbing; }
.pl-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; padding: 20px; text-align: center; }
.pl-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.pl-toolbar button {
  pointer-events: auto; border: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); color: var(--ink);
}
.pl-toolbar button:hover { background: #fff; color: var(--orange-600); }
.pl-toolbar button:disabled { opacity: .45; cursor: default; color: var(--ink); }
.pl-toolbar .sp { flex: 1; }
.pl-hint {
  position: absolute; left: 12px; bottom: 12px; right: 12px; font-size: .75rem; color: var(--ink-2); pointer-events: none;
  background: rgba(255,255,255,.75); padding: 6px 10px; border-radius: 8px; width: fit-content; max-width: calc(100% - 24px);
}
.pl-sel {
  position: absolute; top: 60px; right: 12px; width: 300px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 14px; font-size: .85rem; animation: fade .2s ease;
}
.pl-sel[hidden] { display: none; }
.pl-sel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-sel-head strong { flex: 1; font-size: 1rem; }
.pl-x { border: 0; background: var(--bg); width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.pl-sel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pl-sel .pl-swatches { margin: 0; gap: 5px; }
.pl-sel .pl-sw { width: 20px; height: 20px; }
.pl-color { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pl-sel-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; align-items: end; margin-bottom: 10px; }
.pl-sel-dims label span { display: block; font-size: .7rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.pl-unit { font-size: .75rem; color: var(--muted); padding-bottom: 8px; }
.pl-sel-btns button {
  border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.pl-sel-btns button:hover { border-color: var(--orange); }
.pl-sel-btns .danger:hover { border-color: #D92D20; color: #B42318; }
.pl-toast {
  position: absolute; left: 50%; top: 60px; transform: translate(-50%, -10px); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.pl-toast.show { opacity: 1; transform: translate(-50%, 0); }
.open-planner { margin-top: 14px; width: 100%; }
.pl-check { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; font-weight: 600; margin: 0 0 10px; cursor: pointer; }
.pl-check input { accent-color: var(--orange); width: 16px; height: 16px; margin-top: 2px; flex: none; }
.pl-qty li.pl-qty-total { background: var(--orange-50); font-weight: 800; }
.pl-modal { position: fixed; inset: 0; z-index: 500; background: rgba(12,12,11,.6); display: grid; place-items: center; padding: 20px; }
.pl-est tr.grp td { background: var(--orange-50); font-weight: 800; font-size: .8rem; padding-top: 9px; }
.pl-qty li small { color: var(--muted); font-weight: 600; }
.pl-modal[hidden] { display: none; }
.pl-modal-box { background: #fff; border-radius: 18px; width: min(860px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.pl-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.pl-modal-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.pl-modal-body { padding: 18px 22px; overflow-y: auto; }
.pl-modal-body h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.pl-modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
.pl-est-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pl-est-sum div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.pl-est-sum span { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; }
.pl-est-sum b { font-size: 1.05rem; }
.pl-est-wrap { overflow-x: auto; }
.pl-est { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pl-est th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pl-est td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.pl-est .r { text-align: right; white-space: nowrap; }
.pl-est-total { margin-top: 18px; display: grid; gap: 6px; max-width: 420px; margin-left: auto; }
.pl-est-total div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; }
.pl-est-total .grand { background: var(--ink); color: #fff; border-radius: 10px; font-size: 1.15rem; padding: 12px 14px; }
.pl-est-total .grand b { color: var(--orange); }
.pl-est-total .gross { border-top: 2px solid var(--line); font-weight: 800; font-size: 1.05rem; padding-top: 10px; }
.pl-est-note { color: var(--muted); font-size: .8rem; margin: 14px 0 0; }
@media (max-width: 640px) { .pl-est-sum { grid-template-columns: 1fr 1fr; } .pl-modal { padding: 8px; } }
@media print {
  body.print-estimate * { visibility: hidden !important; }
  body.print-estimate .pl-modal, body.print-estimate .pl-modal * { visibility: visible !important; }
  body.print-estimate .pl-modal { position: absolute; inset: 0 auto auto 0; width: 100%; background: none; display: block; padding: 0; }
  body.print-estimate .pl-modal-box { box-shadow: none; max-height: none; width: 100%; }
  body.print-estimate .pl-modal-foot, body.print-estimate .pl-x { display: none !important; }
}
@media (max-width: 900px) {
  .planner { grid-template-columns: 1fr; grid-template-rows: 62vh auto; height: auto; min-height: 0; }
  .planner.is-full { grid-template-rows: 60vh 1fr; height: 100vh; }
  .pl-view { grid-row: 1; }
  .pl-side { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); max-height: 70vh; }
  .pl-sel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-height: 55%; overflow-y: auto; }
  .pl-hint { display: none; }
}
@media (max-width: 420px) { .pl-mats { grid-template-columns: repeat(2, 1fr); } .pl-furn-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 56px 0 28px; margin-top: 88px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--orange); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .9rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--orange); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
body.has-estimate .to-top { bottom: 100px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(var(--header-h) + 14px); transform: translate(-50%, -20px); z-index: 400;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .price-tools, .estimate, .to-top, .page-hero { display: none !important; }
  .cat-body[hidden] { display: block !important; }
  .price-cat { break-inside: avoid; border: 0; }
}
