/* =====================================================================
   alnur — botanical theme (green & white)
   Финальный слой поверх main.css: токены, типографика, шапка, кнопки,
   карточки, подвал. Страничные стили наследуют его через переменные.
   ===================================================================== */

:root {
  --forest: #2e4529;
  --green-deep: #2e4529;
  --green: #3c5a37;
  --green-hover: #31492d;
  --leaf: #6f8f5f;
  --mint: #e9efe4;
  --mint-soft: #f5f8f2;
  --white: #ffffff;
  --cream: #ffffff;
  --mist: #f5f8f2;
  --ink: #1b2118;
  --muted: #5f6a5a;
  --sage: #5f6a5a;
  --line: #e3e9de;
  --amber: #c98a2b;
  --danger: #b4372f;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(46, 69, 41, 0.06), 0 12px 32px rgba(46, 69, 41, 0.08);
  --shadow-soft: 0 1px 2px rgba(46, 69, 41, 0.05);
  --shadow-lift: 0 2px 4px rgba(46, 69, 41, 0.06), 0 20px 44px rgba(46, 69, 41, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Onest", system-ui, -apple-system, sans-serif;
  --font-mark: "Onest", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(64px, 8vw, 120px);
}

html { background: var(--white); }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

a { color: var(--ink); }
::selection { background: var(--mint); color: var(--forest); }

.shell,
.home-wrap,
.footer-inner {
  width: calc(100% - 2 * var(--gutter));
  max-width: 1360px;
  margin-inline: auto;
}

/* --- типографика --- */
h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.08; }
h3 { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.25; letter-spacing: -0.015em; }

em, i { font-style: normal; }

.eyebrow,
.footer-label,
.nice-select-hint {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--green);
}

.lede { color: var(--muted); font-size: 18px; line-height: 1.55; }
.muted { color: var(--muted); }
.price, .price-lg { font-variant-numeric: tabular-nums; }

/* --- announcement + header --- */
.announce-bar {
  background: var(--forest);
  color: #d3dfca;
  font-size: 13px;
}

.announce-bar .shell {
  display: flex;
  justify-content: center;
  gap: 8px 32px;
  flex-wrap: wrap;
  padding: 9px 0;
}

.announce-bar span { display: inline-flex; align-items: center; gap: 8px; }
.announce-bar span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a9c48f;
}

.top {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.top-inner { min-height: 72px; padding: 8px 0; gap: 28px; }
.logo img { height: 46px; }

nav a,
.top-right a:not(.btn),
.top-right .linkish,
.header-cart {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
}

nav a,
.top-right a:not(.btn),
.site-footer a,
.pdp-crumb a {
  background: none;
  padding-bottom: 0;
  transition: color 200ms var(--ease-out);
}

@media (hover: hover) {
  nav a:hover,
  .top-right a:not(.btn):hover,
  .pdp-crumb a:hover { color: var(--green); background: none; }
}

.header-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
  margin: 0;
}

.header-search input {
  width: 100%;
  height: 44px;
  padding: 0 18px 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mint-soft);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

.header-search input::placeholder { color: #868f80; }

.header-search input:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(111, 143, 95, 0.14);
}

.header-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  pointer-events: none;
}

.cart-link .count,
.header-cart .count,
.dock .count {
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0;
}

.nav-toggle,
.nav-close {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: none;
}

.nav-toggle span,
.nav-close span { background: var(--ink); }

/* --- кнопки --- */
.btn,
button.btn,
button:not(.linkish):not(.nice-select-btn):not(.nav-toggle):not(.nav-close):not(.stepper-btn) {
  border-radius: 999px;
  box-shadow: none;
  background: var(--green);
  color: var(--white);
  padding: 15px 28px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.btn-sm,
button:not(.linkish):not(.btn):not(.nice-select-btn):not(.nav-toggle):not(.nav-close):not(.stepper-btn) {
  padding: 11px 20px;
  font-size: 14px;
}

.top-right a.btn { padding: 10px 18px; font-size: 14px; }

.btn-ghost {
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
}

.btn-light { background: var(--white) !important; color: var(--forest) !important; }

@media (hover: hover) {
  .btn:hover,
  button:not(.linkish):not(.nice-select-btn):not(.nav-toggle):not(.nav-close):not(.stepper-btn):hover {
    background: var(--green-hover);
    color: var(--white);
    box-shadow: none;
  }
  .btn-light:hover { background: var(--mint) !important; }
  .btn-ghost:hover { background: var(--ink); color: var(--white); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn:active:not(:disabled),
  button:not(.linkish):not(.nice-select-btn):not(.nav-toggle):not(.nav-close):not(.stepper-btn):active:not(:disabled) {
    transform: scale(0.97);
  }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
}

.text-link {
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: none;
  padding: 0;
}

.linkish { letter-spacing: 0; text-transform: none; font-size: 15px; }

/* --- формы --- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea { border-radius: 12px; }

.check input { accent-color: var(--green); }

.messages li {
  border-radius: 14px;
  background: var(--mint);
  color: var(--forest);
  border: 0;
}

/* --- карточка товара --- */
.grid { gap: 32px 20px; }

.card {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.card-media {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--mint-soft);
  overflow: hidden;
}

.card-media img {
  padding: 14%;
  outline: 0;
  mix-blend-mode: multiply;
  transition: transform 500ms var(--ease-out);
}

.card-no-photo .card-media img { padding: 0; mix-blend-mode: normal; }

.card-placeholder {
  color: var(--green);
  font-family: var(--font-ui);
  font-weight: 600;
  background: var(--mint);
}

.card-badge {
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  backdrop-filter: none;
}

.card-badge-soft {
  background: var(--white);
  color: var(--forest);
  border: 0;
}

.card-quick { display: none !important; }

.card-body { padding: 14px 2px 0; gap: 4px; }

.card-brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}

.card-title {
  font-size: 14.5px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.card-meta { padding-top: 8px; }

.card .price {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card .price-request { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Форма накрывает квадрат фото; кликабельна только сама кнопка. */
.card-add {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto 0;
  aspect-ratio: 1 / 1;
  margin: 0;
  pointer-events: none;
}

.card-add-btn { pointer-events: auto; }

.card-add-btn,
.card .card-add-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid;
  place-items: center;
  background: var(--white) !important;
  color: var(--forest) !important;
  box-shadow: 0 2px 10px rgba(46, 69, 41, 0.14) !important;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), background-color 200ms, color 200ms !important;
}

.card-add-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.card:hover .card-add-btn,
.card:focus-within .card-add-btn { opacity: 1; transform: none; }

@media (hover: hover) {
  .card .card-add-btn:hover { background: var(--green) !important; color: var(--white) !important; }
  .card:hover .card-media img { transform: scale(1.05); }
  .card:hover { transform: none; box-shadow: none; }
}

@media (hover: none) {
  .card-add-btn,
  .card .card-add-btn { opacity: 1; transform: none; width: 40px; height: 40px; right: 8px; bottom: 8px; }
}

.card.is-oos .card-media img { filter: grayscale(0.5); opacity: 0.6; }

/* --- подвал --- */
.site-footer {
  margin-top: var(--section);
  padding: clamp(56px, 6vw, 88px) 0 calc(48px + env(safe-area-inset-bottom));
  background: var(--forest);
  color: #c2cfb9;
  border-top: 0;
  font-size: 15px;
}

.footer-inner { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-logo { filter: brightness(0) invert(1); opacity: 0.95; height: 44px; }
.site-footer p { color: #c2cfb9; }
.site-footer .footer-label { color: #ffffff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.site-footer a { color: #edf2e8; font-size: 15px; margin-bottom: 10px; }

@media (hover: hover) {
  .site-footer a:hover { color: #a9c48f; background: none; }
}

/* --- нижний док на мобильном --- */
.dock {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.dock a { color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; border-radius: 14px; }
.dock a.is-active { color: var(--forest); background: var(--mint); }

/* --- общие детали страниц --- */
.chip,
.origin-chip { border-radius: 999px; letter-spacing: 0; text-transform: none; font-size: 14px; }
.chip.is-on { background: var(--forest); color: var(--white); border-color: var(--forest); }

.empty-panel { border-radius: var(--radius); border: 1px solid var(--line); background: var(--mint-soft); }

.page-hero,
.page-catalog .catalog-hero { border-radius: var(--radius-lg); overflow: hidden; }

.gallery-stage { border-radius: var(--radius); background: var(--mint-soft); }
.gallery-thumb { border-radius: 12px; overflow: hidden; }
.gallery-thumb img { background: var(--mint-soft); }
.gallery-thumb.is-on { outline: 2px solid var(--green); outline-offset: 2px; }

.cabinet-card,
.manager-block,
.auth-card,
.pdp-panel,
.filters { border-radius: var(--radius); }

.js-reveal [data-reveal] { transform: translateY(16px); }

@media (max-width: 960px) {
  .header-search { display: none; }
  .announce-bar .shell { gap: 4px 18px; font-size: 12px; padding: 7px 0; }
  .announce-bar span:nth-child(n + 3) { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
  body { font-size: 15px; }
}

/* Шапка на десктопе: логотип · меню · поиск · действия. */
@media (min-width: 961px) {
  .top-inner { gap: 24px; }
  .top-inner > .site-nav { display: contents; }
  .top-inner .logo { order: 0; }
  .top-inner .site-nav > nav { order: 1; flex: none; display: flex; gap: 22px; }
  .top-inner .header-search { order: 2; margin-inline: auto; }
  .top-inner .site-nav > .top-right { order: 3; flex: none; gap: 18px; }
}

.top-right a.btn,
.top-right .btn {
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 14px;
  font-weight: 600;
}

.top .header-search input[type="search"] { padding: 0 18px 0 46px; height: 44px; border-radius: 999px; font-size: 15px; }

.site-footer .footer-logo { filter: none; opacity: 1; height: 56px; padding: 8px 12px; border-radius: 14px; background: #ffffff; }

/* Курсив остался от прежней антиквы — в гротеске он не нужен. */
h1, h2, h3, h4, .price-lg, .pdp-title, blockquote { font-style: normal !important; }

@media (max-width: 960px) {
  .announce-bar span:nth-child(n + 2) { display: none; }
  .top-inner { flex-wrap: wrap; row-gap: 6px; min-height: 0; padding: 8px 0 10px; }
  .top .header-search { display: block; order: 10; flex: 1 0 100%; max-width: none; margin: 0; }
  .top .header-search input[type="search"] { height: 42px; font-size: 16px; }
}

/* Поля и выпадающие списки: мятная плашка, видимая граница, зелёный список. */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border: 1.5px solid #8ea384;
  border-radius: 14px;
  background-color: var(--mint);
  padding: 13px 16px;
  color: var(--ink);
  box-shadow: none;
  min-height: 48px;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(111, 143, 95, 0.18);
}

input::placeholder,
textarea::placeholder { color: var(--muted); }

.header-search input,
.top .header-search input[type="search"] {
  min-height: 0;
  height: 44px;
  padding: 0 18px 0 46px;
  border: 1.5px solid #8ea384;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: none;
}

.header-search input:focus,
.top .header-search input[type="search"]:focus {
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(111, 143, 95, 0.16);
}

.nice-select-btn {
  min-height: 48px;
  padding: 10px 16px;
  border: 1.5px solid #8ea384 !important;
  border-radius: 14px !important;
  background: var(--mint) !important;
  color: var(--ink) !important;
  box-shadow: none;
}

.nice-select-btn:hover,
.nice-select.is-open .nice-select-btn {
  border-color: var(--green) !important;
  background: var(--white) !important;
  box-shadow: 0 0 0 4px rgba(111, 143, 95, 0.16);
}

.nice-select-hint {
  color: var(--green);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nice-select-value { color: var(--ink); font-weight: 500; }
.nice-select-value.is-placeholder { color: var(--muted); font-weight: 400; }

.nice-select-caret { color: var(--forest); }

.nice-select.is-open .nice-select-caret { transform: rotate(180deg); }

.nice-select-list {
  border: 1.5px solid var(--green);
  border-radius: 16px;
  background: var(--white);
  padding: 6px;
  box-shadow: var(--shadow-lift);
}

.nice-select-list li {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--ink);
}

.nice-select-list li:hover,
.nice-select-list li.is-active {
  background: var(--mint);
  color: var(--forest);
}

.nice-select-list li.is-selected {
  background: var(--forest);
  color: var(--white);
}
