/* ==========================================================================
   Вафелька — vafelka.com.ua
   Palette from the trademark emblem; Nunito for headings, Manrope for text.
   ========================================================================== */

:root {
  --cocoa: #2B1F14;
  --cocoa-2: #4A3B2C;
  --muted: #6B5A48;
  --accent: #C2521B;
  --accent-dark: #A3420F;
  --accent-darker: #7A300A;
  --accent-soft: #FFF0E6;
  --honey: #F5C542;
  --cream: #FFF4DC;
  --dough: #FFFDF8;
  --sand: #F6EEDF;
  --line: #EFE4D0;
  --line-soft: #F3EADB;
  --chip-border: #E3D5BD;
  --input-border: #D9C9B3;
  --error: #B3261E;
  --dark-panel: #3A2C1F;
  --dark-line: #54432F;
  --dark-text: #FFF7EA;
  --dark-muted: #E5D6C0;
  --dark-label: #CDBBA3;
  --dark-link: #FFD98A;
  --focus: #23408E;

  --font-display: Nunito, Manrope, system-ui, sans-serif;
  --font-body: Manrope, system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 82px;

  --lattice: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.32) 0 3px, transparent 3px 28px),
             repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.32) 0 3px, transparent 3px 28px);
}

/* Base ------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html:has(dialog[open]) { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--cocoa);
  background: var(--dough);
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent-darker); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 900; line-height: 1.1; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--cocoa);
  color: #fff;
  font-weight: 800;
}
.skip-link:focus { top: 0; color: #fff; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main [id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.icon { flex: none; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-lg { min-height: 56px; padding: 0 28px; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-outline { border-color: var(--cocoa); background: transparent; color: var(--cocoa); }
.btn-outline:hover { background: var(--cocoa); color: #fff; }

.btn-outline-accent { border-color: var(--accent); background: #fff; color: var(--accent-dark); }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

.btn-outline-light { border-color: var(--dark-muted); background: transparent; color: var(--dark-text); }
.btn-outline-light:hover { background: var(--dark-text); color: var(--cocoa); }

.btn[disabled] { opacity: .7; cursor: progress; }

.icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--cocoa);
  cursor: pointer;
}
.icon-btn:hover { background: #EDE0C8; }

.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  font-weight: 800;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  padding-block: 14px;
}

.brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cocoa);
  text-decoration: none;
}
.brand:hover { color: var(--cocoa); }
.brand-mark { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}
.brand-tagline { margin-top: 4px; font-size: 13px; line-height: 1.3; color: var(--muted); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  padding: 0;
  border: 2px solid var(--cocoa);
  border-radius: 12px;
  background: #fff;
  color: var(--cocoa);
  cursor: pointer;
}
.menu-toggle .menu-icon-close,
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline-flex; }
.menu-icon-open { display: inline-flex; }

.header-menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px 20px;
}

.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 0 2px;
}
.main-nav a {
  padding: 12px 10px;
  white-space: nowrap;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cocoa);
  text-decoration: none;
}
.main-nav a:hover { background: #FBF5EA; color: var(--cocoa); }

.lang-switch {
  flex: none;
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--sand);
}
.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a:hover { color: var(--cocoa); }
.lang-switch a[aria-current="page"] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(60, 30, 0, .15);
  font-weight: 800;
  color: var(--cocoa);
}

.header-phone {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid var(--cocoa);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--cocoa);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { background: var(--cocoa); color: #fff; }

@media (max-width: 1199px) {
  :root { --header-h: 72px; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .menu-toggle { display: inline-flex; }
  .header-menu {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 4px 0 14px;
  }
  .js .header-menu:not(.is-open) { display: none; }
  .main-nav { flex-direction: column; }
  .main-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
  }
  .lang-switch { align-self: flex-start; }
  .header-phone { min-height: 52px; }
}

@media (max-width: 480px) {
  .brand-mark { width: 42px; height: 42px; }
  .brand-name { font-size: 25px; }
  .brand-tagline { display: none; }
}

/* Hero ------------------------------------------------------------------- */

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-block: 64px 88px;
}
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero-media { flex: 1 1 440px; min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #FFF0C2;
  color: #5C4200;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.eyebrow-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #D99A00; }

.hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -.01em; }
.hero-lead { max-width: 34em; margin-top: 24px; font-size: 20px; color: var(--cocoa-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 44px 0 0;
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.fact dt { font-size: 15px; line-height: 1.35; color: var(--muted); }
.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-panel {
  position: relative;
  padding: clamp(20px, 3.5vw, 40px);
  border-radius: 32px;
  background-color: var(--honey);
  background-image: var(--lattice);
}
.hero-photo {
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(120, 70, 0, .2);
}
.hero-photo img { width: 100%; border-radius: 12px; }

.hero-badge {
  position: absolute;
  left: 16px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(60, 30, 0, .18);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.hero-badge img { flex: none; width: 44px; height: 44px; }

@media (max-width: 640px) {
  .hero-inner { gap: 24px; padding-block: 20px 44px; }
  .hero-media { order: -1; }
  .hero-panel { border-radius: 24px; }
  .hero-photo { padding: 10px; border-radius: 16px; }
  .hero-badge { position: static; max-width: none; margin-top: 12px; border-radius: 16px; }
  .eyebrow { margin-bottom: 14px; font-size: 14px; }
  .hero-lead { margin-top: 14px; font-size: 17px; }
  .hero-actions { flex-direction: column; margin-top: 24px; }
  .facts { gap: 10px; margin-top: 24px; }
  .fact { padding: 14px 16px; }
  .fact dt { font-size: 14px; }
}

/* Sections --------------------------------------------------------------- */

.section { padding-block: 88px 96px; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--cocoa); color: var(--dark-text); }
.section--dark :focus-visible { outline-color: var(--honey); }

.section-title { font-size: clamp(30px, 3.6vw, 44px); }
.section-lead { max-width: 36em; margin-top: 12px; color: var(--cocoa-2); }

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head--split > div:first-child { flex: 1 1 420px; min-width: 0; }

@media (max-width: 640px) {
  .section { padding-block: 48px 56px; }
}

/* Filter chips ------------------------------------------------------------ */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--chip-border);
  border-radius: 999px;
  background: #fff;
  color: var(--cocoa);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip-count { font-weight: 600; opacity: .8; }

@media (max-width: 640px) {
  .chips {
    flex-wrap: nowrap;
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chip { flex: none; min-height: 44px; font-size: 15px; }
}

/* Product cards ----------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 30, 0, .05);
}

.product-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  cursor: zoom-in;
}
.product-photo picture,
.product-photo img { width: 100%; height: 100%; }
.product-photo img { object-fit: contain; }

.zoom-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  color: var(--cocoa);
  transition: background-color .15s, color .15s;
}
.product-photo:hover .zoom-icon { border-color: var(--cocoa); background: var(--cocoa); color: #fff; }

.product-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
}
.product-cat { font-size: 14px; font-weight: 800; line-height: 1.3; color: var(--accent-dark); }
.product-title { margin-top: 4px; font-size: 23px; font-weight: 800; line-height: 1.2; }

.color-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FBF5EA;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cocoa-2);
}
.dots { display: inline-flex; gap: 3px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; }
.dots span:nth-child(1) { background: #EE7FA6; }
.dots span:nth-child(2) { background: #F5C542; }
.dots span:nth-child(3) { background: #86BE4F; }
.dots span:nth-child(4) { background: #F2913D; }
.dot-white { width: 10px; height: 10px; border: 1.5px solid #CDB89A; border-radius: 50%; background: #fff; }

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 18px 0 0;
}
.specs div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.specs dt { font-size: 14px; line-height: 1.3; color: var(--muted); }
.specs dd { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.35; }

.product-cta { margin-top: auto; padding-top: 22px; }

/* Phones: one card per row, photo across the full width (it sells the product) */
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
  .product-card { border-radius: 18px; }
  .product-photo { padding: 8px; }
  .product-body { padding: 16px 16px 18px; }
  .product-title { font-size: 22px; }
  .specs { gap: 12px 14px; margin-top: 16px; }
  .product-cta { padding-top: 18px; }
}

/* Wholesale band */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding: 28px clamp(20px, 3vw, 36px);
  border-radius: 20px;
  background: var(--cocoa);
  color: var(--dark-text);
}
.cta-band > div { flex: 1 1 380px; min-width: 0; }
.cta-band-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.25; }
.cta-band-text { margin-top: 6px; font-size: 17px; color: var(--dark-muted); }
.cta-band :focus-visible { outline-color: var(--honey); }

@media (max-width: 640px) {
  .cta-band .btn { width: 100%; }
}

/* About ------------------------------------------------------------------- */

.about-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; }

.emblem-card {
  flex: 1 1 320px;
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  text-align: center;
}
.emblem-card img { width: 100%; max-width: 300px; margin-inline: auto; }
.emblem-title { margin-top: 20px; font-family: var(--font-display); font-size: 26px; font-weight: 900; line-height: 1.2; }
.emblem-caption { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--muted); }

.about-text { flex: 1 1 520px; min-width: 0; }
.about-text > p { max-width: 36em; margin-top: 14px; line-height: 1.7; color: var(--cocoa-2); }
.about-text > h2 + p { margin-top: 20px; }

.timeline { margin: 36px 0 0; padding: 0; list-style: none; }
.timeline li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline-year { font-family: var(--font-display); font-size: 26px; font-weight: 900; line-height: 1.2; color: var(--accent-dark); }
.timeline-title { display: block; font-size: 18px; line-height: 1.4; }
.timeline-text { display: block; margin-top: 2px; font-size: 16px; line-height: 1.55; color: var(--muted); }

@media (max-width: 640px) {
  .about-grid { gap: 32px; }
  .emblem-card { padding: 24px; }
  .timeline li { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .timeline-year { font-size: 20px; }
}

/* Awards ------------------------------------------------------------------ */

.awards-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.awards-photo {
  flex: 1 1 440px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
}
.awards-photo img { width: 100%; border-radius: 14px; }
.awards-text { flex: 1 1 420px; min-width: 0; }

.check-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.check {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF0C2;
  color: #7A5300;
}
.check-list strong { display: block; font-size: 18px; line-height: 1.4; }
.check-list .sub { display: block; font-size: 16px; color: var(--muted); }

@media (max-width: 640px) {
  .awards-grid { gap: 32px; }
  .awards-photo { padding: 12px; border-radius: 20px; }
}

/* Contacts ---------------------------------------------------------------- */

.contacts-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.contacts-text { flex: 1 1 440px; min-width: 0; }
.contacts-text > p { max-width: 34em; margin-top: 20px; line-height: 1.7; color: var(--dark-muted); }
.contacts-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.contact-list {
  flex: 1 1 400px;
  min-width: 0;
  padding: 8px 28px;
  border-radius: 24px;
  background: var(--dark-panel);
}
.contact-item { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--dark-line); }
.contact-item:last-child { border-bottom: 0; }
.contact-icon { flex: none; padding-top: 2px; color: var(--honey); }
.contact-label { display: block; font-size: 15px; color: var(--dark-label); }
.contact-value { display: block; font-size: 18px; font-weight: 700; line-height: 1.5; color: var(--dark-text); }
.contact-item a {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--dark-link);
  text-decoration: none;
}
.contact-item a:hover { color: #FFE7B3; text-decoration: underline; }

.lead-notice { margin-bottom: 32px; padding: 16px 20px; border-radius: 14px; font-weight: 700; }
.lead-notice--ok { background: #E6F2DF; color: #1F4D1F; }
.lead-notice--error { background: #FDECEA; color: #8C1D18; }

@media (max-width: 640px) {
  .contact-list { padding: 4px 18px; border-radius: 20px; }
  .contacts-actions .btn { width: 100%; }
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid #4A3B2C;
  background: var(--cocoa);
  color: var(--dark-label);
  font-size: 15px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { flex: none; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.footer-langs { display: flex; gap: 4px; }
.site-footer a { display: inline-block; padding: 10px 4px; color: var(--dark-label); text-decoration: none; }
.site-footer a:hover { color: var(--dark-text); text-decoration: underline; }
.site-footer a[aria-current="page"] { font-weight: 800; color: var(--dark-text); }
.site-footer :focus-visible { outline-color: var(--honey); }

/* Text pages ------------------------------------------------------------- */

.page-section { padding-top: 56px; }
.prose { max-width: 800px; }
.prose h1 { font-size: clamp(32px, 4vw, 48px); }
.prose h2 { margin-top: 40px; font-size: 26px; font-weight: 800; }
.prose p,
.prose li { margin-top: 12px; line-height: 1.7; color: var(--cocoa-2); }
.prose ul { margin: 0; padding-left: 1.2em; }
.updated { color: var(--muted); font-size: 16px; }

.notfound { text-align: center; }
.notfound-code { font-family: var(--font-display); font-size: clamp(80px, 14vw, 140px); font-weight: 900; line-height: 1; color: var(--honey); }
.notfound h1 { margin-top: 12px; font-size: clamp(30px, 4vw, 44px); }
.notfound-text { max-width: 32em; margin: 16px auto 28px; color: var(--cocoa-2); }

/* Dialogs ------------------------------------------------------------------ */

dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
dialog::backdrop { background: rgba(43, 31, 20, .72); }

/* Photo lightbox */
.lightbox { width: 100vw; height: 100dvh; margin: 0; }
.lightbox::backdrop { background: rgba(43, 31, 20, .9); }
.lightbox-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 72px 24px 24px;
}
.lightbox-close { position: absolute; top: 16px; right: 16px; background: #fff; }
.lightbox-figure {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0;
  padding: 16px 16px 18px;
  border-radius: 20px;
  background: #fff;
}
.lightbox-figure img {
  width: 100%;
  max-height: calc(100dvh - 220px);
  object-fit: contain;
  border-radius: 12px;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--cocoa);
  box-shadow: 0 4px 12px rgba(60, 30, 0, .18);
  transform: translateY(-50%);
  cursor: pointer;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 14px;
  padding: 0 4px;
}
.lightbox-caption { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.3; }
.lightbox-count { font-size: 15px; font-weight: 700; color: var(--muted); }

@media (max-width: 640px) {
  .lightbox-inner { padding: 72px 12px 12px; }
  .lightbox-figure { padding: 10px 10px 14px; }
  .lightbox-caption { font-size: 18px; }
}

/* Lead form */
.lead-dialog {
  width: min(920px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(20, 10, 0, .35);
}
.lead-card { display: flex; flex-wrap: wrap; align-items: stretch; }

.lead-side {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 28px;
  background: var(--cream);
}
.lead-side-block { display: flex; flex-direction: column; gap: 18px; }
.lead-side-photo {
  aspect-ratio: 4 / 3;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.lead-side-photo img { width: 100%; height: 100%; object-fit: contain; }
.lead-side-title { margin-top: 4px; font-family: var(--font-display); font-size: 23px; font-weight: 800; line-height: 1.2; }
.lead-side-color { margin-top: 4px; font-size: 15px; color: var(--cocoa-2); }
.lead-side .specs { margin-top: 0; gap: 12px; }
.lead-side-phone { margin-top: auto; padding-top: 18px; border-top: 1px solid #EBDDC4; }
.lead-side-phone p { font-size: 14px; color: var(--muted); }
.lead-side-phone a { font-size: 18px; font-weight: 800; text-decoration: none; }

.check-list--small { gap: 12px; margin: 0; }
.check-list--small li { gap: 10px; padding: 0; border: 0; background: none; font-size: 16px; line-height: 1.45; }
.check-list--small .check { width: 26px; height: 26px; background: #fff; }

.lead-main { flex: 1 1 420px; min-width: 0; padding: 32px 36px 36px; }
.lead-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lead-head h2 { font-size: 32px; }
.lead-head p { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--cocoa-2); }

.lead-form { display: flex; flex-direction: column; gap: 20px; margin-top: 18px; }
.lead-switch { font-size: 15px; line-height: 1.5; color: var(--cocoa-2); }
.lead-switch .link-btn { font-size: 15px; }

.form-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FDECEA;
  color: #8C1D18;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.form-summary .icon { margin-top: 1px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
/* label / input / error rows line up across columns even when one label wraps */
.form-grid > .field { grid-row: span 3; display: grid; grid-template-rows: subgrid; row-gap: 6px; align-content: start; }
.form-grid > .field > label { align-self: end; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label,
.field legend { padding: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.field legend { margin-bottom: 8px; }
.optional { font-weight: 500; color: var(--muted); }

.input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  background: #fff;
  font-size: 17px;
  color: var(--cocoa);
}
select.input { padding: 0 12px; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input::placeholder { color: #9A8874; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(194, 82, 27, .22); }
.input[aria-invalid="true"] { border-color: var(--error); }

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--error);
}

.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 2px solid var(--chip-border);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.option-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option-chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--cocoa-2); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent + .field-error { margin-left: 32px; }

.lead-product-summary { display: none; }
.lead-submit { padding-top: 4px; }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.lead-success { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px 0 24px; }
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E6F2DF;
  color: #2F6B2F;
}
.lead-success-title { font-family: var(--font-display); font-size: 28px; font-weight: 900; line-height: 1.2; }
.lead-success-title:focus { outline: none; }
.lead-success-text { max-width: 32em; font-size: 18px; line-height: 1.6; color: var(--cocoa-2); }
.lead-success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Full-screen form on phones */
@media (max-width: 760px) {
  .lead-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .lead-side { display: none; }
  .lead-main { padding: 20px 16px 0; }
  .lead-head h2 { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .lead-product-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #FFFBF3;
    font-size: 15px;
    line-height: 1.4;
    color: var(--cocoa-2);
  }
  .lead-product-summary img { flex: none; width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; }
  .lead-submit {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -16px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .lead-submit .btn,
  .lead-success-actions .btn { width: 100%; }
}
