/*
Theme Name: Cosmo Theme
Theme URI: https://fitodoctor.com.ua
Author: Fitodoctor Team
Author URI: https://fitodoctor.com.ua
Description: WordPress theme for Fitodoctor - professional cosmetics and medical products
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cosmo-theme
Tags: e-commerce, health, cosmetics, responsive, modern
*/

/* ===== Design tokens ===== */
:root {
  --white: #ffffff;
  --black: #111111;
  --green: #00a759;
  --green-hover: #007a40;
  --green-logo: #008739;
  --cards: #ececec;
  --hero-bg: #f5f5f5;
  --section: #e6f7ef;
  --gray: #6b7280;
  --radius-card: 16px;
  --radius-pill: 32px;
  --frame: 1440px;
  --container: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --shadow-card: 0 4px 32px -8px rgba(0, 0, 0, 0.15);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, p { margin: 0; }

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

/* ===== Typography helpers ===== */
.eyebrow {
  font-size: 13px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--green);
  font-weight: 400;
}
.eyebrow--center { text-align: center; }
.eyebrow--light { color: var(--white); }
.eyebrow--science { color: #9fe8c8; }

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
}
.section__title--center { text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 400;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.btn--primary {
  padding: 16px 24px;
  background: var(--green);
  color: var(--white);
}
.btn--primary:hover { background: var(--green-hover); }

.btn--outline {
  padding: 16px 24px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}
.btn--outline:hover { background: var(--section); }

.btn--text {
  padding: 8px;
  color: var(--green);
}
.btn--text .ic-arrow { transition: transform 0.2s ease; }
.btn--text:hover .ic-arrow { transform: translate(3px, -3px); }
.btn--text-light { color: var(--white); }
.ic-arrow { flex-shrink: 0; }

/* ===== Icon buttons ===== */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--black);
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: var(--section); color: var(--green); }
.icon-btn--round {
  border: 1px solid var(--green);
  color: var(--green);
}
.icon-btn--round:hover { background: var(--green); color: var(--white); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--cards);
}
/* WordPress admin bar compensation */
.admin-bar .header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}
.header:has(.mobile-menu.is-open) {
  border-bottom-color: transparent;
}
.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: var(--frame);
  padding-block: 16px;
}
.header__logo { justify-self: start; }
.header__logo img { height: 36px; width: auto; }

.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__link {
  position: relative;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black);
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--green); }
.nav__link--active { color: var(--green); }
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 1px;
  background: var(--green);
}

.header__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  display: flex;
  background: var(--section);
  border-radius: var(--radius-pill);
  padding: 0;
  overflow: hidden;
}
.lang__btn {
  border: none;
  background: transparent;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  border-radius: var(--radius-pill);
}
.lang__btn--active { color: var(--green); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--hero-bg);
  overflow: hidden;
}
.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: stretch;
  width: 100%;
  max-width: var(--frame);
  min-height: clamp(220px, 30vh, 290px);
  margin-inline: auto;
}
.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  max-width: 584px;
  padding: clamp(16px, 3vw, 44px) clamp(20px, 5vw, 80px);
  padding-right: clamp(12px, 2vw, 32px);
}
.hero__title {
  font-size: clamp(40px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero__text {
  font-size: 16px;
  line-height: 1.5;
  max-width: 52ch;
  color: var(--black);
}
.hero__buttons { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero__media {
  align-self: stretch;
  min-height: 0;
  margin-right: calc(-1 * max(0px, (100vw - var(--frame)) / 2));
  width: calc(100% + max(0px, (100vw - var(--frame)) / 2));
  overflow: hidden;
}
.hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: right center;
}

/* ===== Generic section ===== */
.section { padding-block: clamp(56px, 8vw, 80px); }
.section--top0 { padding-top: clamp(28px, 4vw, 40px); }
.section--products { position: relative; }
.section--products > .container > .eyebrow--center { margin-bottom: 8px; }
.section--muted { background: var(--cards); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  margin-bottom: 32px;
}
.section__head--center {
  justify-content: center;
  text-align: center;
}
.section__head--center .section__head-text { align-items: center; }
.section__head-text { display: flex; flex-direction: column; gap: 4px; }
.section__subtitle { color: var(--black); font-size: 16px; }
.slider-nav { display: flex; gap: 12px; flex-shrink: 0; }
.section--muted .section__title { margin-bottom: 32px; }
.section--muted .section__title--center { margin-bottom: 32px; }

/* ===== Carousel row (Figma side arrows) ===== */
.carousel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline: -4px;
}
.carousel-row__slider { flex: 1; min-width: 0; }
.carousel-row__btn { flex-shrink: 0; }
.carousel-row__btn.is-disabled { opacity: 0.35; pointer-events: none; }

.section__cta { display: flex; justify-content: center; margin-top: 40px; }

/* ===== Slider ===== */
.slider { --slider-gap: 16px; --slider-cols: 4; position: relative; }
.slider__viewport { overflow: hidden; width: 100%; }
.slider__track {
  display: flex;
  width: 100%;
  gap: var(--slider-gap);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  margin: 0;
  padding: 0;
  grid-template-columns: unset;
}
.slider__track.why-grid { margin-top: 0; }
.slider__track > * {
  flex: 0 0 calc((100% - var(--slider-gap) * (var(--slider-cols) - 1)) / var(--slider-cols));
  min-width: 0;
  box-sizing: border-box;
}
.section__head .slider-nav.slider-nav--hidden,
.catalog__subhead .slider-nav.slider-nav--hidden { visibility: hidden; }
.icon-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ===== Cards grid ===== */
.cards-grid { display: grid; gap: 16px; }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid--cats { grid-template-columns: repeat(4, 1fr); }

/* ===== Product card ===== */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 16px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.product-card__media {
  width: 100%;
  padding: 16px;
  aspect-ratio: 288 / 340;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
a.product-card__media:hover { opacity: 0.92; }
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  padding-top: 0;
}
.product-card__cat {
  font-size: 13px;
  line-height: 1.25;
  color: var(--green);
}
.product-card__name { font-size: 16px; line-height: 1.4; color: var(--black); font-weight: 500; }
.product-card__name:hover { color: var(--green); }
.product-card__desc { font-size: 13px; line-height: 1.4; color: var(--gray); }

/* ===== Category card ===== */
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cards);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 16px;
  background: var(--cards);
}
.cat-card__media img { width: 100%; height: 100%; max-height: 220px; object-fit: contain; }
.cat-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  margin-top: auto;
}
.cat-card__name { font-size: 16px; }
.cat-card__arrow {
  flex-shrink: 0;
  color: var(--green);
  display: inline-flex;
}

/* ===== Science ===== */
.science {
  position: relative;
  background:
    linear-gradient(rgba(0, 122, 64, 0.92), rgba(0, 122, 64, 0.92)),
    url("assets/images/science.png") center / cover no-repeat;
  color: var(--white);
}
.science__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: clamp(56px, 8vw, 80px);
}
.science__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.science__image {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 1;
}
.science__image img { width: 100%; height: 100%; object-fit: cover; }
.science__content { display: flex; flex-direction: column; gap: 40px; }
.science__head { display: flex; flex-direction: column; gap: 16px; }
.science__title { font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.2; }
.science__body { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.science__text { font-size: 16px; line-height: 1.5; }

.science__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.science__features li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 16px;
}
.science__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--white);
}

/* ===== Why ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.why-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: var(--cards);
  overflow: hidden;
}
.why-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 24px;
  background: var(--cards);
}
.why-card__media {
  height: 280px;
  margin-top: auto;
  background: var(--cards);
}
.why-card__media img { width: 100%; height: 100%; object-fit: cover; }
.why-card__title { font-size: 24px; font-weight: 600; line-height: 1.35; color: var(--green); }
.why-card__text { font-size: 16px; line-height: 1.5; color: var(--black); }

/* ===== Footer ===== */
.footer { background: var(--black); color: var(--white); padding-top: clamp(56px, 8vw, 80px); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 24px;
}
.footer__col { display: flex; flex-direction: column; gap: 16px; }
.footer__logo { height: 36px; width: auto; filter: brightness(0) invert(1); }
.footer__desc { color: var(--white); font-size: 16px; line-height: 1.5; }
.footer__site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  align-self: flex-start;
}
.footer__site svg { transition: transform 0.2s ease; }
.footer__site:hover svg { transform: translate(3px, -3px); }

.footer__heading {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--gray);
}
.footer__link { font-size: 16px; font-weight: 500; text-transform: uppercase; transition: color 0.2s ease; }
.footer__link:hover { color: var(--green); }

.footer__contact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 16px;
  line-height: 1.5;
}
.footer__contact svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }

.footer__social { display: flex; gap: 4px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.social-btn:hover { background: var(--green); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 56px);
  padding-block: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .header__inner { grid-template-columns: auto 1fr auto; }
  .nav { display: none; }
  .burger { display: flex; }
  .cards-grid--4,
  .cards-grid--cats,
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .slider { --slider-cols: 2; }
  .why-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .lang { display: none; }
  .hero__layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero__content {
    max-width: none;
    margin-left: 0;
    padding-top: 32px;
    padding-bottom: 48px;
  }
  .hero__media {
    order: -1;
    min-height: clamp(88px, 14vw, 120px);
    margin-right: 0;
    width: 100%;
    padding: 0;
  }
  .hero__media img {
    max-width: 100%;
    margin-left: 0;
    object-fit: cover;
    object-position: center;
  }
  .science__top { grid-template-columns: 1fr; gap: 32px; }
  .science__features { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 600px) {
  .cards-grid--4,
  .cards-grid--cats,
  .cards-grid--3 { grid-template-columns: 1fr; }
  .slider { --slider-cols: 1; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .carousel-row__btn { display: none; }
  .section__head--cats { align-items: flex-start; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ===== Inner pages: breadcrumbs & headings ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  font-size: 13px;
  line-height: 1.25;
}
.breadcrumbs a { color: var(--green); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--gray); }
.breadcrumbs__current { color: var(--gray); }

.page-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
.page-title { font-size: clamp(40px, 5.6vw, 64px); font-weight: 700; line-height: 1.12; }
.page-lead { font-size: 16px; line-height: 1.5; color: var(--gray); max-width: 70ch; }

.prose-wrap { display: flex; flex-direction: column; gap: 32px; }
.prose { display: flex; flex-direction: column; gap: 16px; max-width: 75ch; }
.prose p { font-size: 16px; line-height: 1.6; }

/* ===== About: banner ===== */
.banner {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 320px;
  display: flex;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner__overlay {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: clamp(24px, 5vw, 64px);
  background: linear-gradient(90deg, rgba(0, 122, 64, 0.85), rgba(0, 122, 64, 0.35));
}
.banner__title { color: var(--white); font-size: clamp(24px, 3.4vw, 40px); font-weight: 600; line-height: 1.2; max-width: 22ch; }

/* ===== About: steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
  background: var(--green);
  color: var(--white);
  border-radius: 24px;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--white);
  color: var(--black);
  font-size: 24px;
  font-weight: 600;
  border-radius: 100px;
}
.step__body { display: flex; flex-direction: column; gap: 8px; }
.step__title { font-size: 20px; font-weight: 600; line-height: 1.35; }
.step__text { font-size: 13px; line-height: 1.4; }

/* ===== About: equipment ===== */
.equip { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.equip__text { display: flex; flex-direction: column; gap: 16px; }
.equip__text p { font-size: 16px; line-height: 1.6; }
.equip__subtitle { font-size: 20px; font-weight: 600; line-height: 1.35; }
.equip__media { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.equip__media img { width: 100%; border-radius: var(--radius-card); object-fit: cover; }

/* ===== Cosmetics: split & stat ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split__text { display: flex; flex-direction: column; gap: 16px; }
.split__text p { font-size: 16px; line-height: 1.6; }
.split__text .section__title { margin-bottom: 8px; }
.split__media img { width: 100%; border-radius: var(--radius-card); object-fit: cover; aspect-ratio: 4 / 3; }
.split--reverse .split__media { order: -1; }

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-card);
}
.stat-card__head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.stat-card__num { font-size: clamp(48px, 7vw, 64px); font-weight: 700; line-height: 1; }
.stat-card__title { font-size: 24px; font-weight: 600; line-height: 1.35; }
.stat-card p { font-size: 16px; line-height: 1.6; }

.ingredients { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin: 8px 0 0; }
.ingredient { padding: 16px 0; border-bottom: 1px solid var(--cards); }
.ingredient dt { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.ingredient dd { margin: 0; font-size: 13px; line-height: 1.4; color: var(--gray); }

/* ===== Products catalog ===== */
.catalog { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.catalog__sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--cards);
  border-radius: var(--radius-card);
}
.cat-link {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 16px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cat-link:hover { background: var(--white); color: var(--green); }
.cat-link--active { background: var(--section); color: var(--green); font-weight: 500; }

button.cat-link {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.catalog__empty {
  grid-column: 1 / -1;
  font-size: 16px;
  color: var(--gray);
  padding: 24px 0;
}

.data-error {
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffe69c;
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.5;
}
.data-error code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.catalog__main { display: flex; flex-direction: column; gap: 24px; }
.catalog__sub { scroll-margin-top: 96px; }
.catalog__sub + .catalog__sub { margin-top: 32px; }
.catalog__subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.catalog__subhead .catalog__subtitle { margin-bottom: 0; }
.catalog__subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  padding: 12px 0;
  border-bottom: 2px solid #eee;
  margin: 24px 0 16px;
}
.chips .chip { text-decoration: none; display: inline-block; }
.catalog__head { display: flex; flex-direction: column; gap: 12px; }
.catalog__note { font-size: 13px; line-height: 1.5; color: var(--black); max-width: 80ch; }

.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  padding: 12px 20px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  border-radius: var(--radius-pill);
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chip:hover { background: var(--section); }
.chip--active { background: var(--section); color: var(--green-hover); border-color: var(--green-hover); }

.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ===== Contacts ===== */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 16px; }
.contacts__info { display: flex; flex-direction: column; gap: 24px; }
.contacts__block { display: flex; flex-direction: column; gap: 12px; }
.contacts__title { font-size: 24px; font-weight: 600; line-height: 1.35; }
.contacts__info p { font-size: 16px; line-height: 1.6; }
.contacts__info a { color: var(--green); }
.contacts__info a:hover { text-decoration: underline; }
.contacts__label { color: var(--gray); }
.contacts__divider { width: 100%; height: 1px; border: 0; background: var(--cards); margin: 0; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 10px 16px;
  background: var(--section);
  border-radius: var(--radius-card);
  font-size: 16px;
  color: var(--green) !important;
  transition: background-color 0.2s ease;
}
.pill:hover { background: #d4f0e2; text-decoration: none !important; }

.contacts__form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--cards);
  border-radius: var(--radius-card);
}
.contacts__form-card > p { font-size: 16px; line-height: 1.6; }
.form { display: flex; flex-direction: column; gap: 12px; }
.input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}
.input::placeholder { color: var(--gray); }
.input:focus { outline: none; border-color: var(--green); }
.input--area { resize: vertical; min-height: 96px; }
.form .btn { align-self: flex-start; }

/* ===== Inner pages responsive ===== */
@media (max-width: 1024px) {
  .equip { grid-template-columns: 1fr; }
  .equip__media { position: static; flex-direction: row; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .catalog { grid-template-columns: 1fr; }
  .catalog__sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cards-grid--3 { grid-template-columns: 1fr; }
  .ingredients { grid-template-columns: 1fr; }
  .equip__media { flex-direction: column; }
}

/* ===== Mobile menu ===== */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
  padding: 8px var(--gutter) 16px;
  background: var(--white);
  border-top: 1px solid var(--cards);
  border-bottom: 1px solid var(--cards);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 12px 8px;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: 8px;
}
.mobile-menu a:hover { background: var(--section); color: var(--green); }

/* ===== Product page ===== */
.product-page__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.product-gallery { display: flex; flex-direction: column; gap: 10px; }

.product-gallery__main {
  position: relative;
  height: clamp(320px, 46vw, 552px);
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.product-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.product-gallery__nav--prev { left: 0; }
.product-gallery__nav--next { right: 0; }

.product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.product-gallery__thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  transition: border-color 0.2s ease;
}
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumb--active,
.product-gallery__thumb:hover { border-color: var(--green); }

.product-info { display: flex; flex-direction: column; gap: 16px; }
.product-info__brand {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--green);
}
.product-info__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.25;
}
.product-info__desc { font-size: 16px; line-height: 1.6; }
.product-info__block { display: flex; flex-direction: column; gap: 8px; }
.product-info__label { font-size: 16px; font-weight: 600; line-height: 1.35; }
.product-info__text { font-size: 16px; line-height: 1.6; }
.product-info__text--small { font-size: 13px; line-height: 1.5; color: var(--gray); }
.product-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.section__head--related {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

#related-grid {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#related-grid::-webkit-scrollbar { display: none; }
#related-grid .product-card { scroll-snap-align: start; }

button.product-card__name {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: color 0.2s ease;
}
button.product-card__name:hover { color: var(--green); }

/* ===== Product modal ===== */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.product-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
}

.product-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: min(600px, calc(100vh - 48px));
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.product-modal__close:hover { background: var(--cards); }

.product-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  flex: 1;
}

.product-modal__gallery {
  position: relative;
  background: var(--white);
  min-height: 280px;
}
.product-modal__gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 280px;
  max-height: 600px;
}
.product-modal__gallery .product-gallery__nav {
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.product-modal__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
  overflow-y: auto;
}

.product-modal__cat {
  font-size: 13px;
  line-height: 1.25;
  color: var(--green);
}

.product-modal__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.product-modal__desc { font-size: 16px; line-height: 1.6; }
.product-modal__label { font-size: 16px; font-weight: 600; line-height: 1.35; }
.product-modal__text { font-size: 16px; line-height: 1.6; white-space: pre-line; }
.product-modal__text--small { font-size: 13px; line-height: 1.5; color: var(--gray); }

.product-modal__warning {
  padding: 12px 16px;
  background: var(--cards);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.product-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

body.modal-open { overflow: hidden; }

@media (max-width: 1024px) {
  .product-page__layout { grid-template-columns: 1fr; }
  .product-modal__layout { grid-template-columns: 1fr; }
  .product-modal__dialog { max-height: calc(100vh - 48px); }
  .product-modal__gallery img { max-height: 320px; }
}

@media (max-width: 600px) {
  .product-gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
  .product-info__actions { flex-direction: column; }
  .product-info__actions .btn { width: 100%; }
  .product-modal__body { padding: 24px; }
}
