/* ==========================================================
   ФГ «Миколай» — стилі лендингу (макет Figma 1440 px)
   ========================================================== */
:root {
  --green: #4f5a3c;
  --green-dark: #3f4930;
  --cream: #f8e0bc;
  --cream-light: #fdf3e4;
  --peach: #ffe0b7;
  --text: #000;
  --muted: #6b6b5e;
  --input: #ebebeb;
  --radius-lg: clamp(22px, 2.8vw, 40px);
  --radius: clamp(18px, 2.1vw, 30px);
  --fs-text: clamp(16px, 1.39vw, 20px);
  --fs-title: clamp(17px, 1.39vw, 20px);
  --gutter: clamp(16px, 4vw, 60px);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: #fff; line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
.u { text-decoration: underline; text-underline-offset: 3px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mt { margin-top: clamp(28px, 3vw, 44px); }
.main { position: relative; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.container--text { max-width: calc(1068px + var(--gutter) * 2); }
.container--narrow { max-width: calc(950px + var(--gutter) * 2); }
.container--photo { max-width: calc(1052px + var(--gutter) * 2); margin-top: clamp(24px, 3.4vw, 50px); margin-bottom: clamp(28px, 4vw, 56px); }
.container--contacts { max-width: calc(1020px + var(--gutter) * 2); }
.container--form { max-width: calc(1105px + var(--gutter) * 2); }

.section { position: relative; padding: clamp(28px, 3.5vw, 50px) 0; }
.title { font-size: var(--fs-title); font-weight: 600; text-transform: uppercase; text-align: center; margin: 0 0 clamp(14px, 1.6vw, 24px); letter-spacing: .01em; }
.title--left { text-align: left; }

.rich { font-size: var(--fs-text); line-height: 1.8; }
.rich--justify { text-align: justify; hyphens: auto; }
.rich p { margin: 0; }
.rich p + p { margin-top: 0; }
.rich strong, .rich b { font-weight: 700; }
.rich a { text-decoration: underline; text-underline-offset: 3px; }
.rich ul, .rich ol { padding-left: 1.3em; }

.divider { border: 0; height: 4px; border-radius: 4px; background: var(--green); width: min(995px, calc(100% - var(--gutter) * 2)); margin: clamp(10px, 2vw, 30px) auto; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; border: 0; cursor: pointer;
  text-decoration: none; font-family: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2;
  border-radius: 15px; padding: .85em 1.6em; font-size: clamp(16px, 1.53vw, 22px); transition: transform .15s, background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(79, 90, 60, .3); }
.btn--green { background: var(--green); color: var(--cream); }
.btn--green:hover { background: var(--green-dark); }
.btn--cream { background: var(--cream); color: var(--green); }
.btn--outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn--block { width: 100%; }
.btn--sm { font-size: 14px; padding: .8em 1.4em; border-radius: 12px; }
.btn--xs { font-size: 12px; padding: .7em 1.1em; border-radius: 10px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; padding: clamp(10px, 3.6vw, 52px) var(--gutter) 0; pointer-events: none; }
.header__pill { pointer-events: auto; max-width: 1240px; margin: 0 auto; background: #fff; border-radius: 43px; min-height: clamp(62px, 6vw, 86px);
  display: flex; align-items: center; padding: 0 clamp(18px, 4.2vw, 60px); box-shadow: 0 4px 18px rgba(0, 0, 0, .14); transition: box-shadow .3s; }
.header__logo img { height: clamp(44px, 4.2vw, 58px); width: auto; }
.nav { flex: 1; display: flex; justify-content: space-between; margin-left: clamp(30px, 5.8vw, 84px); }
.nav__link { font-size: clamp(14px, 1.39vw, 20px); text-transform: uppercase; text-decoration: none; position: relative; padding: 6px 0; white-space: nowrap; }
.nav__link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--green); transform: scaleX(0); transition: transform .25s; }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__extra { display: none; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2.5px; background: var(--green); border-radius: 2px; margin: 5px 0; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Слайдер ---------- */
.hero { position: relative; max-width: 1200px; width: calc(100% - var(--gutter) * 2); margin: clamp(24px, 4.3vw, 62px) auto 0;
  aspect-ratio: 1200 / 728; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream-light); }
.hero__track, .hero__slide { position: absolute; inset: 0; }
.hero__slide { opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; display: flex; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide picture, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; object-position: right center; }
.hero__content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(20px, 4.7vw, 56px) clamp(30px, 4vw, 60px); max-width: 720px; color: var(--green); }
.hero__title { white-space: nowrap; font-size: clamp(28px, 4.4vw, 64px); font-weight: 800; text-transform: uppercase; line-height: 1.22; margin: 0; letter-spacing: .005em; }
.hero__sub { font-size: clamp(14px, 1.39vw, 20px); font-weight: 700; line-height: 1.55; margin: clamp(18px, 3.4vw, 50px) 0 0; color: #5d5a3f; }
.hero__text { margin-top: 1em; }
.hero__btn { margin-top: 1.4em; align-self: flex-start; }
.hero__slide--split { background: var(--green); }
.hero__panel { position: relative; z-index: 2; width: 50%; padding: clamp(20px, 4.2vw, 50px) clamp(18px, 3.3vw, 40px); color: #fff; display: flex; flex-direction: column; justify-content: center;
  background: var(--green); }
.hero__panel-title { font-size: clamp(18px, 2vw, 28px); font-weight: 800; text-transform: uppercase; color: var(--cream); margin-bottom: .6em; line-height: 1.25; }
.hero__panel-sub { margin: 0 0 1em; font-weight: 600; }
.hero__panel-text { font-size: clamp(12px, 1.12vw, 16px); line-height: 1.5; }
.hero__panel-text p + p { margin-top: 1.1em; }
.hero__photo { position: relative; width: 50%; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__slide--panel-right { flex-direction: row-reverse; }
.hero__dots { position: absolute; z-index: 3; left: 50%; bottom: clamp(14px, 2.6vw, 37px); transform: translateX(-50%); display: flex; gap: clamp(6px, .7vw, 10px); }
.hero__dot { width: clamp(60px, 15.6vw, 225px); height: 20px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.hero__dot i { display: block; width: 100%; height: clamp(5px, .56vw, 8px); border-radius: 8px; background: var(--green); position: relative; overflow: hidden; }
.hero__dot.is-active i { background: rgba(0, 0, 0, .3); }
.hero__dot.is-active i::after { content: ''; position: absolute; inset: 0; background: #000; transform-origin: left; animation: dotfill var(--interval, 6s) linear forwards; }
.hero.is-paused .hero__dot.is-active i::after { animation-play-state: paused; }
.hero.on-split .hero__dot i { background: var(--cream); }
.hero.on-split .hero__dot.is-active i { background: rgba(255, 255, 255, .35); }
.hero.on-split .hero__dot.is-active i::after { background: #fff; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .85); color: var(--green); font-size: 28px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s; }
.hero:hover .hero__arrow { opacity: 1; }
.hero__arrow--prev { left: 14px; } .hero__arrow--next { right: 14px; }

/* ---------- Декор (колоски) ---------- */
.deco { position: absolute; z-index: 0; pointer-events: none; user-select: none; }
.deco--about { left: 0; top: 52%; width: min(930px, 70vw); opacity: .95; }
.deco--assortment { right: 0; top: 14%; width: min(1080px, 80vw); }
.deco--form { left: 0; bottom: -40px; width: min(930px, 70vw); }
.section--about { padding-top: clamp(36px, 5.5vw, 80px); }

/* ---------- Фото ---------- */
.photo { width: 100%; border-radius: var(--radius); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); aspect-ratio: 1052 / 485; object-fit: cover; }
.photo--wide { aspect-ratio: 16 / 5; margin-bottom: 24px; }

/* ---------- Асортимент ---------- */
.section--assortment { padding-bottom: 10px; }
.assortment { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1.4vw, 20px); max-width: 980px; margin: clamp(20px, 3vw, 44px) auto 0; }
.assortment__item { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; color: var(--green); text-align: center; border-radius: 18px; padding: 8px 4px 12px; transition: background .2s, transform .2s; }
.assortment__item:hover { background: rgba(248, 224, 188, .45); transform: translateY(-4px); }
.assortment__icon { height: clamp(64px, 8.3vw, 120px); display: flex; align-items: center; justify-content: center; width: 100%; }
.assortment__icon img { max-height: 100%; max-width: 100%; }
.assortment__name { font-size: clamp(12px, 1.04vw, 15px); font-weight: 600; line-height: 1.4; max-width: 9em; }
.section--assortment .center { margin-top: 22px; }

/* ---------- Для бізнесу ---------- */
.business { position: relative; border-radius: var(--radius); overflow: hidden; min-height: clamp(420px, 35.5vw, 512px); background: var(--bg, #d9c9a8) center / cover no-repeat;
  display: flex; justify-content: flex-end; align-items: center; padding: clamp(16px, 2vw, 26px); margin-top: clamp(14px, 2.5vw, 36px); }
.business__card { width: min(570px, 100%); background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius); padding: clamp(18px, 2.6vw, 36px) clamp(18px, 2.6vw, 36px) clamp(16px, 2vw, 28px); box-shadow: 0 8px 30px rgba(0, 0, 0, .12); }
.business__card .rich { line-height: 1.6; margin-bottom: clamp(16px, 1.6vw, 24px); }
.business__card .btn { min-height: 80px; }

/* ---------- Контакти ---------- */
.section--contacts { padding-top: clamp(40px, 4.6vw, 66px); }
.section--contacts .rich { line-height: 1.55; }
.contacts-lines { font-size: var(--fs-text); line-height: 1.55; margin: 1.55em 0; }

/* ---------- Форма ---------- */
.form-section { padding-bottom: clamp(60px, 9vw, 130px); overflow: hidden; }
.form-section .title { margin-bottom: clamp(24px, 4.4vw, 64px); }
.lead-form { position: relative; z-index: 1; background: #fff; border: 1px solid #000; border-radius: var(--radius); padding: clamp(20px, 2.8vw, 40px) clamp(16px, 2.8vw, 40px) clamp(24px, 2.2vw, 32px);
  display: flex; flex-direction: column; gap: clamp(12px, 1.4vw, 20px); box-shadow: 0 4px 20px rgba(0, 0, 0, .05); }
.field { display: flex; flex-direction: column; gap: clamp(10px, 1.4vw, 20px); }
.field span { font-size: clamp(16px, 1.53vw, 22px); padding-left: clamp(12px, 1.4vw, 20px); }
.field input, .field textarea { border: 2px solid transparent; background: var(--input); border-radius: 20px; height: clamp(52px, 4.7vw, 68px);
  padding: 0 clamp(16px, 1.6vw, 24px); font: inherit; font-size: 17px; outline: none; transition: border-color .2s, background .2s; width: 100%; }
.field textarea { height: auto; padding: 14px 24px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: #c9b48a; background: #f4f1ec; }
.field.has-error input { border-color: #d64545; }
.field__err { color: #c62f2f; font-size: 13px; padding-left: 20px; margin-top: -8px; }
.btn--form { min-height: clamp(64px, 7.8vw, 113px); border-radius: clamp(24px, 2.8vw, 40px); font-size: clamp(18px, 2.36vw, 34px); margin-top: clamp(4px, 1vw, 14px); }
.lead-form__consent { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
.lead-form__error { background: #fde8e8; color: #9b1c1c; padding: 12px 18px; border-radius: 14px; }
.lead-form__product { background: var(--cream-light); border-radius: 14px; padding: 12px 18px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lead-form__product button { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-success { position: relative; z-index: 1; text-align: center; border: 1px solid #000; border-radius: var(--radius); background: #fff; padding: clamp(36px, 5vw, 70px) 20px; }
.lead-success__icon { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 50%; background: var(--green); color: var(--cream); font-size: 40px; display: grid; place-items: center; }
.lead-success__text { font-size: var(--fs-text); margin: 0 0 24px; }

/* ---------- Внутрішні сторінки ---------- */
.section--inner { padding-top: clamp(30px, 4vw, 56px); min-height: 40vh; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--green); }
.cat-head { display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: center; margin-bottom: 24px; }
.cat-head__icon { width: clamp(80px, 9vw, 130px); flex-shrink: 0; }
.cat-head__title { font-size: clamp(26px, 3vw, 42px); font-weight: 800; text-transform: uppercase; color: var(--green); margin: 0 0 6px; line-height: 1.15; }
.cat-head__desc { font-size: var(--fs-text); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 30px; }
.chip { padding: 9px 18px; border-radius: 30px; background: var(--cream-light); color: var(--green); text-decoration: none; font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.chip:hover { background: var(--cream); }
.chip.is-active { background: var(--green); color: var(--cream); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.pcard { border-radius: 22px; background: #fff; border: 1px solid #ece4d5; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.pcard:hover { box-shadow: 0 14px 34px rgba(79, 90, 60, .16); transform: translateY(-3px); }
.pcard__img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--cream-light); overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__img img.pcard__ph, .product__main img.pcard__ph { width: 46%; height: auto; object-fit: contain; opacity: .9; }
.pcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard__sku { font-size: 12px; color: var(--muted); }
.pcard__title { font-size: 17px; margin: 0; line-height: 1.3; }
.pcard__title a { text-decoration: none; }
.pcard__text { font-size: 14px; color: #444; margin: 0; }
.pcard__foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price b { font-size: 18px; color: var(--green); } .price small { color: var(--muted); }
.empty { text-align: center; padding: 50px 20px; background: var(--cream-light); border-radius: 22px; }
.empty p { font-size: var(--fs-text); max-width: 640px; margin: 0 auto 20px; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.product__main { border-radius: var(--radius); overflow: hidden; background: var(--cream-light); aspect-ratio: 1; display: grid; place-items: center; }
.product__main img { width: 100%; height: 100%; object-fit: cover; }
.product__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product__thumbs button { width: 78px; height: 78px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.product__thumbs button.is-active { border-color: var(--green); }
.product__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product__title { font-size: clamp(24px, 2.6vw, 36px); color: var(--green); margin: 4px 0 10px; line-height: 1.2; }
.product__lead { font-size: var(--fs-text); margin: 0 0 16px; }
.product__price { font-size: clamp(22px, 2.2vw, 30px); color: var(--green); margin-bottom: 14px; }
.product__price small { font-size: .55em; color: var(--muted); } .product__price s { font-size: .55em; color: var(--muted); }
.product__meta { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c9a227; margin-right: 6px; } .dot--ok { background: #3c9a50; }
.specs { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid #ece4d5; }
.specs th { width: 45%; font-weight: 600; color: #444; padding-right: 20px; }
.notfound__code { font-size: clamp(90px, 15vw, 200px); font-weight: 800; color: var(--green); line-height: 1; }

/* ---------- Підвал ---------- */
.footer { background: var(--green); color: var(--cream); position: relative; z-index: 2; }
.footer__inner { max-width: 1440px; margin: 0 auto; padding: clamp(36px, 6.6vw, 95px) clamp(20px, 6vw, 86px) clamp(24px, 3vw, 40px); display: grid;
  grid-template-columns: 1fr 1.25fr 1.4fr; gap: 30px; align-items: start; }
.footer__logo img { width: clamp(150px, 17.4vw, 250px); }
.footer__nav { display: flex; flex-direction: column; gap: clamp(14px, 2.2vw, 32px); padding-top: 10px; padding-left: clamp(0px, 3.5vw, 50px); }
.footer__nav a, .footer__contacts { font-size: clamp(15px, 1.39vw, 20px); text-transform: uppercase; text-decoration: none; letter-spacing: .02em; }
.footer__nav a:hover { text-decoration: underline; }
.footer__contacts { text-transform: none; display: flex; flex-direction: column; gap: clamp(10px, 1.1vw, 16px); padding-top: clamp(0px, 4vw, 56px); }
.footer__contacts > div:first-child { text-transform: uppercase; }
.footer__contacts a { text-decoration: none; } .footer__contacts a.u { text-decoration: underline; }
.footer__social { display: flex; gap: 12px; margin-top: 6px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); color: var(--green); display: grid; place-items: center; }
.footer__copy { text-align: center; font-size: 13px; opacity: .7; padding: 0 20px 24px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .burger { display: block; }
  .nav { position: fixed; inset: 0; top: 0; margin: 0; background: #fff; flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: 110px var(--gutter) 40px; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; z-index: -1; }
  .nav.is-open { transform: none; }
  .nav__link { font-size: 20px; padding: 14px 0; border-bottom: 1px solid #eee; }
  .nav__link::after { display: none; }
  .nav__extra { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 24px; }
  .nav__phone { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--green); }
  .header__pill { position: relative; z-index: 2; }
  .assortment { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__logo { grid-column: 1 / -1; }
  .product { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hero { aspect-ratio: auto; height: 560px; }
  .hero__title { white-space: normal; }
  .hero__slide--hero .hero__img { object-position: 72% center; }
  .hero__slide--hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(253, 236, 214, .92) 0%, rgba(253, 236, 214, .7) 45%, rgba(253, 236, 214, 0) 70%); }
  .hero__content { justify-content: flex-start; padding-top: 34px; }
  .hero__slide--split { flex-direction: column-reverse; }
  .hero__slide--panel-right { flex-direction: column-reverse; }
  .hero__panel { width: 100%; flex: 1; justify-content: flex-start; padding-bottom: 50px; overflow: hidden; }
  .hero__panel-text { font-size: 13px; }
  .hero__photo { width: 100%; height: 150px; flex-shrink: 0; }
  .hero__arrow { display: none; }
  .rich--justify { text-align: left; }
  .assortment { grid-template-columns: repeat(2, 1fr); }
  .business { min-height: 0; padding: 200px 12px 12px; background-position: 30% top; background-size: auto 260px; background-color: var(--cream-light); align-items: stretch; }
  .business__card { width: 100%; }
  .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pcard__body { padding: 12px; } .pcard__text { display: none; }
  .pcard__foot { flex-direction: column; align-items: stretch; }
  .footer__inner { grid-template-columns: 1fr; text-align: left; }
  .footer__nav { padding-left: 0; }
  .cat-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
