/* ===== Открытая дверь — Аренда мед. оборудования и сиделки в Оренбурге ===== */

:root {
  --brand: #16adad;           /* фирменный бирюзовый «Открытая дверь» */
  --brand-700: #0c8a8a;
  --brand-50: #e7f7f6;
  --brand-100: #d3efee;
  --bg: #ffffff;
  --bg-soft: #f6f4ee;         /* мягкий кремовый фон секций */
  --bg-card: #faf8f2;         /* карточка категории */
  --text: #1a2330;
  --text-soft: #5b6470;
  --line: #e7e3d8;
  --line-strong: #cfc9bb;
  --accent: #d96b4a;          /* тёплый акцент (CTA / новинки) */
  --shadow: 0 10px 30px rgba(20, 40, 50, 0.08);
  --shadow-soft: 0 4px 16px rgba(20, 40, 50, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1240px;
  --gap: 24px;
  --font-display: "Cormorant Garamond", "Playfair Display", "Times New Roman", serif;
  --font-sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand); }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 5vw, 60px); letter-spacing: -.02em; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.01em; }
h3 { font-size: clamp(20px, 2vw, 24px); }
h4 { font-size: 18px; }
p  { margin: 0 0 1em; }
.italic { font-style: italic; font-family: var(--font-display); font-weight: 400; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-bg-soft { background: var(--bg-soft); }
.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--text-soft); font-size: 17px; max-width: 720px; margin: 0 0 36px; }

/* ===== Header ===== */
.topbar {
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 36px; gap: 20px;
}
.topbar a { color: #fff; opacity: .92; }
.topbar a:hover { opacity: 1; color: #fff; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 32px;
  height: 80px;
}
.brand-logo { display: flex; align-items: center; gap: 12px; }
.brand-logo img { height: 56px; width: auto; }
.brand-logo .brand-text-block { display: none; }

.main-nav {
  display: flex; gap: 22px; flex: 1; flex-wrap: nowrap;
}
.main-nav a {
  color: var(--text); font-weight: 500; font-size: 15px;
  position: relative; padding: 6px 0; white-space: nowrap;
}
.main-nav a.active,
.main-nav a:hover { color: var(--brand); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone {
  display: flex; flex-direction: column; line-height: 1.1; font-size: 13px;
  color: var(--text-soft);
}
.header-phone strong { color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.header-phone a { color: inherit; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: all .2s ease; cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-700); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #c1583a; color: #fff; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* burger */
.burger { display: none; background: none; border: 0; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-50); color: var(--brand-700);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
  text-transform: uppercase; letter-spacing: .06em;
}
.hero-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent-italic { color: var(--brand-700); font-style: italic; }
.hero-lead { font-size: 18px; color: var(--text-soft); margin-bottom: 32px; max-width: 540px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-trust {
  display: flex; gap: 28px; flex-wrap: wrap; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-trust div strong { display: block; font-family: var(--font-display); font-size: 32px; color: var(--brand-700); font-weight: 600; }
.hero-trust div span { font-size: 13px; color: var(--text-soft); }

.hero-image {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: 24px; bottom: 24px;
  background: #fff; padding: 16px 20px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-soft);
}
.hero-badge .icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.hero-badge strong { display: block; font-size: 14px; }
.hero-badge span { font-size: 12px; color: var(--text-soft); }

/* ===== Categories grid ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column;
  min-height: 280px;
  height: 100%;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid transparent;
}
.why-card { height: 100%; }
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand-100);
}
.cat-card-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.cat-card-price { color: var(--brand-700); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.cat-card-img {
  margin-top: auto;
  height: 160px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid; place-items: center;
}
.cat-card-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.cat-card-arrow {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
  color: var(--text);
}
.cat-card:hover .cat-card-arrow { background: var(--brand); color: #fff; }
.cat-card.cat-card-lg { grid-column: span 2; }

/* Текстовые плитки категорий (без фото) */
.cat-card.cat-card-flat { min-height: 0; padding: 28px; justify-content: flex-start; }
.cat-card.cat-card-flat .cat-card-price { margin-bottom: 20px; }
.cat-card.cat-card-flat .cat-card-more {
  margin-top: auto; color: var(--brand-700); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-card.cat-card-flat:hover .cat-card-more { color: var(--brand); }

/* Иконки-логотипы мессенджеров */
.float-actions a svg, .social-icon svg { width: 26px; height: 26px; display: block; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
}
.social-icon svg { width: 20px; height: 20px; }

/* ===== Why us ===== */
.why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  position: relative;
}
.why-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px dashed var(--line-strong);
  display: grid; place-items: center;
  pointer-events: none;
}
.why-center span {
  font-family: var(--font-display);
  font-size: 36px; font-style: italic; color: var(--brand-700);
}
.why-card {
  background: var(--bg-soft); padding: 28px; border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
}
.why-card:nth-child(2), .why-card:nth-child(4) { margin-left: 140px; }
.why-card:nth-child(3), .why-card:nth-child(5) { margin-right: 140px; }
.why-num { font-family: var(--font-display); color: var(--brand-700); font-size: 18px; font-style: italic; }
.why-title { font-size: 18px; font-weight: 600; }
.why-card p { font-size: 14px; color: var(--text-soft); margin: 0; }

/* ===== Steps ===== */
.steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.step-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50);
  color: var(--brand-700); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin-bottom: 16px;
}
.step-card h4 { margin: 0 0 8px; font-size: 17px; }
.step-card p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ===== Sidelka / Service block ===== */
.service-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 56px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.service-card-img {
  aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
}
.service-card-img img { width: 100%; height: 100%; object-fit: cover; }
.service-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.service-list li { padding-left: 24px; position: relative; font-size: 15px; color: var(--text); }
.service-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand);
  font-weight: 700;
}

/* ===== Reviews ===== */
.reviews-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.review-card {
  background: var(--bg-soft); padding: 28px; border-radius: var(--radius);
  display: flex; flex-direction: column;
}
.review-stars { color: #e3a248; margin-bottom: 12px; }
.review-text { font-size: 15px; margin-bottom: 20px; flex: 1; }
.review-author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-author .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 600; }
.review-author strong { display: block; font-size: 14px; }
.review-author span { font-size: 12px; color: var(--text-soft); }

/* ===== Certificates (store grid + office photos) ===== */
.cert-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.cert-card {
  aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-soft); display: grid; place-items: center;
  padding: 16px; transition: transform .2s;
  cursor: pointer;
}
.cert-card:hover { transform: scale(1.03); }
.cert-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cert-placeholder { color: var(--text-soft); text-align: center; font-size: 13px; padding: 8px; }

/* ===== Licenses slider ===== */
.cert-slider { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.cert-viewport { overflow: hidden; flex: 1 1 auto; }
.cert-track { display: flex; gap: 18px; transition: transform .45s cubic-bezier(.4,0,.2,1); will-change: transform; }
.cert-slide {
  flex: 0 0 calc((100% - 36px) / 3); /* 3 per view, 2 gaps of 18px */
  margin: 0; aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line);
  cursor: zoom-in; box-shadow: var(--shadow-soft);
}
.cert-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.cert-slide:hover img { transform: scale(1.05); }
.cert-arrow {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-soft); transition: background .2s, color .2s, opacity .2s;
}
.cert-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.cert-arrow:disabled { opacity: 0; pointer-events: none; }
.cert-dots { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
.cert-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line-strong); cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.cert-dot.active { background: var(--brand); transform: scale(1.25); }
.cert-dots:empty { display: none; }

/* ===== Lightbox (full-size document view) ===== */
.cert-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(18,22,28,.88); display: none; align-items: center; justify-content: center; padding: 24px; }
.cert-lightbox.open { display: flex; }
.cert-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.cert-lb-btn { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.cert-lb-btn:hover { background: rgba(255,255,255,.28); }
.cert-lb-close { top: 18px; right: 22px; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; }
.cert-lb-prev, .cert-lb-next { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; font-size: 30px; }
.cert-lb-prev { left: 20px; }
.cert-lb-next { right: 20px; }

/* ===== Partners ===== */
.partners-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.partner-card {
  background: var(--bg-soft); padding: 28px; border-radius: var(--radius);
  text-align: center; display: block; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand-100);
}
.partner-card h4 { font-family: var(--font-display); font-size: 22px; color: var(--brand-700); margin: 0 0 6px; }
.partner-card p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-soft); border-radius: var(--radius-sm);
  padding: 0; overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 20px 24px; font-size: 16px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q .ic { font-size: 22px; color: var(--brand); transition: transform .25s; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  padding: 0 24px;
  color: var(--text-soft);
}
.faq-item.open .faq-a { max-height: 800px; padding: 0 24px 22px; }

/* ===== Contact CTA block ===== */
.contact-block {
  background: var(--brand); color: #fff; border-radius: var(--radius);
  padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  align-items: center;
}
.contact-block h2 { color: #fff; font-style: italic; }
.contact-block p { color: rgba(255,255,255,.85); }
.contact-block.contact-solo { grid-template-columns: 1fr; text-align: center; }
.contact-block.contact-solo > div { max-width: 760px; margin: 0 auto; }
.contact-block .contact-lines { margin-top: 24px; display: inline-flex; flex-direction: column; gap: 4px; align-items: center; }
.contact-block .contact-phone {
  color: #fff; font-weight: 700; font-size: 28px; letter-spacing: .01em;
  text-decoration: none; line-height: 1.25;
}
.contact-block .contact-phone:hover { text-decoration: underline; }
.contact-block .contact-meta { color: rgba(255,255,255,.9); font-size: 14px; margin-top: 8px; }
.contact-block .contact-meta a { color: #fff; text-decoration: underline; }
.contact-form { display: grid; gap: 12px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1); color: #fff; font: inherit;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.7); }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid #fff; }

/* ===== Footer ===== */
.footer {
  background: #0e2024; color: #cfd8dc; padding: 64px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer h5 { color: #fff; font-size: 15px; font-weight: 600; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: #cfd8dc; font-size: 14px; }
.footer a:hover { color: var(--brand); }
.footer-logo img { height: 60px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; color: #7d8a8e; flex-wrap: wrap; gap: 8px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  font-size: 13px; color: var(--text-soft); padding: 16px 0; display: flex; gap: 8px;
}
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span { color: var(--text); }

/* ===== Page header (inner pages) ===== */
.page-head {
  background: var(--bg-soft); padding: 56px 0 64px;
}
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--text-soft); max-width: 760px; font-size: 17px; }

/* ===== Catalog ===== */
.catalog-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
  margin-top: 32px;
}
.filter-sidebar {
  background: var(--bg-soft); padding: 24px; border-radius: var(--radius);
  position: sticky; top: 96px;
  height: max-content;
}
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); margin-bottom: 12px; }
.filter-group label { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; cursor: pointer; }
.filter-group input[type="checkbox"], .filter-group input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
.filter-clear { background: none; border: 0; color: var(--brand-700); font-weight: 600; font-size: 13px; padding: 0; }

.catalog-toolbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px;
}
.catalog-toolbar .count { color: var(--text-soft); font-size: 14px; }
.catalog-toolbar select { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; }

.products-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column;
  transition: all .25s ease;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .img-wrap {
  aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-soft); padding: 14px; margin-bottom: 14px;
  display: grid; place-items: center;
}
/* Товар всегда виден целиком (никогда не обрезается): contain вписывает
   всю картинку в квадратную рамку одинакового размера во всех карточках. */
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.product-card .tag {
  display: inline-block; background: var(--brand-50); color: var(--brand-700);
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; align-self: flex-start;
}
.product-card .tag.tag-accent { background: #fbe6dc; color: var(--accent); }
/* Заголовок — ровно 2 строки во всех карточках, подпись — 1 строка.
   За счёт фиксированной высоты блоков цена стоит на одном уровне везде. */
.product-card h3 {
  font-size: 17px; line-height: 1.2; margin-bottom: 6px;
  min-height: calc(1.2em * 2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .brand {
  font-size: 13px; color: var(--text-soft); margin-bottom: 12px;
  line-height: 1.35; min-height: 1.35em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card .price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto;
}
.product-card .price strong { font-size: 18px; color: var(--text); display: block; }
.product-card .price small { font-size: 12px; color: var(--text-soft); }
.product-card .more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand-700);
}
.product-card:hover .more { background: var(--brand); color: #fff; }

/* ===== Product detail page ===== */
.product-layout {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 32px 0 64px;
}
.gallery-main {
  aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-soft); padding: 32px; display: grid; place-items: center;
  margin-bottom: 16px;
}
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 12px; }
.gallery-thumbs button {
  width: 80px; height: 80px; border-radius: 12px; overflow: hidden;
  background: var(--bg-soft); padding: 6px; border: 2px solid transparent;
  display: grid; place-items: center;
}
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-main { cursor: zoom-in; }

/* Лайтбокс — фото на весь экран */
.lightbox {
  position: fixed; inset: 0; background: rgba(15, 23, 25, .92);
  display: none; place-items: center; z-index: 2000; padding: 24px; cursor: zoom-out;
  overflow: auto; -webkit-overflow-scrolling: touch;
}
.lightbox.open { display: grid; }
/* Размер привязан к самому оверлею (position:fixed), а не к vh —
   иначе на мобилке под адресной строкой фото открывается огромным и уходит вверх. */
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; margin: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-close {
  position: fixed; top: 18px; right: 26px; width: 44px; height: 44px;
  background: rgba(255,255,255,.12); border: 0; border-radius: 50%;
  color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox .lb-close:hover { background: rgba(255,255,255,.25); }

.product-info h1 { margin-bottom: 8px; font-size: 38px; }
.product-meta { color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }
.product-meta span { margin-right: 16px; }
.price-box {
  background: var(--bg-soft); border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.price-box h4 { font-size: 14px; text-transform: uppercase; color: var(--text-soft); margin-bottom: 16px; letter-spacing: .05em; }
.price-tier-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px;
}
.price-tier {
  background: #fff; border-radius: 12px; padding: 14px; text-align: center; border: 1px solid var(--line);
}
.price-tier strong { display: block; color: var(--brand-700); font-size: 18px; }
.price-tier small { color: var(--text-soft); font-size: 12px; }
.product-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table td { padding: 14px 0; vertical-align: top; }
.spec-table td:first-child { color: var(--text-soft); width: 40%; }
.spec-table td:last-child { font-weight: 500; }

.product-section { padding-top: 24px; border-top: 1px solid var(--line); margin-top: 32px; }
.product-section h3 { margin-bottom: 12px; }

/* ===== Misc ===== */
.todo {
  display: inline-block; background: #fff3cd; color: #997404;
  padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px dashed #ffc107; margin: 4px 0;
}
.placeholder-photo {
  background: repeating-linear-gradient(45deg, #f6f4ee, #f6f4ee 10px, #efece3 10px, #efece3 20px);
  display: grid; place-items: center; color: #997404; font-weight: 600; padding: 24px; text-align: center;
}

/* ===== Floating widget ===== */
.float-actions {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 12px;
}
.float-actions a, .float-actions button {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--shadow);
  background: var(--brand); color: #fff; border: 0;
  font-size: 24px; transition: transform .2s;
}
.float-actions a:hover, .float-actions button:hover { transform: scale(1.08); color: #fff; }
.float-actions .max { background: linear-gradient(135deg, #8C5BFF, #3D6BFF); }
.float-actions .tg { background: #229ED9; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-soft); }
.lead { font-size: 18px; color: var(--text-soft); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .why-center { display: none; }
  .why-card { margin: 0 !important; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .partners-row { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .cert-slide { flex: 0 0 calc((100% - 18px) / 2); } /* 2 per view */
  .service-card { grid-template-columns: 1fr; padding: 32px; }
  .contact-block { grid-template-columns: 1fr; padding: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  /* Одна колонка на планшете/мобиле. minmax(0,1fr) + min-width:0 позволяют
     колонке сжиматься уже своего содержимого — иначе ряд миниатюр (5×80px),
     длинный заголовок и картинка распирают колонку шире экрана, и фото,
     заголовок и блок с ценой «вылезают» вправо и обрезаются. */
  .product-layout { grid-template-columns: minmax(0, 1fr); }
  .product-layout > * { min-width: 0; }
}
@media (max-width: 720px) {
  .header-inner { gap: 12px; height: 64px; }
  .main-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 24px; gap: 8px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .burger { display: block; margin-left: auto; }
  .header-phone { display: none; }
  .brand-logo img { height: 40px; }
  .header-actions { gap: 10px; }
  .header-actions .btn-primary { display: none; }
  .cat-grid.cat-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 1/1; }
  /* Плашка «Реестр соц. предприятий» — компактнее, чтобы не закрывала фото кровати */
  .hero-badge { left: 12px; bottom: 12px; right: auto; max-width: 72%; padding: 10px 12px; gap: 8px; border-radius: 12px; }
  .hero-badge .icon { width: 30px; height: 30px; font-size: 16px; flex: 0 0 auto; }
  .hero-badge strong { font-size: 13px; line-height: 1.2; }
  .hero-badge span { font-size: 11px; line-height: 1.2; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card.cat-card-lg { grid-column: span 1; }
  .steps-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-slide { flex: 0 0 100%; } /* 1 per view */
  .cert-slider { gap: 8px; }
  .cert-arrow { width: 40px; height: 40px; font-size: 22px; }
  .products-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .price-tier-grid { grid-template-columns: 1fr 1fr; }
  /* Миниатюры переносятся на новую строку, а не растягивают колонку вправо */
  .gallery-thumbs { flex-wrap: wrap; }
  .gallery-thumbs button { width: 68px; height: 68px; }
  /* Заголовок товара — компактнее и с переносом длинных слов, чтобы не обрезался */
  .product-info h1 { font-size: 28px; overflow-wrap: break-word; }
  .section { padding: 56px 0; }
  .topbar .container { font-size: 12px; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; line-height: 1.35; }
  .topbar .topbar-extra { display: none; }
}
@media (max-width: 480px) {
  :root { --container: 100%; }
  .container { padding-left: 16px; padding-right: 16px; }
  .section { padding: 44px 0; }
  .section-title { font-size: 26px; }
  h1 { font-size: 30px; }
  .cert-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .price-tier-grid { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; justify-content: center; }
  .hero-ctas .btn { width: 100%; }
  .hero-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .hero-trust div strong { font-size: 26px; }
  .service-list { grid-template-columns: 1fr; }
  .service-card, .contact-block { padding: 24px; }
  .footer { padding: 48px 0 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .float-actions { right: 14px; bottom: 14px; gap: 10px; }
  .float-actions a, .float-actions button { width: 50px; height: 50px; font-size: 21px; }
  .cert-lb-prev, .cert-lb-next { width: 44px; height: 44px; font-size: 26px; }
  .cert-lb-prev { left: 8px; } .cert-lb-next { right: 8px; }
}

/* Desktop column variants — kept out of the mobile range so the
   responsive collapse rules above always win on small screens.
   (Replaces inline grid-template-columns that used to break mobile.) */
@media (min-width: 1025px) {
  .cat-grid.cat-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cat-grid.cat-grid-6 { grid-template-columns: repeat(6, 1fr); }
  .cert-grid.cert-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Safety net: never allow horizontal scroll on phones */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
}
