/* ==========================================================================
   Balaji Steels — Industrial Dark theme
   Single stylesheet for the public site + admin panel.
   Colours live in :root — change them once here and the whole site follows.
   ========================================================================== */

:root {
  /* Brand */
  --accent: #ff6b1a;
  --accent-hi: #ff8a3d;
  --accent-lo: #e05500;
  --accent-soft: rgba(255, 107, 26, .12);
  --accent-line: rgba(255, 107, 26, .32);
  --accent-ink: #ff7c33;            /* accent used as TEXT — needs contrast */
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  /* Surfaces */
  --bg: #0b0d10;
  --bg-2: #101318;
  --surface: #14181e;
  --surface-2: #191e25;
  --surface-3: #1f252d;
  --line: #262c35;
  --line-soft: #1c2129;
  --bg-deep: #080a0d;
  --scrim: rgba(8, 10, 13, .78);
  --ghost-bg: rgba(255, 255, 255, .025);
  --hover-bg: rgba(255, 255, 255, .05);
  --hover-bg-soft: rgba(255, 255, 255, .022);
  --grid-line: rgba(255, 255, 255, .028);
  --header-bg: rgba(11, 13, 16, .82);
  --header-bg-solid: rgba(11, 13, 16, .96);
  --hero-base: linear-gradient(180deg, #0e1116 0%, var(--bg) 100%);
  --hero-g1: rgba(255, 107, 26, .16);
  --hero-g2: rgba(70, 110, 160, .13);
  --cta-bg: linear-gradient(135deg, #1a1e25, #101317);
  --map-filter: grayscale(.5) invert(.92) hue-rotate(180deg) contrast(.92);
  --on-accent: #fff;

  /* Type */
  --text: #eef1f5;
  --text-2: #b6bfca;
  --muted: #8b96a3;
  --dim: #667382;

  /* Shape */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, .35);
  --ring: 0 0 0 3px rgba(255, 107, 26, .28);

  --maxw: 1240px;
  --nav-h: 74px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Condensed", "Oswald", "Inter", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: 88px 0; }
.section--tight { padding: 60px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.center { text-align: center; }
.hide { display: none !important; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

.h-xl { font-size: clamp(2.3rem, 5.4vw, 4.1rem); letter-spacing: -.035em; }
.h-lg { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
.h-md { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.lead { font-size: clamp(1rem, 1.5vw, 1.14rem); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.section-head { max-width: 700px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 650; font-size: .94rem; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: linear-gradient(135deg, var(--accent-hi), var(--accent-lo)); color: #fff; box-shadow: 0 8px 24px rgba(255, 107, 26, .28); }
.btn--primary:hover { box-shadow: 0 12px 30px rgba(255, 107, 26, .4); }
.btn--ghost { border-color: var(--line); background: var(--ghost-bg); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.btn--wa { background: var(--whatsapp); color: #06281a; font-weight: 700; box-shadow: 0 8px 24px rgba(37, 211, 102, .22); }
.btn--wa:hover { background: #2ee878; box-shadow: 0 12px 30px rgba(37, 211, 102, .32); }
.btn--sm { padding: 9px 16px; font-size: .82rem; }
.btn--block { width: 100%; }
.btn--dark { background: var(--surface-3); border-color: var(--line); }
.btn--danger { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .4); color: #ff9a9a; }
.btn--danger:hover { background: rgba(239, 68, 68, .24); }

/* ---------- Top strip ---------- */
.topbar {
  background: var(--bg-deep); border-bottom: 1px solid var(--line-soft);
  font-size: .8rem; color: var(--muted);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 40px; }
.topbar__list { display: flex; align-items: center; gap: 22px; }
.topbar__list a { display: inline-flex; align-items: center; gap: 7px; transition: color .18s; }
.topbar__list a:hover { color: var(--accent-ink); }
.topbar__badge { color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--whatsapp); box-shadow: 0 0 0 3px rgba(37, 211, 102, .18); }
@media (max-width: 860px) { .topbar__badge { display: none; } .topbar__list { gap: 14px; } }
@media (max-width: 520px) { .topbar { display: none; } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
}
.header.is-scrolled { background: var(--header-bg-solid); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand > span { display: block; }
.brand__name { display: block; font-family: var(--font-head); font-size: 1.36rem; font-weight: 700; letter-spacing: .01em; line-height: 1.05; text-transform: uppercase; }
.brand__sub { display: block; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-top: 2px; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 9px 15px; border-radius: 999px; font-size: .92rem; font-weight: 550; color: var(--text-2);
  transition: color .18s, background .18s;
}
.nav__links a:hover { color: var(--text); background: var(--hover-bg); }
.nav__links a.is-active { color: var(--accent-ink); background: var(--accent-soft); }
.nav__cta { display: flex; align-items: center; gap: 10px; }

.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); align-items: center; justify-content: center; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: .2s; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { top: 0; transform: rotate(45deg); }
.burger.is-open span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 980px) {
  .burger { display: flex; }
  .nav__cta .btn--ghost { display: none; }
  .nav__links {
    position: fixed; inset: calc(var(--nav-h) + 0px) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 14px 22px 24px; transform: translateY(-130%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow); max-height: calc(100vh - var(--nav-h)); overflow: auto;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 14px 16px; border-radius: var(--r-sm); font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 78% 8%, var(--hero-g1), transparent 62%),
    radial-gradient(700px 500px at 8% 90%, var(--hero-g2), transparent 60%),
    var(--hero-base);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
}
.hero__in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .hl { color: var(--accent-ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--ghost-bg); font-size: .8rem; color: var(--text-2);
}
.chip svg { width: 14px; height: 14px; color: var(--accent-ink); }

.hero__art { position: relative; }
.hero__card {
  border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
}
.hero__card img { width: 100%; height: auto; }
.hero__float {
  position: absolute; left: -18px; bottom: -22px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 20px; box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.hero__float b { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--accent-ink); line-height: 1; }
.hero__float span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 980px) {
  .hero__in { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { max-width: 520px; }
  .hero__card { transform: none; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border-block: 1px solid var(--line-soft); }
.stats__item { background: var(--bg); padding: 34px 24px; text-align: center; }
.stats__item b { display: block; font-family: var(--font-head); font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1; color: var(--text); }
.stats__item span { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 1.12rem; margin-bottom: 8px; }
.card__text { color: var(--muted); font-size: .9rem; margin-bottom: 16px; flex: 1; }
.card__link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-weight: 600; font-size: .88rem; }
.card__link svg { width: 15px; height: 15px; transition: transform .2s; }
.card:hover .card__link svg { transform: translateX(4px); }
.card__count {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--scrim); border: 1px solid var(--line); backdrop-filter: blur(6px);
  padding: 5px 11px; border-radius: 999px; font-size: .72rem; color: var(--text-2);
}

/* USP */
.usp { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: .22s; }
.usp:hover { border-color: var(--accent-line); background: var(--surface-2); }
.usp__ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink);
}
.usp__ico svg { width: 22px; height: 22px; }
.usp h3 { font-size: 1.05rem; margin-bottom: 8px; }
.usp p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Product listing ---------- */
.page-head { position: relative; padding: 62px 0 46px; background: var(--hero-base); border-bottom: 1px solid var(--line-soft); }
.crumbs { font-size: .82rem; color: var(--dim); margin-bottom: 14px; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span { margin-inline: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.search {
  position: relative; flex: 1 1 280px; max-width: 420px;
}
.search input {
  width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .92rem;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--dim); }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter {
  padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: .86rem; color: var(--text-2); transition: .18s; font-weight: 550;
}
.filter:hover { border-color: var(--accent-line); color: var(--text); }
.filter.is-active { background: var(--accent); border-color: var(--accent-ink); color: #fff; }
.filter span { opacity: .65; margin-left: 6px; font-size: .78em; }

.cat-block { margin-bottom: 58px; scroll-margin-top: 100px; }
.cat-block__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.cat-block__head h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin: 0 0 6px; }
.cat-block__head p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 64ch; }
.cat-block__n { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }

.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.product:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.product__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; cursor: pointer; }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product:hover .product__media img { transform: scale(1.06); }
.product__tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: var(--scrim); backdrop-filter: blur(6px); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; font-size: .68rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-2); font-weight: 600;
}
.tag--accent { background: var(--accent); border-color: var(--accent-ink); color: #fff; }
.product__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product__name { font-size: 1.05rem; margin-bottom: 4px; }
.product__short { color: var(--accent-ink); font-size: .8rem; font-weight: 600; margin-bottom: 12px; letter-spacing: .01em; }
.product__meta { display: grid; gap: 6px; margin-bottom: 16px; font-size: .82rem; }
.product__meta div { display: flex; gap: 10px; color: var(--muted); }
.product__meta dt { color: var(--dim); min-width: 68px; flex: none; }
.product__meta dd { margin: 0; color: var(--text-2); }
.product__foot { margin-top: auto; display: flex; gap: 9px; }
.product__foot .btn { flex: 1; }

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); }

/* ---------- Product detail modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal__bg { position: absolute; inset: 0; background: rgba(5, 7, 9, .78); backdrop-filter: blur(5px); animation: fade .22s ease; }
.modal__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%);
  background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto;
  animation: slideIn .3s cubic-bezier(.4, 0, .2, 1);
}
.modal--center .modal__panel {
  position: relative; margin: 5vh auto; inset: auto; width: min(760px, 94%); max-height: 90vh;
  border: 1px solid var(--line); border-radius: var(--r-lg); animation: pop .24s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
  background: var(--scrim); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text);
}
.modal__close:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.modal__media { aspect-ratio: 16 / 9; background: var(--surface-2); }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 28px; }
.modal__body h2 { font-size: 1.6rem; margin-bottom: 6px; }

.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0 24px; font-size: .88rem; }
.spec-table th, .spec-table td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { background: var(--surface); color: var(--muted); font-weight: 600; width: 38%; }
.spec-table td { background: var(--surface-2); color: var(--text-2); }

.quote-box {
  background: linear-gradient(135deg, rgba(37, 211, 102, .1), rgba(37, 211, 102, .03));
  border: 1px solid rgba(37, 211, 102, .28); border-radius: var(--r); padding: 20px; margin-top: 8px;
}
.quote-box p { font-size: .86rem; color: var(--text-2); margin-bottom: 14px; }
.quote-box .btn { width: 100%; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field label .req { color: var(--accent-ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .92rem;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field select option { background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: .78rem; color: var(--dim); margin-top: 12px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; }

.info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.info-item:last-child { border-bottom: none; }
.info-item__ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); }
.info-item__ico svg { width: 20px; height: 20px; }
.info-item h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.info-item p, .info-item a { margin: 0; font-size: .96rem; color: var(--text); }
.info-item a:hover { color: var(--accent-ink); }

.map { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; filter: var(--map-filter); }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(38px, 6vw, 66px);
  background: var(--cta-bg); border: 1px solid var(--line);
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 85% 20%, rgba(255, 107, 26, .18), transparent 60%);
}
.cta__in { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta h2 { margin-bottom: 8px; }
.cta p { margin: 0; color: var(--text-2); max-width: 52ch; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-deep); border-top: 1px solid var(--line-soft); padding: 64px 0 0; margin-top: 20px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 46px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--text-2); font-size: .9rem; transition: color .18s; }
.footer a:hover { color: var(--accent-ink); }
.footer__about p { color: var(--muted); font-size: .9rem; max-width: 40ch; }
.footer__bar { border-top: 1px solid var(--line-soft); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .8rem; color: var(--dim); }
.footer__bar a { color: var(--dim); }

/* ---------- Floating WhatsApp ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp);
  display: grid; place-items: center; color: #06281a;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .38); transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 30px; height: 30px; }
.fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--whatsapp); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-body { background: var(--bg-2); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); }
.login-card img { width: 52px; height: 52px; margin-bottom: 20px; border-radius: 14px; }

.admin { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; }
.aside { background: var(--bg-deep); border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.aside__brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.aside__brand img { width: 36px; height: 36px; border-radius: 10px; }
.aside__brand b { font-family: var(--font-head); font-size: 1.1rem; text-transform: uppercase; display: block; line-height: 1.1; }
.aside__brand span { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.aside__nav { display: grid; gap: 3px; }
.aside__nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: var(--r-sm); color: var(--text-2); font-size: .92rem; font-weight: 550;
  transition: background .16s, color .16s;
}
.aside__nav button:hover { background: var(--hover-bg); color: var(--text); }
.aside__nav button.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.aside__nav svg { width: 18px; height: 18px; flex: none; }
.aside__foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }

.main { padding: 26px 30px 60px; max-width: 1200px; }
.main__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.main__head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.main__head p { margin: 0; color: var(--muted); font-size: .88rem; }

.banner {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 24px; font-size: .88rem; color: var(--text-2);
}
.banner svg { width: 19px; height: 19px; color: var(--accent-ink); flex: none; margin-top: 2px; }
.banner b { color: var(--text); }
.banner--warn { background: rgba(234, 179, 8, .1); border-color: rgba(234, 179, 8, .32); }
.banner--warn svg { color: #eab308; }

.tbl-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .89rem; }
.tbl th {
  text-align: left; padding: 13px 16px; background: var(--surface-2);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--hover-bg-soft); }
.tbl b { color: var(--text); font-weight: 600; }
.tbl .thumb { width: 54px; height: 38px; border-radius: 7px; object-fit: cover; background: var(--surface-3); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); transition: .16s;
}
.icon-btn:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-soft); }
.icon-btn--danger:hover { border-color: rgba(239, 68, 68, .5); color: #ff8b8b; background: rgba(239, 68, 68, .12); }
.icon-btn svg { width: 15px; height: 15px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); }
.pill--on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.stat-card b { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.stat-card span { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: grid; gap: 10px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 13px 18px; font-size: .88rem; box-shadow: var(--shadow);
  animation: toastIn .25s ease; min-width: 240px;
}
.toast--ok { border-left-color: var(--whatsapp); }
.toast--err { border-left-color: #ef4444; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }

.admin-note { font-size: .78rem; color: var(--dim); margin-top: 6px; }
.divider { height: 1px; background: var(--line-soft); margin: 26px 0; }

.spec-editor { display: grid; gap: 8px; }
.spec-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; align-items: center; }
@media (max-width: 620px) { .spec-row { grid-template-columns: 1fr; } }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: var(--accent-soft); border-color: var(--accent-ink); }
.switch input:checked + i::after { transform: translateX(18px); background: var(--accent); }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .aside { position: static; height: auto; }
  .aside__nav { grid-template-columns: repeat(2, 1fr); display: grid; }
  .main { padding: 22px 18px 60px; }
  .tbl-wrap { overflow-x: auto; }
  .tbl { min-width: 640px; }
}

/* ==========================================================================
   LIGHT THEME
   The site is dark by default; the toggle in the header stamps
   data-theme="light" on <html> and only these tokens change.
   ========================================================================== */
:root { color-scheme: dark; }

:root[data-theme="light"] {
  color-scheme: light;

  --accent-ink: #b8440a;
  --accent-soft: rgba(255, 107, 26, .10);
  --accent-line: rgba(255, 107, 26, .34);

  --bg: #f4f6f9;
  --bg-2: #eaeef3;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eceff4;
  --line: #dbe1e9;
  --line-soft: #e6ebf1;
  --bg-deep: #e8ecf2;

  --scrim: rgba(255, 255, 255, .88);
  --ghost-bg: rgba(15, 23, 32, .022);
  --hover-bg: rgba(15, 23, 32, .05);
  --hover-bg-soft: rgba(15, 23, 32, .025);
  --grid-line: rgba(15, 23, 32, .05);
  --header-bg: rgba(244, 246, 249, .84);
  --header-bg-solid: rgba(244, 246, 249, .97);
  --hero-base: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  --hero-g1: rgba(255, 107, 26, .14);
  --hero-g2: rgba(70, 110, 160, .10);
  --cta-bg: linear-gradient(135deg, #ffffff, #e9eef4);
  --map-filter: none;

  --text: #0f1720;
  --text-2: #3b4652;
  --muted: #5d6976;
  --dim: #7c8794;

  --shadow: 0 18px 50px rgba(15, 23, 32, .10);
  --shadow-sm: 0 6px 20px rgba(15, 23, 32, .07);
}
:root[data-theme="light"] .header.is-scrolled { box-shadow: 0 8px 24px rgba(15, 23, 32, .07); }
:root[data-theme="light"] .tag { box-shadow: 0 1px 3px rgba(15, 23, 32, .06); }
:root[data-theme="light"] .btn--dark { background: var(--surface-3); color: var(--text); }
:root[data-theme="light"] .hero__card,
:root[data-theme="light"] .card__media,
:root[data-theme="light"] .product__media,
:root[data-theme="light"] .gallery__main { background: #0f1319; }

/* ---------- Theme toggle ---------- */
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: var(--ghost-bg); color: var(--text-2);
  display: grid; place-items: center; transition: color .18s, border-color .18s, background .18s;
}
.theme-btn:hover { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }

/* ==========================================================================
   PRODUCT PAGE
   ========================================================================== */
.pdp { display: grid; grid-template-columns: 1.02fr .98fr; gap: 46px; align-items: start; }
@media (max-width: 980px) { .pdp { grid-template-columns: 1fr; gap: 34px; } }

.gallery__main {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumb {
  width: 82px; height: 60px; border-radius: 9px; overflow: hidden; padding: 0;
  border: 1px solid var(--line); opacity: .55; transition: opacity .18s, border-color .18s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb.is-active { opacity: 1; border-color: var(--accent); }

.pdp__title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 8px; }
.pdp__lede { color: var(--accent-ink); font-weight: 650; margin-bottom: 18px; }
.pdp__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }

.block { margin-top: 54px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.block__head h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 0; }
.block__head p { margin: 0; color: var(--muted); font-size: .86rem; }

/* ---------- Weight calculator ---------- */
.calc { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 26px; }
.calc__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .calc__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .calc__grid { grid-template-columns: 1fr; } }
.calc .field { margin-bottom: 0; }
.calc__out {
  margin-top: 22px; padding: 22px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; gap: 14px; grid-template-columns: 1fr 1fr;
}
@media (max-width: 620px) { .calc__out { grid-template-columns: 1fr; } }
.calc__hero span { display: block; font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.calc__hero b { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1; font-variant-numeric: tabular-nums; }
.calc__hero b em { font-style: normal; font-size: .42em; color: var(--muted); margin-left: 6px; }
.calc__rows { display: grid; gap: 7px; align-content: center; }
.calc__row { display: flex; justify-content: space-between; gap: 16px; font-size: .86rem; color: var(--muted); }
.calc__row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc__formula {
  margin-top: 16px; font-size: .8rem; color: var(--dim);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 11px 14px; overflow-x: auto; white-space: nowrap;
}

/* ---------- Grade composition ---------- */
.grade-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.comp { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 26px; }
.comp__top { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.comp__facts { display: flex; gap: 26px; flex-wrap: wrap; }
.comp__fact span { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.comp__fact b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }

.comp-strip {
  display: flex; gap: 2px; height: 40px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.comp-seg { min-width: 3px; transition: filter .18s; }
.comp-seg:hover { filter: brightness(1.18); }
.comp-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 16px; }
.comp-key { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.comp-key i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.comp-key b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }

.comp-table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: .86rem; }
.comp-table th, .comp-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.comp-table th { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.comp-table td { color: var(--text-2); }
.comp-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.comp-table tr:last-child td { border-bottom: none; }
.comp-table .el { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; }
.comp-table .el i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* element colours — categorical slots, validated for both themes */
:root {
  --el-fe: #3987e5; --el-cr: #d95926; --el-ni: #199e70;
  --el-mo: #c98500; --el-mn: #d55181; --el-cu: #008300; --el-other: #6b7684;
}
:root[data-theme="light"] {
  --el-fe: #2a78d6; --el-cr: #eb6834; --el-ni: #1baf7a;
  --el-mo: #eda100; --el-mn: #e87ba4; --el-cu: #008300; --el-other: #8a949f;
}

/* ==========================================================================
   BLOG
   ========================================================================== */
.post__media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .post__media img { transform: scale(1.05); }
.post__date { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }

.article { max-width: 76ch; margin-inline: auto; }
.article__cover { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 34px; aspect-ratio: 21 / 9; background: var(--surface-2); }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .85rem; margin-bottom: 26px; }
.article__body { font-size: 1.04rem; color: var(--text-2); }
.article__body h2 { font-size: 1.5rem; margin: 40px 0 14px; color: var(--text); }
.article__body h3 { font-size: 1.18rem; margin: 30px 0 10px; color: var(--text); }
.article__body ul { list-style: disc; padding-left: 22px; margin: 0 0 18px; }
.article__body ol { list-style: decimal; padding-left: 22px; margin: 0 0 18px; }
.article__body li { margin-bottom: 7px; }
.article__body blockquote {
  margin: 26px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  color: var(--text); font-size: 1.1rem;
}
.article__body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.article__body strong { color: var(--text); }
.article__body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .9rem; }
.article__body th, .article__body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article__body th { background: var(--surface-2); color: var(--text); }

/* ==========================================================================
   ADMIN — uploads, logo, grades
   ========================================================================== */
.drop {
  border: 1.5px dashed var(--line); border-radius: var(--r); padding: 24px; width: 100%;
  text-align: center; color: var(--muted); font-size: .88rem; transition: .18s; cursor: pointer;
}
.drop:hover, .drop.is-over { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text-2); }
.drop b { display: block; color: var(--text); margin-bottom: 4px; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 14px; }
.img-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile__x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--scrim); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text);
}
.img-tile__x:hover { color: #ff6b6b; border-color: rgba(239, 68, 68, .5); }
.img-tile__x svg { width: 12px; height: 12px; }
.img-tile__main {
  position: absolute; left: 6px; bottom: 6px; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 999px; font-weight: 700;
}
.img-tile__set {
  position: absolute; left: 6px; bottom: 6px; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--scrim); border: 1px solid var(--line); color: var(--text-2); padding: 2px 8px; border-radius: 999px;
}
.img-tile__set:hover { color: var(--accent-ink); border-color: var(--accent-line); }

.logo-preview { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-preview__box { width: 84px; height: 84px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.logo-preview__box img { max-width: 72%; max-height: 72%; object-fit: contain; }
.logo-preview__box--light { background: #fff; }
.logo-preview__box--dark { background: #0d1014; }

.meter { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.meter i.is-warn { background: #eab308; }
.meter i.is-full { background: #ef4444; }

.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.chk {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); font-size: .86rem; cursor: pointer; transition: .16s;
}
.chk:hover { border-color: var(--accent-line); }
.chk input { accent-color: var(--accent); width: 15px; height: 15px; }
.chk.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* Form controls follow the brand */
input[type="range"] { accent-color: var(--accent); width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="file"] { color: var(--muted); font-size: .88rem; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent-line); color: var(--accent-ink); }

/* ==========================================================================
   MOBILE FIXES — stop any child from forcing the page wider than the screen
   ========================================================================== */
html { overflow-x: hidden; max-width: 100%; }
body { max-width: 100%; }

/* Grid and flex children default to min-width:auto, which lets long words,
   tables and buttons blow the track out. Reset it everywhere it matters. */
.nav, .nav > *, .grid > *, .contact-grid > *, .pdp > *, .cta__in > *,
.footer__grid > *, .calc__out > *, .calc__grid > *, .stat-row > *,
.chk-grid > *, .field-row > *, .toolbar > *, .main__head > *,
.block__head > *, .comp__top > *, .admin > *, .aside__nav > * { min-width: 0; }

/* Header: let the business name shrink, keep the controls intact */
.brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.brand > span { min-width: 0; overflow: hidden; }
.brand__name, .brand__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__cta { flex: 0 0 auto; }

@media (max-width: 600px) {
  :root { --nav-h: 64px; }
  .nav__cta .btn--wa { display: none; }   /* the floating button covers this */
  .brand img { width: 34px; height: 34px; }
  .brand__name { font-size: 1.1rem; }
  .brand__sub { font-size: .58rem; }
  .wrap { padding-inline: 16px; }
  .section { padding: 60px 0; }
  .section--tight { padding: 44px 0; }
  .panel, .calc, .comp { padding: 20px; }
  .cta { padding: 28px 22px; }
}

/* Wide content scrolls inside its own box, never the page */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-table, .comp-table { width: 100%; }

@media (max-width: 620px) {
  .comp-table th:last-child, .comp-table td:last-child { display: none; }
  .spec-table th { width: 44%; }
  .spec-table th, .spec-table td { padding: 9px 10px; font-size: .84rem; }
  .comp__facts { gap: 16px; }
  .spec-row { grid-template-columns: 1fr !important; }
  .gallery__thumb { width: 64px; height: 48px; }
}

/* Admin sidebar on small screens */
@media (max-width: 860px) {
  .aside__nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .aside__nav button { min-width: 0; }
}
@media (max-width: 520px) {
  .aside__nav { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 50px; }
}
@media (max-width: 600px) { .brand__name { font-size: .98rem; letter-spacing: 0; } }

/* ==========================================================================
   CHAT ASSISTANT
   ========================================================================== */
.chat-fab {
  position: fixed; right: 90px; bottom: 23px; z-index: 95;
  height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-weight: 600; font-size: .88rem; box-shadow: var(--shadow-sm);
  transition: transform .18s, border-color .18s, background .18s;
}
.chat-fab:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--surface-3); }
.chat-fab svg { width: 20px; height: 20px; color: var(--accent-ink); flex: none; }
.chat-fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(.9); }
@media (max-width: 560px) { .chat-fab span { display: none; } .chat-fab { padding: 0; width: 52px; justify-content: center; right: 86px; } }

.chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 100px));
  display: none; flex-direction: column; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.chat.is-open { display: flex; animation: chatIn .24s cubic-bezier(.4, 0, .2, 1); }
@keyframes chatIn { from { transform: translateY(16px) scale(.98); opacity: 0; } }
@media (max-width: 560px) {
  .chat { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}

.chat__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface); flex: none;
}
.chat__head img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.chat__head b { display: block; font-size: .95rem; line-height: 1.2; }
.chat__head span { font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat__head .dot { width: 6px; height: 6px; }
.chat__x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.chat__x:hover { color: var(--accent-ink); background: var(--hover-bg); }
.chat__x svg { width: 16px; height: 16px; }

.chat__log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 85%; padding: 11px 14px; border-radius: 16px; font-size: .89rem; line-height: 1.55; }
.msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--text-2); }
.msg--me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; font-weight: 500; }
.msg b, .msg strong { color: var(--text); }
.msg--me b { color: #fff; }
.msg a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.msg .msg-card, .msg .btn { text-decoration: none; color: var(--text-2); }
.msg .btn { color: #06281a; }
.msg--bot p { margin: 0 0 8px; }
.msg--bot p:last-child { margin: 0; }
.msg ul { margin: 6px 0 0; display: grid; gap: 6px; }

.msg-card {
  display: flex; gap: 11px; align-items: center; margin-top: 9px; padding: 9px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  transition: border-color .16s;
}
.msg-card:hover { border-color: var(--accent-line); }
.msg-card img { width: 46px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: #0f1319; }
.msg-card b { display: block; font-size: .85rem; line-height: 1.25; }
.msg-card span { font-size: .74rem; color: var(--muted); }

.calc-card {
  margin-top: 10px; padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
}
.calc-card b { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1; color: var(--text); }
.calc-card span { font-size: .76rem; color: var(--muted); }

.chat__typing { display: flex; gap: 4px; align-items: center; padding: 13px 15px; }
.chat__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.3s infinite; }
.chat__typing i:nth-child(2) { animation-delay: .18s; }
.chat__typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chat__chips { display: flex; gap: 7px; padding: 0 16px 12px; flex-wrap: wrap; flex: none; }
.chat__chip {
  padding: 7px 13px; border-radius: 999px; font-size: .78rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); transition: .16s;
}
.chat__chip:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-soft); }

.chat__bar { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.chat__bar input {
  flex: 1; min-width: 0; padding: 11px 15px; border-radius: 999px; font-size: .88rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.chat__bar input:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.chat__send { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; }
.chat__send:hover { background: var(--accent-hi); }
.chat__send svg { width: 18px; height: 18px; }
.chat__note { padding: 0 16px 12px; font-size: .7rem; color: var(--dim); text-align: center; flex: none; }

/* Admin — FAQ rows for the chatbot */
.faq-row { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.faq-row__top { display: flex; align-items: center; gap: 10px; }
.faq-row__top input { flex: 1; min-width: 0; }
.faq-row textarea { min-height: 66px; }
.faq-row .field { margin-bottom: 0; }

/* Admin — how the page looks in a browser tab and in Google */
.tabmock { display: flex; align-items: flex-end; gap: 0; margin-bottom: 18px; }
.tabmock__tab {
  display: inline-flex; align-items: center; gap: 9px; max-width: 320px;
  padding: 9px 14px; border-radius: 10px 10px 0 0;
  background: var(--surface-2); border: 1px solid var(--line); border-bottom: none;
  font-size: .82rem; color: var(--text-2);
}
.tabmock__tab img { width: 15px; height: 15px; border-radius: 3px; flex: none; }
.tabmock__tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabmock__rest { flex: 1; height: 1px; border-bottom: 1px solid var(--line); }

.serp { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; background: var(--surface-2); }
.serp__url { font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
.serp__title { font-size: 1.12rem; color: #6ba7ff; line-height: 1.3; margin-bottom: 5px; }
:root[data-theme="light"] .serp__title { color: #1a0dab; }
.serp__desc { font-size: .86rem; color: var(--text-2); line-height: 1.5; }
