:root {
  --bg: #052e2a;
  --panel: #0a3d38;
  --line: #12554d;
  --teal: #14b8a6;
  --teal2: #5eead4;
  --text: #e6f7f4;
  --muted: #8fb3ad;
  --green: #3fb950;
  --red: #f85149;
  --teal-dark: #0d9488;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.site-header {
  background: rgba(5,46,42,0.95);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 6px 20px; }
.logo { font-size: 18px; }
.logo b { color: var(--teal2); }
.logo-img { height: 72px; width: auto; display: block; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 16px; }
.nav a:hover { color: var(--teal2); }

/* BUTTONS — единый стиль «пилюли» */
.btn {
  display: inline-block; border: none; border-radius: 999px;
  padding: 12px 26px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.btn-gold { background: linear-gradient(135deg, var(--teal), var(--teal2)); color: #04201d; }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
/* Шапка: кнопки «Корзина» и «Заказать звонок» на 25% меньше */
.site-header .btn { padding: 9px 20px; font-size: 10.5px; }
/* Hero-полоска: кнопки «Смотреть каталог» и «Заказать звонок» на 10% меньше */
.hero .btn { padding: 11px 23px; font-size: 12.6px; }
.btn-outline { background: transparent; border: 1px solid var(--teal); color: var(--teal2); }
.btn-outline:hover { background: rgba(20,184,166,0.12); }
.btn-red { background: rgba(248,81,73,0.12); border: 1px solid var(--red); color: var(--red); }
.btn-red:hover { background: rgba(248,81,73,0.25); }

/* HERO */
.hero {
  background: radial-gradient(ellipse at 70% 20%, rgba(20,184,166,0.22), transparent 60%),
              linear-gradient(180deg, #052e2a, #0a3d38);
  padding: 45px 0 40px;
  text-align: center;
  border-top: 1px solid rgba(212,168,75,0.65);
  border-bottom: 1px solid rgba(212,168,75,0.65);
}
.hero h1 { font-size: 32px; line-height: 1.15; margin-bottom: 10px; }
.hero h1 span { color: var(--teal2); }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 18px; font-size: 14px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
section.container { padding: 50px 20px; }
.section-title { font-size: 26px; margin-bottom: 24px; color: var(--teal2); text-align: center; }
.loading { color: var(--muted); padding: 30px; text-align: center; }

/* CATALOG — 6 товаров в одну линию (V160, voice_166) */
.catalog-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-3px); border-color: rgba(20,184,166,0.5); }
.cat-photo {
  height: 160px; background: linear-gradient(135deg, #0a3d38, #12554d);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.cat-body { padding: 14px; display: flex; flex-direction: column; flex: 1; text-align: center; align-items: center; }
.cat-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
/* V170: название розничной карточки в одну строку, без переноса */
.cat-name-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 13px; }
.cat-cat { font-size: 11px; color: var(--teal); margin-bottom: 8px; }
.cat-desc { font-size: 12px; color: var(--muted); flex: 1; margin-bottom: 12px; }
.cat-row { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cat-price { font-size: 19px; font-weight: 800; color: #0d9488; }
.cat-price-line { font-size: 14px; font-weight: 800; color: var(--teal-dark); margin: 2px 0 6px; }
.cat-tara { display: flex; flex-wrap: nowrap; gap: 4px; margin: 4px 0 4px; justify-content: center; align-items: center; font-size: 11px; color: var(--teal-dark); white-space: nowrap; }
.cat-tara-label { font-size: 11px; font-weight: 700; color: var(--teal-dark); margin: 6px 0 3px; text-align: center; }
.cat-tara-chip { border: 1px solid #b7e4dc; background: #f0fbf9; color: #0d9488; border-radius: 999px; padding: 1px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.cat-tara label { border: 1px solid #b7e4dc; background: #f0fbf9; color: #0d9488; border-radius: 999px; padding: 1px 8px; cursor: pointer; font-size: 11px; white-space: nowrap; }
.cat-tara label:hover { border-color: #0d9488; }
.cat-tara label.selected { border-color: #0d9488; background: #d5f5ee; color: #0d9488; font-weight: 600; }
.cat-tara input { display: none; }
.cat-weight { font-size: 12px; color: var(--muted); }
.cat-stock { font-size: 11px; color: var(--green); }
.cat-stock.out { color: var(--red); }
.cat-stock { font-size: 11px; color: var(--green); }
.cat-stock.out { color: var(--red); }
.cat-buy { margin-top: 12px; width: 100%; }

/* ABOUT */
.about-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.about-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; text-align: center; }
.about-icon { font-size: 40px; margin-bottom: 10px; }
.about-card h3 { color: var(--teal2); margin-bottom: 8px; }
.about-card p { color: var(--muted); font-size: 13px; }

/* ORDER */
.order-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.order-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.order-card h3 { color: var(--teal2); margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
input, textarea {
  width: 100%; padding: 12px 14px; margin-bottom: 10px;
  background: #062a26; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 14px; font-family: inherit; outline: none;
}
input:focus, textarea:focus { border-color: var(--teal); }
textarea { resize: vertical; min-height: 90px; }
.form-result { margin-top: 18px; text-align: center; font-size: 14px; display: none; }
.form-result.ok { display: block; color: var(--green); }
.form-result.err { display: block; color: var(--red); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; text-align: center; }
.footer-phone a { color: var(--teal2); text-decoration: none; font-weight: 600; }

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .nav { display: none; }
}

/* ==== СВЕТЛАЯ БИРЮЗОВАЯ ТЕМА (V159, voice_165: белое → светло-бирюзовое) ==== */
.site-header{background:#eafffb;border-bottom:1px solid #b7e4dc;}
.logo b{color:#0d9488;}
.nav a{color:#134e48;}
.nav a:hover{color:#0d9488;}
.header-inner{color:#134e48;}
.site-header .btn-outline{border-color:#0d9488;color:#0d9488;}
.site-header .btn-outline:hover{background:rgba(13,148,136,0.1);}
.hero-note{margin-top:14px;color:#5eead4;font-size:12px;}
/* Секция каталога — светло-бирюзовая, ПОЛНОЙ ширины, контент по центру */
section#catalog{background:#e9fdf9;max-width:none;margin:0;padding:25px 0 50px;position:relative;overflow:hidden;}
section#catalog .section-title{max-width:1100px;margin-left:auto;margin-right:auto;padding:0 20px;position:relative;z-index:2;}
section#catalog .group-chips{max-width:1100px;margin-left:auto;margin-right:auto;padding:0 20px;position:relative;z-index:2;}
section#catalog .catalog-grid{max-width:1100px;margin:0 auto;padding:0 20px;position:relative;z-index:2;}
section#catalog .section-title{color:#0d9488;margin-bottom:17px;}
section#catalog .loading{color:#5b8a84;position:relative;z-index:2;}
.cat-card{background:#ffffff;border:1px solid #b7e4dc;box-shadow:0 2px 8px rgba(13,148,136,0.08);}
.cat-name{color:#134e48;}
.cat-desc{color:#5b8a84;}
.cat-price{color:#0d9488;}
.cat-weight{color:#5b8a84;}
.cat-cat{color:#0d9488;}
.cat-photo{background:linear-gradient(135deg,#e6fbf7,#d2f2ec);}
.cat-stock{color:#16a34a;}
.cat-stock.out{color:#dc2626;}
/* Группы каталога (переключатели розница/опт/ястыки) */
.cat-group{grid-column:1/-1;margin:18px 0 8px;font-size:18px;font-weight:800;color:#0d9488;border-bottom:2px solid #b7e4dc;padding-bottom:8px;position:relative;z-index:2;text-align:left;}
.cat-group:first-child{margin-top:0;}
.cat-group small{font-size:12px;color:#5b8a84;font-weight:400;margin-left:8px;}
.group-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;justify-content:center;}
.group-chip{border:1px solid #b7e4dc;background:#e6fbf7;color:#134e48;border-radius:20px;padding:7px 18px;font-size:13px;cursor:pointer;transition:all .15s;font-weight:600;}
.group-chip:hover{border-color:#0d9488;}
.group-chip.active{border-color:#0d9488;color:#0d9488;background:#d5f5ee;font-weight:700;box-shadow:0 0 0 1px rgba(13,148,136,0.3);}
.cat-group-note{float:right;margin-left:auto;font-size:11px;color:#5b8a84;font-weight:400;}
.delivery-cities{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:18px 0 8px;}
.delivery-city{background:#fff;border:1px solid #b7e4dc;border-radius:10px;padding:12px 16px;min-width:200px;text-align:left;}
.delivery-city b{display:block;color:#0d9488;font-size:14px;margin-bottom:3px;}
.delivery-city span{color:#5b8a84;font-size:12px;}
.delivery-notes{max-width:900px;margin:14px auto 0;color:#5b8a84;font-size:13px;line-height:1.6;text-align:left;}
.delivery-notes p{margin-bottom:8px;}
.delivery-notes b{color:#134e48;}

/* ==== V144: объединённые карточки с выбором фасовки (voice_145) ==== */
.cat-variants{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 10px;justify-content:center;}
.cat-variants label{
  display:inline-flex;align-items:center;gap:6px;cursor:pointer;
  border:1px solid #b7e4dc;border-radius:999px;padding:6px 14px;
  font-size:12px;color:#134e48;background:#e6fbf7;transition:all .15s;
}
.cat-variants label:hover{border-color:#0d9488;}
.cat-variants label.selected{border-color:#0d9488;background:#d5f5ee;color:#0d9488;font-weight:600;}
.cat-variants input{display:none;}
.cat-yastik{width:100%;margin-top:8px;}
.cat-buy{margin-top:12px;width:100%;white-space:nowrap;}
.cat-buy.bought{background:linear-gradient(135deg,#3fb950,#2ea043);color:#fff;}

/* ==== Пузырьки-декор (V175): ТОЛЬКО в белых секциях (каталог + шапка),
   ПОД контентом (не бегут по товарам), на бирюзовых полосах их нет ==== */
.bubbles{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1;}
.site-header .bubbles{z-index:1;}
.header-inner{position:relative;z-index:2;}
.bubble{
  position:absolute;bottom:-90px;border-radius:50%;
  --rise:-1500px;
  background:radial-gradient(circle at 30% 30%,rgba(20,184,166,0.4),rgba(20,184,166,0.08) 70%);
  border:1px solid rgba(20,184,166,0.35);
  box-shadow:inset 0 0 8px rgba(20,184,166,0.25);
  animation:bubble-rise linear infinite;
}
@keyframes bubble-rise{
  0%{transform:translateY(0);opacity:0;}
  10%{opacity:.9;}
  100%{transform:translateY(var(--rise,-1500px));opacity:0;}
}
/* V172+V174: бирюзовые (тёмные) секции — непрозрачный тёмный фон (пузырьки не просвечивают) */
.hero, section#about, section#order, .site-footer{position:relative;background:#052e2a;}
@media (max-width:640px){section#catalog{padding:20px 0 40px;}}

/* ==== АДАПТИВНАЯ СЕТКА: 6 в линию на десктопе, меньше на узких экранах (V160) ==== */
@media (max-width:1200px){ .catalog-grid{grid-template-columns:repeat(4,1fr);} }
@media (max-width:900px){ .catalog-grid{grid-template-columns:repeat(3,1fr);} }
@media (max-width:640px){ .catalog-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:420px){ .catalog-grid{grid-template-columns:1fr;} }

/* ==== V178: плавающая кнопка «Начать чат» (fixed справа внизу, едет со скроллом) + модалка ==== */
.chat-fab{
  position:fixed;right:22px;bottom:22px;z-index:9998;
  width:62px;height:62px;border-radius:50%;
  border:2px solid rgba(212,168,75,0.85);
  background:linear-gradient(135deg,#14b8a6,#0d9488);
  color:#fff;font-size:27px;cursor:pointer;
  box-shadow:0 6px 22px rgba(13,148,136,0.55);
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s, box-shadow .2s;
}
.chat-fab:hover{transform:scale(1.09);box-shadow:0 9px 28px rgba(13,148,136,0.7);}
.chat-modal{
  position:fixed;right:22px;bottom:98px;z-index:9999;
  width:320px;max-width:calc(100vw - 44px);
  background:#fff;border:1px solid rgba(212,168,75,0.7);border-radius:16px;
  box-shadow:0 14px 44px rgba(0,0,0,0.32);overflow:hidden;
  display:none;animation:chat-in .25s ease-out;
}
.chat-modal.open{display:block;}
@keyframes chat-in{from{transform:translateY(16px);opacity:0;}to{transform:translateY(0);opacity:1;}}
.chat-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px;background:linear-gradient(135deg,#14b8a6,#0d9488);
  color:#fff;font-weight:700;font-size:14px;
}
.chat-close{background:transparent;border:none;color:#fff;font-size:16px;cursor:pointer;padding:2px 6px;}
.chat-close:hover{color:#04201d;}
.chat-body{padding:14px;display:flex;flex-direction:column;gap:8px;}
.chat-hint{font-size:12px;color:#5b8a84;margin:0 0 2px;}
.chat-body input,.chat-body textarea{
  width:100%;padding:10px 12px;border:1px solid #b7e4dc;border-radius:8px;
  font-size:13px;outline:none;box-sizing:border-box;background:#eafffb;color:#134e48;font-family:inherit;
}
.chat-body input:focus,.chat-body textarea:focus{border-color:#0d9488;}
.chat-body textarea{min-height:70px;resize:vertical;}
.chat-send{
  padding:11px;border:none;border-radius:8px;
  background:linear-gradient(135deg,#14b8a6,#0d9488);color:#fff;
  font-weight:700;font-size:14px;cursor:pointer;
}
.chat-send:hover{filter:brightness(1.08);}
.chat-result{font-size:12px;text-align:center;min-height:16px;}
.chat-result.ok{color:#16a34a;}
.chat-result.err{color:#dc2626;}
