/* ============================================================
   RoofsExpert — общая дизайн-система
   Палитра: «Черепичная терракота»
   ============================================================ */

:root {
  /* colors */
  --primary:      #2B2622;  /* графит */
  --primary-700:  #3A332D;
  --primary-600:  #4A4139;
  --accent:       #C25433;  /* терракота */
  --accent-600:   #A8421F;
  --accent-700:   #8E3517;
  --accent-soft:  #F6E7E0;
  --accent-softer:#FBF2EE;
  --bg:           #F7F3EF;
  --surface:      #FFFFFF;
  --surface-2:    #FBF8F5;
  --text:         #241F1B;
  --muted:        #6E635A;
  --muted-2:      #968B81;
  --border:       #ECE3DB;
  --border-2:     #E0D6CC;
  --ok:           #2F8F62;
  --star:         #E0A82E;

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* shadow (warm) */
  --sh-sm: 0 1px 2px rgba(43,38,34,.05), 0 1px 3px rgba(43,38,34,.06);
  --sh-md: 0 4px 14px rgba(43,38,34,.07), 0 2px 5px rgba(43,38,34,.05);
  --sh-lg: 0 18px 50px rgba(43,38,34,.13), 0 6px 16px rgba(43,38,34,.07);

  /* layout */
  --container: 1200px;
  --gutter: 24px;

  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4,h5 { font-family: var(--font-head); margin: 0; line-height: 1.12; letter-spacing: -.02em; color: var(--primary); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  border: 1.5px solid transparent; border-radius: var(--r-sm);
  padding: 13px 22px; transition: .16s ease; white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-700); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* ============ chips / badges ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 7px 13px; border-radius: 999px;
}
.eyebrow.on-dark { color: #F0C3B2; background: rgba(194,84,51,.18); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: 11px; padding: 5px 10px; border-radius: 6px; letter-spacing: .02em; }
.badge-hit { background: var(--accent); color: #fff; }
.badge-new { background: var(--ok); color: #fff; }
.badge-sale { background: #B5453E; color: #fff; }
.badge-stock { background: var(--accent-soft); color: var(--accent-700); }

/* ============ section headers ============ */
.section { padding: 76px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: var(--surface); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.sec-head .t h2 { font-size: 38px; font-weight: 800; }
.sec-head .t p { color: var(--muted); margin-top: 12px; max-width: 560px; font-size: 16px; }
.sec-head .t .eyebrow { margin-bottom: 16px; }

/* ============ generic card ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }

/* ============ image placeholders ============ */
.ph {
  position: relative; overflow: hidden; background: var(--surface-2);
  border: 1px dashed var(--border-2); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-family: ui-monospace, "SF Mono", monospace; font-size: 12px;
  text-align: center; letter-spacing: .02em;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(194,84,51,.04) 0 10px, transparent 10px 20px);
}
.ph span { position: relative; z-index: 1; padding: 8px 12px; }
.ph.dark { background: var(--primary); border-color: var(--primary-600); color: rgba(255,255,255,.7); }
.ph.dark::before { background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px); }

/* ============ logo ============ */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo .mark { width: 42px; height: 42px; display: block; flex: none; }
.logo .m-roof { fill: var(--primary); }
.logo .m-acc { fill: var(--accent); }
.logo .wm-name { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: -.025em; color: var(--primary); line-height: 1; }
.logo .wm-name b { color: var(--accent); font-weight: 800; }
.logo .wm-sub { font-size: 10px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; font-family: var(--font-body); }
.logo.on-dark .m-roof { fill: #fff; }
.logo.on-dark .wm-name { color: #fff; }
.logo.on-dark .wm-sub { color: rgba(255,255,255,.55); }

/* ============ top bar ============ */
.topbar { background: var(--primary); color: rgba(255,255,255,.82); font-size: 13.5px; }
.topbar .container { display: flex; align-items: center; gap: 26px; height: 44px; }
.topbar a { color: rgba(255,255,255,.82); transition: .15s; }
.topbar a:hover { color: #fff; }
.topbar .tb-city { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: #fff; white-space: nowrap; }
.topbar .tb-city svg { width: 15px; height: 15px; flex: none; }
.topbar .tb-spacer { margin-left: auto; }
.topbar .tb-links { display: flex; gap: 22px; }
.topbar .ico { width: 15px; height: 15px; opacity: .8; }

/* ============ header ============ */
.header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; align-items: center; gap: 28px; height: 80px; min-width: 0; }
.logo { min-width: 0; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: 8px; }
.nav a { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--text); padding: 6px 0; position: relative; transition: .15s; }
.nav a:hover, .nav a.active { color: var(--accent); }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -28px; height: 3px; background: var(--accent); border-radius: 3px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.h-phone { text-align: right; }
.h-phone .num { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--primary); letter-spacing: -.01em; }
.h-phone .lbl { font-size: 11.5px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); border: 1.5px solid var(--border-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); position: relative; transition: .15s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .cnt { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-head); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.burger { display: none; width: 46px; height: 46px; border-radius: var(--r-sm); border: 1.5px solid var(--border-2); background: var(--surface); flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.burger i { width: 20px; height: 2px; background: var(--primary); border-radius: 2px; display: block; }

/* ============ breadcrumbs ============ */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); padding: 20px 0; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--muted-2); }
.crumbs .cur { color: var(--text); }

/* ============ product card ============ */
.p-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: .18s; }
.p-card:hover { box-shadow: var(--sh-md); border-color: var(--border-2); transform: translateY(-2px); }
.p-card .p-media { aspect-ratio: 4/3; position: relative; }
.p-card .p-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.p-card .p-fav { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.92); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); z-index: 2; }
.p-card .p-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.p-card .p-cat { font-size: 12px; color: var(--muted-2); font-weight: 500; }
.p-card .p-name { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: var(--text); line-height: 1.3; }
.p-card .p-name:hover { color: var(--accent); }
.p-card .p-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.p-card .p-foot { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 8px; }
.p-card .p-price { font-family: var(--font-head); font-weight: 800; font-size: 21px; color: var(--primary); white-space: nowrap; line-height: 1; }
.p-card .p-price small { font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.p-card .p-old { font-size: 13px; color: var(--muted-2); text-decoration: line-through; margin-right: 6px; white-space: nowrap; }

/* ============ footer ============ */
.footer { background: var(--primary); color: rgba(255,255,255,.7); padding: 60px 0 0; margin-top: 8px; }
.footer .f-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer h5 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 18px; letter-spacing: 0; }
.footer .f-links { display: flex; flex-direction: column; gap: 11px; }
.footer .f-links a { font-size: 14.5px; transition: .15s; }
.footer .f-links a:hover { color: #fff; }
.footer .f-about { font-size: 14px; line-height: 1.6; margin: 16px 0 20px; color: rgba(255,255,255,.6); }
.footer .f-contact { display: flex; flex-direction: column; gap: 14px; }
.footer .f-contact .fc-num { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: #fff; }
.footer .f-contact .fc-row { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.footer .f-contact .fc-row svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--accent); }
.footer .f-socials { display: flex; gap: 10px; margin-top: 4px; }
.footer .f-socials a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; color: #fff; transition: .15s; }
.footer .f-socials a:hover { background: var(--accent); border-color: var(--accent); }
.footer .f-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 13px; color: rgba(255,255,255,.5); flex-wrap: wrap; }
.footer .f-bottom a:hover { color: #fff; }

/* ============ callback / cta form ============ */
.cta-block { background: var(--primary); border-radius: var(--r-xl); padding: 48px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.cta-block::after { content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(194,84,51,.4), transparent 70%); }
.cta-block .cta-t { position: relative; z-index: 1; }
.cta-block h2 { color: #fff; font-size: 32px; font-weight: 800; }
.cta-block p { color: rgba(255,255,255,.72); margin-top: 14px; font-size: 16px; }
.cta-form { position: relative; z-index: 1; display: grid; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; font-family: var(--font-head); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: #fff; border: 1.5px solid var(--border-2); border-radius: var(--r-sm);
  padding: 13px 15px; width: 100%; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cta-form .field input { background: #fff; }
.form-note { font-size: 12px; color: rgba(255,255,255,.5); }
.cta-form .form-note a { color: rgba(255,255,255,.7); text-decoration: underline; }

/* ============ misc utilities ============ */
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
.muted { color: var(--muted); }
.hide-desktop { display: none !important; }
.show-on-mobile { display: none !important; }

/* ============ mobile drawer ============ */
.mobile-drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.mobile-drawer.open { visibility: visible; }
.mobile-drawer .md-overlay { position: absolute; inset: 0; background: rgba(36,31,27,.5); opacity: 0; transition: .25s; }
.mobile-drawer.open .md-overlay { opacity: 1; }
.mobile-drawer .md-panel { position: absolute; top: 0; right: 0; height: 100%; width: 320px; max-width: 86vw; background: var(--surface); box-shadow: var(--sh-lg); transform: translateX(100%); transition: .26s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; padding: 22px; gap: 18px; z-index: 2; }
.mobile-drawer.open .md-panel { transform: translateX(0); }
.md-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.md-close { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--border-2); background: var(--surface); font-size: 18px; color: var(--muted); }
.md-nav { display: flex; flex-direction: column; gap: 4px; }
.md-nav a { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--text); padding: 12px 12px; border-radius: var(--r-sm); }
.md-nav a.active, .md-nav a:hover { background: var(--accent-softer); color: var(--accent); }
.md-phone { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--primary); margin-top: auto; }

/* stars */
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .footer .f-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .sec-head .t h2 { font-size: 32px; }
}
@media (max-width: 880px) {
  .nav, .topbar .tb-links, .h-phone { display: none; }
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: inline-flex !important; }
  .burger { display: flex; }
  .header .container { gap: 14px; }
  .header-right { gap: 10px; }
  .g-4 { grid-template-columns: repeat(2,1fr); }
  .g-3 { grid-template-columns: repeat(2,1fr); }
  .cta-block { grid-template-columns: 1fr; padding: 34px 26px; }
  .section { padding: 52px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .sec-head .t h2 { font-size: 27px; }
  .hide-desktop { display: revert !important; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .g-4, .g-3, .g-2 { grid-template-columns: 1fr; }
  .topbar .container { gap: 14px; }
  .topbar .tb-spacer { display: none; }
  .h-phone .num { font-size: 16px; }
  .header .container { height: 64px; gap: 10px; }
  .logo .mark { width: 34px; height: 34px; }
  .logo .wm-name { font-size: 17px; }
  .logo .wm-sub { display: none; }
  .icon-btn.search-btn { display: none; }
  .sec-head .t h2 { font-size: 24px; }
  .footer .f-top { grid-template-columns: 1fr; }
  .cta-block h2 { font-size: 25px; }
}

/* ============ overflow hardening (mobile) ============
   Prevents horizontal scroll on small screens:
   1f tracks need min-width:0 so they don't inflate to min-content,
   off-canvas drawer is clipped, content rows wrap. */
html, body { overflow-x: clip; max-width: 100%; }
.mobile-drawer { overflow: hidden; }
@media (max-width: 980px) {
  .shop, .pdp { min-width: 0; }
  .shop > *, .pdp > * { min-width: 0; }
}
@media (max-width: 880px) {
  /* catalog toolbar — let controls wrap instead of overflowing */
  .toolbar-right { flex-wrap: wrap; row-gap: 10px; }
  .sort-select { flex: 1 1 160px; min-width: 0; }
  /* product gallery thumbnails — wrap on narrow screens */
  .g-thumbs { flex-wrap: wrap; }
}

/* ============ CTA + CF7 mobile hardening (3970 hotfix, 2026-06-15) ============
   Fixes: CTA-карточка и CF7 формы вылетали за правый край на 360/390/414.
   CF7 (плагин) не уважает контейнер — даём width:100% + box-sizing + iOS 16px no-zoom. */

.cta-block,
.form-card,
.cat-aside,
.buy-box,
.aside-card { box-sizing: border-box; max-width: 100%; min-width: 0; }
.cta-block h2,
.cta-block p,
.form-card h2,
.form-card p { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }

/* CF7 — общее (на всех ширинах) */
.wpcf7,
.wpcf7 form,
.wpcf7-form { max-width: 100%; box-sizing: border-box; }
.wpcf7 form p,
.wpcf7 form label { display: block; max-width: 100%; box-sizing: border-box; }
.wpcf7 form input,
.wpcf7 form textarea,
.wpcf7 form select,
.wpcf7-form-control { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; font-size: 16px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 8px; background: #fff; color: var(--text); font-family: inherit; }
.wpcf7 form textarea { min-height: 96px; resize: vertical; }
.wpcf7 form input[type="submit"],
.wpcf7 form button[type="submit"],
.wpcf7-submit { background: var(--accent); color: #fff; border: 0; font-family: var(--font-head); font-weight: 700; cursor: pointer; padding: 14px 28px; width: auto !important; }
.wpcf7 form input[type="submit"]:hover,
.wpcf7-submit:hover { background: var(--accent-600); }
.wpcf7 .req { color: var(--accent); margin-left: 2px; }
.wpcf7 .wpcf7-acceptance { display: block; margin: 8px 0; }
.wpcf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-acceptance input { width: auto !important; vertical-align: middle; margin-right: 6px; }
.wpcf7 .wpcf7-acceptance a { color: var(--accent); }
.wpcf7-response-output,
.wpcf7 .screen-reader-response { max-width: 100%; box-sizing: border-box; }

/* Inputs внутри dark CTA-блока */
.cta-block .wpcf7 form input,
.cta-block .wpcf7 form textarea,
.cta-block .wpcf7 form select { background: #fff; color: var(--text); }
.cta-block .wpcf7 form label { color: #fff; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.cta-block .wpcf7 .wpcf7-acceptance,
.cta-block .wpcf7 .wpcf7-acceptance a { color: rgba(255,255,255,.78); }

@media (max-width: 880px) {
  .cta-block { padding: 32px 22px; }
  .cta-block h2 { font-size: 24px; }
}
@media (max-width: 560px) {
  .cta-block { padding: 24px 18px; border-radius: var(--r-lg); }
  .cta-block h2 { font-size: 22px; line-height: 1.2; }
  .cta-block p { font-size: 14.5px; }
  .form-card { padding: 22px 18px; }
  .wpcf7 form input[type="submit"],
  .wpcf7 form button[type="submit"],
  .wpcf7-submit { width: 100% !important; padding: 14px; font-size: 15px; }
}
@media (max-width: 414px) {
  .cta-block { padding: 22px 16px; }
  .cta-block h2 { font-size: 20px; }
}

/* ============ Icons / Search / Favorite / Callback Modal (3970 hotfix 2026-06-15) ============ */

/* 1. Видимость SVG-иконок в шапке (currentColor → графит на белой шапке) */
.header .icon-btn { color: var(--primary); }
.header .icon-btn svg { stroke: currentColor; }
.header .icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.header .icon-btn .cnt { background: var(--accent); color: #fff; }

/* 2. Избранное — скрыто на всех брейкпоинтах (вернём в фазе 2 с WooCommerce) */
.icon-btn[aria-label="Избранное"],
.icon-btn-fav { display: none !important; }

/* 3. Search dropdown */
.search-dropdown {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translate(-50%, -14px);
  width: min(560px, calc(100% - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.search-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.search-dropdown__form { display: flex; gap: 8px; }
.search-dropdown__form input[type="search"] {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.search-dropdown__form input:focus { outline: none; border-color: var(--accent); }
.search-dropdown__form button {
  background: var(--accent); color: #fff; border: 0;
  padding: 0 18px; border-radius: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  cursor: pointer;
}
.search-dropdown__form button:hover { background: var(--accent-600); }

/* 4. Callback modal */
.cb-modal {
  position: fixed; inset: 0; z-index: 300;
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.cb-modal.open { visibility: visible; opacity: 1; }
.cb-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(36, 31, 27, .55);
  backdrop-filter: blur(2px);
}
.cb-modal__panel {
  position: relative;
  max-width: 440px; width: calc(100% - 32px);
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 32px 28px 28px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
}
.cb-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  font-size: 20px; line-height: 1; color: var(--muted);
  cursor: pointer; border-radius: 50%;
}
.cb-modal__close:hover { background: var(--accent-softer); color: var(--accent); }
.cb-modal__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: 22px; margin: 0 0 6px;
  color: var(--text);
}
.cb-modal__sub {
  color: var(--muted); font-size: 14px;
  margin: 0 0 18px;
}
.cb-modal .wpcf7 form p { margin: 0 0 12px; }
.cb-modal .wpcf7 form label {
  display: block;
  font-size: 13.5px; font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.cb-modal .req { color: var(--accent); margin-left: 2px; }
.cb-modal .wpcf7 form input {
  width: 100% !important; max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: #fff; color: var(--text); font-family: inherit;
}
.cb-modal .wpcf7 form input:focus { outline: none; border-color: var(--accent); }
.cb-modal .wpcf7 form input[type="submit"],
.cb-modal .wpcf7-submit-callback {
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
  font-family: var(--font-head) !important;
  font-weight: 700 !important;
  padding: 14px !important;
  margin-top: 6px;
  cursor: pointer;
}
.cb-modal .wpcf7 form input[type="submit"]:hover { background: var(--accent-600) !important; }
.cb-modal .wpcf7-response-output {
  margin: 12px 0 0 !important;
  padding: 10px 12px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
}
.cb-modal .wpcf7 .wpcf7-not-valid-tip { font-size: 12px; color: #B5453E; margin-top: 4px; }

/* mobile */
@media (max-width: 560px) {
  .cb-modal__panel { padding: 28px 20px 20px; }
  .cb-modal__title { font-size: 20px; }
  .search-dropdown { top: 60px; width: calc(100% - 16px); padding: 10px; }
  .search-dropdown__form input[type="search"] { padding: 10px 12px; }
}

/* ============ Header layout patch (founder 2026-06-15) ============
   Fix 1: подпись логотипа разрывается → flex column + nowrap для name/sub
   Fix 2: пункты nav «О компании» / «Доставка и оплата» переносятся → nowrap
          + порог сворачивания в бургер с 880 на 1040px */

.logo .wm { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.logo .wm-name { white-space: nowrap; }
.logo .wm-sub { display: block; white-space: nowrap; }

.nav a { white-space: nowrap; }

@media (max-width: 1040px) {
  .nav, .topbar .tb-links, .h-phone { display: none; }
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: inline-flex !important; }
  .burger { display: flex; }
  .header .container { gap: 14px; }
  .header-right { gap: 10px; }
}
