/* The Promo Lab – mobile site */
:root {
  --brand: #09b9be;        /* teal from the logo */
  --brand-dark: #078c90;
  --ink: #313b41;          /* slate from the logo */
  --accent: #f16623;       /* orange used on the desktop site */
  --accent-dark: #d4521a;
  --text: #1f2529;
  --muted: #5d6870;
  --line: #e2e7ea;
  --bg: #ffffff;
  --bg-soft: #f4f7f8;
  --danger: #c2261a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 35, .06), 0 4px 14px rgba(20, 30, 35, .06);
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 8px;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand img { height: 44px; width: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:active { background: var(--bg-soft); }

.searchbar {
  position: relative; margin: 12px var(--gutter) 4px;
}
.searchbar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.searchbar input {
  width: 100%; height: 48px; padding: 0 16px 0 44px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft);
  font-size: 16px; /* prevents iOS zoom */
}
.searchbar input:focus { background: #fff; border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(9, 185, 190, .2); }

/* ---------- Drawer menu ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(20, 28, 32, .45); }
.drawer[hidden] { display: none; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 360px);
  background: #fff; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
  animation: slide-in .2s ease-out;
}
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px var(--gutter); border-bottom: 1px solid var(--line); }
.drawer-list { list-style: none; margin: 0; padding: 8px 0; }
.drawer-list a { display: block; padding: 12px var(--gutter); color: var(--text); text-decoration: none; font-weight: 500; }
.drawer-list a:active { background: var(--bg-soft); }
.drawer-secondary { border-top: 1px solid var(--line); }
.drawer-secondary a { font-weight: 400; color: var(--muted); }
body.no-scroll { overflow: hidden; }

/* ---------- Layout ---------- */
main { min-height: 50vh; }
.section { padding: 16px var(--gutter); }
.section-title { font-size: 1.25rem; }
.page-title { font-size: 1.5rem; margin-bottom: .25em; }
.count { color: var(--muted); font-size: .9rem; }
.center { text-align: center; padding-top: 40px; }
.empty { color: var(--muted); background: var(--bg-soft); padding: 16px; border-radius: var(--radius); }

.crumbs { padding: 8px var(--gutter) 0; font-size: .85rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs [aria-current] { color: var(--text); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-block { width: 100%; }
.is-disabled { opacity: .4; pointer-events: none; }

/* ---------- Home ---------- */
.hero {
  margin: 12px var(--gutter) 4px; padding: 24px 20px; border-radius: var(--radius);
  color: #fff; background: linear-gradient(135deg, var(--ink) 0%, #23464c 55%, var(--brand-dark) 100%);
}
.hero h1 { color: #fff; font-size: 1.75rem; }
.hero p { opacity: .9; }
.cta { margin: 8px var(--gutter) 24px; background: var(--bg-soft); border-radius: var(--radius); text-align: center; }

/* ---------- Category tiles ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile a { display: block; text-decoration: none; color: var(--text); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); height: 100%; }
.tile-img, .card-img { display: block; aspect-ratio: 1 / 1; background: var(--bg-soft); }
.tile-img img, .card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.tile-label { display: block; padding: 10px 12px 12px; font-weight: 600; font-size: .95rem; line-height: 1.25; }

/* ---------- Product cards ---------- */
.grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text); background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; flex: 1; }
.card-title { font-weight: 600; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: .78rem; }
.card-price { margin-top: auto; padding-top: 6px; color: var(--accent-dark); font-weight: 700; font-size: .9rem; }

.rail { list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { scroll-snap-align: start; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 8px; }
.pager-info { color: var(--muted); font-size: .9rem; }

/* ---------- Product page ---------- */
.product { padding-bottom: 96px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--bg-soft); margin-top: 8px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.gallery-item img { width: 100%; height: 100%; object-fit: contain; padding: 16px; mix-blend-mode: multiply; }
.gallery-empty span { color: var(--muted); }
.gallery-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; min-height: 18px; }
.gallery-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.gallery-dots span.is-active { background: var(--ink); }

.product-head { padding: 8px var(--gutter) 4px; }
.product-title { font-size: 1.4rem; margin-bottom: 4px; }
.product-code { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.product-from { font-size: 1.05rem; margin: 0; }
.product-from strong { color: var(--accent-dark); font-size: 1.35rem; }
.product-from span { color: var(--muted); font-size: .85rem; }

.panel { margin: 12px var(--gutter); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel-title { font-size: 1.05rem; margin: 0 0 12px; display: inline-flex; gap: 8px; align-items: baseline; }
.panel-value { font-weight: 400; color: var(--muted); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: .9rem; }
.chip[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

.price-status { color: var(--muted); font-size: .95rem; }
.price-status:empty { display: none; }
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.price-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.price-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.price-table td:last-child, .price-table th:last-child { text-align: right; }
.price-table tr.is-active td { background: rgba(9, 185, 190, .1); font-weight: 600; }
.estimator { margin-top: 8px; }
.estimator label { font-weight: 600; font-size: .95rem; }
.estimator-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 6px; }
.estimator-row input { width: 120px; flex: none; }
.estimator-row output { flex: 1 1 160px; min-width: 0; font-size: .95rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fine-print { color: var(--muted); font-size: .8rem; margin: 10px 0 0; }

.details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.details[open] summary::after { transform: rotate(-135deg); }
.details summary .panel-title { margin: 0; }
.details[open] summary { margin-bottom: 12px; }
.prose { font-size: .95rem; overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .85rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px; }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; overflow-wrap: anywhere; }

.related { padding-top: 8px; }

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter); padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
  transition: transform .2s;
}
.buybar.is-hidden { transform: translateY(110%); }
.buybar-price span { color: var(--muted); font-size: .85rem; }
.buybar-price strong { color: var(--accent-dark); font-size: 1.2rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px;
  border: 1px solid #cdd5da; border-radius: var(--radius-sm); background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(9, 185, 190, .2); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
.alert { background: #fdecea; color: var(--danger); padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.form-note { color: var(--muted); font-size: .85rem; text-align: center; margin: 12px 0 0; }
.contact-actions { display: grid; gap: 10px; margin-top: 12px; }

.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: rgba(9, 185, 190, .15); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; }
.success-icon svg { width: 36px; height: 36px; stroke-width: 3; }
.debug { text-align: left; white-space: pre-wrap; background: var(--bg-soft); padding: 12px; font-size: .8rem; }

/* ---------- Footer ---------- */
.footer { margin-top: 24px; padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom)); background: var(--ink); color: #dfe6e9; text-align: center; }
body:has(.buybar) .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.footer-title { font-weight: 700; color: #fff; }
.footer-contact { display: grid; gap: 10px; margin-bottom: 20px; }
.footer .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #fff; }
.footer-small { color: #9fb0b7; font-size: .8rem; margin: 0; }

/* ---------- Larger phones / small tablets ---------- */
@media (min-width: 600px) {
  .tiles, .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: 30%; }
  .gallery-item { aspect-ratio: 4 / 3; }
}
@media (min-width: 900px) {
  main, .searchbar { max-width: 960px; margin-left: auto; margin-right: auto; }
  .tiles, .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
