/* ==========================================================================
   BagCraft - Premium B2B catalogue design system
   Deliberately restrained: one navy family, one copper accent, generous space.
   ========================================================================== */

:root {
  --ink:            #0b1220;
  --navy:           #131f31;
  --navy-soft:      #1d2c42;
  --slate:          #475569;
  --slate-light:    #7b8aa1;
  --line:           #e3e8ef;
  --line-strong:    #cfd8e3;
  --paper:          #ffffff;
  --paper-soft:     #f7f9fc;
  --paper-warm:     #fbfaf7;
  --accent:         #b45309;
  --accent-strong:  #8f3f05;
  --accent-soft:    #fdf3e7;
  --teal:           #0f766e;
  --success:        #15803d;
  --danger:         #b91c1c;
  --warning:        #b45309;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06);
  --shadow:    0 6px 20px -12px rgba(11, 18, 32, .28);
  --shadow-lg: 0 24px 60px -30px rgba(11, 18, 32, .45);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  --container: 1240px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
/* Grid/flex children must be allowed to shrink below content width, or long
   strings inside cards force the whole page wider than the viewport. */
.grid--2 > *, .grid--3 > *, .grid--4 > *, .grid--sidebar > *,
.footer-grid > *, .hero__grid > *, .steps > *, .product-detail > *,
.cta-band__inner > * { min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.18; letter-spacing: -.02em; font-weight: 650; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.35rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
small { font-size: .82rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 880px; }
.section { padding: var(--space-9) 0; }
.section--tight { padding: var(--space-7) 0; }
.section--soft { background: var(--paper-soft); }
.section--ink { background: var(--ink); color: #eef2f7; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: var(--space-6); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.lede { font-size: 1.075rem; color: var(--slate); max-width: 62ch; }

/* ---------- Header ---------- */
.topbar {
  background: var(--ink); color: #b9c4d4; font-size: .82rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: 38px; }
.topbar a:hover { color: #fff; }
.topbar__list { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.topbar__list span { display: inline-flex; align-items: center; gap: 6px; }

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner { display: flex; align-items: center; gap: var(--space-5); min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--ink) 100%); color: #fff; font-weight: 700;
  letter-spacing: -.04em;
}
.brand__name { font-weight: 680; font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.brand__tag { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-light); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 9px 13px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 520; color: var(--navy-soft);
  position: relative;
}
.nav a:hover { background: var(--paper-soft); color: var(--ink); }
.nav a.is-active { color: var(--accent); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; background: var(--accent);
}
.masthead__actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); margin: 4px auto; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: var(--space-4) 0; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-weight: 540; }

/* ---------- Buttons ---------- */
/* Inline SVG sprite icons - size them here or they blow up to the 300x150 SVG default. */
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn .icon { width: 17px; height: 17px; }
.topbar .icon { width: 14px; height: 14px; opacity: .85; }

.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-border: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 580; font-size: .93rem;
  cursor: pointer; transition: transform .12s ease, background .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn--accent { --btn-bg: var(--accent); --btn-border: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-strong); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); --btn-border: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--paper-soft); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-border: #fff; }
.btn--wa { --btn-bg: #1f9d55; --btn-border: #1f9d55; }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: #e8eef6; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(180,83,9,.35), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(15,118,110,.28), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
/* keep the container's 20px side padding - a bare `padding: X 0` above strips it */
.hero__inner.container { padding-left: 20px; padding-right: 20px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { color: #fff; }
.hero .lede { color: #b8c5d8; }
.hero__points { list-style: none; padding: 0; margin: var(--space-5) 0; display: grid; gap: 10px; }
.hero__points li { display: flex; gap: 10px; align-items: flex-start; color: #cfd9e7; font-size: .95rem; }
.hero__points svg { flex: none; margin-top: 3px; color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-5); }
.hero__note { margin-top: var(--space-4); font-size: .84rem; color: #93a3ba; }
.hero__visual {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow-lg); background: #0e1726;
}
.hero__visual img { width: 100%; height: clamp(280px, 40vw, 460px); object-fit: cover; }
.hero__stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03);
}
.hero__stat { padding: var(--space-5) var(--space-4); border-right: 1px solid rgba(255,255,255,.08); }
.hero__stat:last-child { border-right: 0; }
.hero__stat b { display: block; font-size: 1.55rem; color: #fff; letter-spacing: -.03em; }
.hero__stat span { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #93a3ba; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--sidebar { grid-template-columns: 288px 1fr; align-items: start; }

.cat-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: var(--space-5); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cat-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.cat-card__count { font-size: .78rem; color: var(--slate-light); font-variant-numeric: tabular-nums; }
.cat-card h3 { margin-bottom: 6px; font-size: 1.05rem; }
.cat-card p { margin: 0; font-size: .875rem; color: var(--slate); }
.cat-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-4); font-size: .82rem; font-weight: 600; color: var(--accent); }

.product-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  height: 100%;
}
.product-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card__media { position: relative; background: var(--paper-warm); aspect-ratio: 4 / 3; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-card__media img { transform: scale(1.035); }
.product-card__flag {
  position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 2px; font-weight: 600;
}
.product-card__flag--accent { background: var(--accent); }
.product-card__body { padding: var(--space-4) var(--space-4) var(--space-5); display: flex; flex-direction: column; flex: 1; }
.product-card__cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-light); font-weight: 630; }
.product-card h3 { font-size: 1.02rem; margin: 6px 0 8px; }
.product-card h3 a:hover { color: var(--accent); }
.product-card__specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-4); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 3px;
  background: var(--paper-soft); border: 1px solid var(--line); font-size: .755rem; color: var(--slate);
  font-variant-numeric: tabular-nums;
}
.chip--accent { background: var(--accent-soft); border-color: #f2ddc2; color: var(--accent-strong); }
.product-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.product-card__moq { font-size: .78rem; color: var(--slate); }
.product-card__moq b { color: var(--ink); }
.product-card__price { font-weight: 650; font-size: .95rem; }
.product-card__price span { display: block; font-size: .7rem; font-weight: 500; color: var(--slate-light); }

/* ---------- Filters ---------- */
.filter-panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; position: sticky; top: 96px;
}
.filter-panel__head {
  display: flex; align-items: center; justify-content: space-between; padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.filter-panel__head h3 { margin: 0; font-size: .95rem; }
.filter-group { border-bottom: 1px solid var(--line); padding: var(--space-3) var(--space-4); }
.filter-group:last-child { border-bottom: 0; }
.filter-group__title {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  font-size: .85rem; font-weight: 620; color: var(--ink); padding: 4px 0;
}
.filter-group__title svg { transition: transform .18s ease; color: var(--slate-light); }
.filter-group.is-collapsed .filter-group__body { display: none; }
.filter-group.is-collapsed .filter-group__title svg { transform: rotate(-90deg); }
.filter-group__body { padding-top: 10px; display: grid; gap: 7px; max-height: 214px; overflow: auto; }
.filter-option { display: flex; align-items: center; gap: 9px; font-size: .855rem; color: var(--slate); cursor: pointer; }
.filter-option input { accent-color: var(--accent); width: 15px; height: 15px; }
.filter-option span.count { margin-left: auto; font-size: .74rem; color: var(--slate-light); font-variant-numeric: tabular-nums; }
.filter-option:hover { color: var(--ink); }
.filter-range { display: flex; align-items: center; gap: 8px; }
.filter-range input {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .83rem;
}
.filter-actions { padding: var(--space-4); display: grid; gap: 8px; }

.catalogue-toolbar {
  display: flex; align-items: center; gap: var(--space-3); justify-content: space-between;
  padding-bottom: var(--space-4); margin-bottom: var(--space-5); border-bottom: 1px solid var(--line);
}
.catalogue-toolbar__count { font-size: .875rem; color: var(--slate); }
.catalogue-toolbar__count b { color: var(--ink); }
.toolbar-controls { display: flex; align-items: center; gap: 10px; }
.select {
  padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff;
  font-size: .87rem; color: var(--navy);
}
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--paper-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: .78rem; color: var(--slate);
}
.active-chip button { border: 0; background: none; cursor: pointer; color: var(--slate-light); font-size: 1rem; line-height: 1; }
.active-chip button:hover { color: var(--danger); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--space-7); flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: .88rem; color: var(--slate);
}
.pagination a:hover { border-color: var(--line-strong); color: var(--ink); }
.pagination .is-current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Product detail ---------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--slate-light); padding: var(--space-4) 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); }
.gallery { position: sticky; top: 96px; }
.gallery__main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-warm); }
.gallery__main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumb {
  width: 78px; height: 62px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; background: #fff; padding: 0;
}
.gallery__thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; font-size: .875rem; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 42%; background: var(--paper-soft); font-weight: 560; color: var(--slate); }
.spec-table td { font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; }

.buybox { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: var(--space-5); box-shadow: var(--shadow-sm); }
.buybox__moq { display: flex; align-items: baseline; gap: 8px; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.buybox__moq b { font-size: 1.15rem; }
.buybox__actions { display: grid; gap: 10px; margin-top: var(--space-4); }
.buybox__meta { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: .83rem; color: var(--slate); }
.buybox__meta div { display: flex; gap: 8px; align-items: flex-start; }
.buybox__meta svg { color: var(--teal); flex: none; margin-top: 2px; }

.tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--line); margin-bottom: var(--space-5); overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 12px 2px; font-size: .92rem; font-weight: 560; color: var(--slate);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button.is-active { color: var(--accent); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------- Process / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); counter-reset: step; }
.step { position: relative; padding-top: var(--space-5); border-top: 2px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -14px; left: 0; background: #fff; padding-right: 12px;
  font-family: var(--mono); font-size: .82rem; color: var(--accent); font-weight: 600;
}
.section--soft .step::before { background: var(--paper-soft); }
.section--ink .step { border-color: rgba(255,255,255,.16); }
.section--ink .step::before { background: var(--ink); }
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: .875rem; color: var(--slate); margin: 0; }
.section--ink .step p { color: #a9b6c9; }

.feature { padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 100%; }
.feature__icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); margin-bottom: var(--space-4);
}
.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { margin: 0; font-size: .875rem; color: var(--slate); }

.capability-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.capability-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.capability-list svg { color: var(--teal); margin-top: 3px; }
.capability-list b { display: block; color: var(--ink); font-size: .95rem; }
.capability-list span { font-size: .87rem; color: var(--slate); }

/* ---------- Testimonials / FAQ ---------- */
.quote { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: var(--space-5); height: 100%; }
.quote p { font-size: .925rem; color: var(--navy-soft); }
.quote__person { display: flex; align-items: center; gap: 12px; margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-soft); border: 1px solid var(--line); font-weight: 650; color: var(--slate); font-size: .82rem;
}
.quote__person b { display: block; font-size: .88rem; }
.quote__person span { font-size: .78rem; color: var(--slate-light); }
.stars { color: #d97706; letter-spacing: 1px; font-size: .85rem; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: var(--space-4) 0; font-weight: 580; font-size: .95rem; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; gap: var(--space-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 var(--space-4); font-size: .9rem; color: var(--slate); max-width: 72ch; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #e8eef6; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 52px); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 280px at 88% 12%, rgba(180,83,9,.32), transparent 62%); pointer-events: none;
}
.cta-band__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr auto; gap: var(--space-5); align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #b8c5d8; margin: 0; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: clamp(20px, 3vw, 34px); }
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .83rem; font-weight: 600; color: var(--navy-soft); }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: .92rem; font-family: inherit; color: var(--ink); background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: .78rem; color: var(--slate-light); }
.fieldset-legend {
  grid-column: 1 / -1; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 650; padding-top: var(--space-3); border-top: 1px solid var(--line);
}
.fieldset-legend:first-child { padding-top: 0; border-top: 0; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--slate); }
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

.alert { border-radius: var(--radius); padding: 13px 16px; font-size: .89rem; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert--error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert--warning { background: var(--accent-soft); border-color: #f2ddc2; color: var(--accent-strong); }
.alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.notice-box { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--space-4); background: var(--paper-soft); font-size: .87rem; color: var(--slate); }
.notice-box b { color: var(--ink); }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .885rem; }
.data-table th {
  text-align: left; padding: 11px 14px; background: var(--paper-soft); color: var(--slate);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:hover { background: #fcfdff; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: #fff; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 620; border: 1px solid; }
.pill--ok     { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.pill--warn   { background: var(--accent-soft); border-color: #f2ddc2; color: var(--accent-strong); }
.pill--info   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pill--danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.pill--muted  { background: var(--paper-soft); border-color: var(--line); color: var(--slate); }

.empty-state { text-align: center; padding: var(--space-8) var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-soft); }
.empty-state svg { color: var(--slate-light); margin-bottom: var(--space-4); }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--slate); margin: 0 auto var(--space-4); max-width: 46ch; font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9fadc2; padding: var(--space-8) 0 var(--space-5); font-size: .89rem; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--space-4); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: var(--space-6); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer .brand__name { color: #fff; }
.footer-contact div { display: flex; gap: 9px; margin-bottom: 12px; align-items: flex-start; }
.footer-contact svg { color: var(--accent); flex: none; margin-top: 3px; }
.footer-bottom {
  margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: .82rem;
}

/* ---------- Floating assistant ---------- */
.assistant-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px;
  background: var(--ink); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  box-shadow: var(--shadow-lg); cursor: pointer; font-weight: 580; font-size: .9rem;
}
.assistant-launch:hover { background: #16243a; }
.assistant-launch svg { color: var(--accent); }
.assistant-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 81; width: min(400px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 44px)); background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden;
}
.assistant-panel.is-open { display: flex; }
.assistant-panel__head { background: var(--ink); color: #fff; padding: var(--space-4); display: flex; align-items: center; gap: 12px; }
.assistant-panel__head b { display: block; font-size: .95rem; }
.assistant-panel__head span { font-size: .75rem; color: #9fadc2; }
.assistant-panel__close { margin-left: auto; background: none; border: 0; color: #9fadc2; font-size: 1.25rem; cursor: pointer; }
.assistant-thread { padding: var(--space-4); overflow-y: auto; display: grid; gap: var(--space-3); background: var(--paper-soft); flex: 1; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: var(--radius); font-size: .88rem; line-height: 1.55; white-space: pre-wrap; }
.msg--bot { background: #fff; border: 1px solid var(--line); }
.msg--user { background: var(--ink); color: #fff; margin-left: auto; }
.msg__products { display: grid; gap: 8px; margin-top: 10px; }
.msg__product { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: #fff; }
.msg__product img { width: 54px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--paper-warm); }
.msg__product b { font-size: .83rem; display: block; }
.msg__product span { font-size: .74rem; color: var(--slate-light); }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--space-4) var(--space-3); }
.assistant-suggestions button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px;
  font-size: .78rem; color: var(--slate); cursor: pointer;
}
.assistant-suggestions button:hover { border-color: var(--accent); color: var(--accent); }
.assistant-form { display: flex; gap: 8px; padding: var(--space-4); border-top: 1px solid var(--line); background: #fff; }
.assistant-form input { flex: 1; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .9rem; }
.assistant-form button { padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--slate-light); animation: bounce 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--slate); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); } .mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; } .mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); } .mb-6 { margin-bottom: var(--space-6); }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.items-center { align-items: center; }
.mono { font-family: var(--mono); font-size: .85em; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }
.divider { height: 1px; background: var(--line); margin: var(--space-6) 0; border: 0; }

.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  /* Keep the headline first on small screens; the visual is supporting, not the hook. */
  .hero__visual { order: 2; margin-top: var(--space-6); }
  .hero__visual img { height: clamp(200px, 42vw, 320px); }
  .grid--sidebar { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}
@media (max-width: 900px) {
  .nav, .topbar__list--secondary { display: none; }
  .nav-toggle { display: block; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stat:nth-child(2) { border-right: 0; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .section { padding: var(--space-7) 0; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .show-mobile { display: initial; }
  .catalogue-toolbar { flex-direction: column; align-items: stretch; }
  .assistant-launch { right: 14px; bottom: 14px; padding: 12px 15px; }
  .assistant-launch span { display: none; }
}
@media print {
  .masthead, .site-footer, .assistant-launch, .assistant-panel, .topbar, .no-print { display: none !important; }
}
