/* ============================================================
   refine.css — слой визуальной полировки питомниккрупномеров.рф
   Единый источник: /assets/refine.css, подключён на всех страницах
   ПОСЛЕ inline-стилей. Канон: акцент #8cc63f, шрифт Onest.
   2026-07-14
   ============================================================ */

:root {
  --rf-accent: #8cc63f;
  --rf-accent-hover: #7cb437;
  --rf-ink: #1a1a18;
  --rf-radius: 14px;
  --rf-shadow-sm: 0 1px 2px rgba(26,26,24,.05), 0 4px 12px rgba(26,26,24,.06);
  --rf-shadow-md: 0 2px 4px rgba(26,26,24,.06), 0 12px 32px rgba(26,26,24,.12);
  --rf-ease: cubic-bezier(.22,.61,.36,1);
}

/* --- тонкая точечная сетка на светлом фоне (фирменный приём ПН) --- */
body {
  background-color: #fff;
  background-image: radial-gradient(rgba(28,28,25,.05) .8px, transparent .8px);
  background-size: 30px 30px;
}

/* --- шапка: стекло + читаемость --- */
.header {
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: linear-gradient(rgba(17,17,16,.42), rgba(17,17,16,.18)) !important;
  transition: background .35s var(--rf-ease);
}
.header .nav a { transition: color .2s, opacity .2s; }
.header .nav a:hover { color: var(--rf-accent); }

/* --- hero: типографика --- */
.hero h1 { text-wrap: balance; letter-spacing: -0.025em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }

/* --- типографика заголовков секций --- */
h2 { letter-spacing: -0.02em; text-wrap: balance; }
h3 { letter-spacing: -0.01em; }

/* --- кнопки: скругление, живой ховер --- */
.btn {
  border-radius: 999px !important;
  transition: transform .25s var(--rf-ease), box-shadow .25s var(--rf-ease),
              background .2s, border-color .2s, color .2s !important;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(140,198,63,.35); }
.btn:active { transform: translateY(0); }
.btn--gold:hover { background: var(--rf-accent-hover) !important; border-color: var(--rf-accent-hover) !important; }
.btn:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 3px; }

/* --- карточки каталога и категорий --- */
.card, .cat-card {
  border-radius: var(--rf-radius) !important;
  overflow: hidden;
  box-shadow: var(--rf-shadow-sm);
  transition: transform .35s var(--rf-ease), box-shadow .35s var(--rf-ease);
  will-change: transform;
}
.card:hover, .cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--rf-shadow-md);
}
.card__img, .cat-card img {
  transition: transform .6s var(--rf-ease);
}
.card:hover .card__img, .cat-card:hover img { transform: scale(1.045); }
.card__status {
  border-radius: 999px !important;
  font-weight: 600;
  letter-spacing: .06em;
}

/* --- преимущества и шаги: мягкие разделители вместо жёстких линий --- */
.advantage, .step {
  transition: transform .3s var(--rf-ease);
}
.advantage:hover, .step:hover { transform: translateY(-3px); }
.advantage__icon { transition: transform .3s var(--rf-ease); }
.advantage:hover .advantage__icon { transform: scale(1.08); }

/* --- FAQ: плавность --- */
.faq__q { transition: color .2s; }
.faq__q:hover { color: var(--rf-accent-hover); }

/* --- FAB: тише и мягче --- */
.fab { box-shadow: 0 6px 20px rgba(26,26,24,.18) !important; }
.fab:hover { transform: translateY(-3px) scale(1.05) !important; }

/* --- изображения в контентных секциях --- */
.adapt__photo, .adapt__photo img { border-radius: var(--rf-radius); }

/* --- reveal при скролле: только transform, контент НИКОГДА не прячется полностью --- */
@media (prefers-reduced-motion: no-preference) {
  .rf-reveal { opacity: .001; transform: translateY(22px); }
  .rf-reveal.rf-in {
    opacity: 1; transform: none;
    transition: opacity .7s var(--rf-ease), transform .7s var(--rf-ease);
  }
}

/* --- мобайл: ритм плотнее --- */
@media (max-width: 640px) {
  .hero h1 { letter-spacing: -0.02em; }
  .card:hover, .cat-card:hover { transform: none; }
}

/* --- карточки товаров из каталога Студии --- */
.card__name { overflow-wrap: anywhere; font-size: clamp(17px, 1.3vw, 21px) !important; line-height: 1.25; }
.card__lat { font-style: italic; opacity: .6; font-size: 13.5px; margin: 2px 0 6px; }

/* --- прогрессивное раскрытие каталога --- */
.card--extra { display: none; }
.catalog__grid.rf-expanded .card--extra { display: flex; flex-direction: column; }
.catalog__more-btn {
  appearance: none; cursor: pointer;
  background: transparent; color: inherit;
  border: 1.5px solid currentColor; border-radius: 999px;
  padding: 13px 34px; font: 600 13px/1 "Onest", sans-serif;
  letter-spacing: .08em; text-transform: uppercase; opacity: .85;
  transition: opacity .2s, background .25s, color .25s, transform .25s;
}
.catalog__more-btn:hover {
  opacity: 1; background: #8cc63f; border-color: #8cc63f;
  color: #1a1a18; transform: translateY(-2px);
}

/* --- CTA внутри карточек: pill, как все кнопки --- */
.card__cta {
  border-radius: 999px !important;
  transition: transform .25s var(--rf-ease), box-shadow .25s var(--rf-ease), background .2s, filter .2s !important;
}
.card__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(140,198,63,.3); filter: brightness(1.05); }

/* --- заглушки карточек без фото: компактно + латынь сорта --- */
.card__img:has(.card__placeholder) { height: 150px !important; min-height: 0 !important; }
.card__placeholder {
  height: 100% !important; min-height: 0 !important;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.card__placeholder::before {
  content: "";
  position: absolute; inset: 0; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 64 64%27%3E%3Cg fill=%27none%27 stroke=%27%23dfe8d0%27 stroke-width=%271.4%27 opacity=%27.55%27%3E%3Cpath d=%27M32 10 L22 26 h6 L18 40 h9 L16 54 h32 L37 40 h9 L36 26 h6 Z%27/%3E%3Cline x1=%2732%27 y1=%2754%27 x2=%2732%27 y2=%2760%27/%3E%3C/g%3E%3C/svg%3E") center / 56px no-repeat;
}
.card__ph-lat {
  position: relative; z-index: 1;
  font-style: italic; font-size: 12.5px; letter-spacing: .04em;
  color: rgba(245,244,240,.55); text-align: center; padding: 0 14px;
  transform: translateY(34px);
}
@media (max-width: 640px) {
  .card__img:has(.card__placeholder) { height: 110px !important; }
}
.card__placeholder > span:not(.card__ph-lat) { display: none !important; }
.card__img:has(.card__placeholder) {
  background: linear-gradient(150deg, #2e4530, #1f3322 55%, #182a1c) !important;
}
.card__placeholder { background: none !important; }

/* --- реальные фото товаров: обычная высота, cover-заполнение --- */
.card__img:has(> img) { height: 210px !important; min-height: 0 !important; }
.card__img > img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .card__img:has(> img) { height: 170px !important; }
}

/* --- нормальные внутренние отступы карточки товара --- */
.card-price { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule, rgba(230,230,230,.5)); }
.card__cta { margin-top: 14px !important; }
.card__lat, .card__latin { margin: 2px 0 6px; font-style: italic; opacity: .85; }
