/* ============================================================
   LEGALIZE — CUSTOM OVERRIDES & POLISH
   This file is loaded AFTER style.min.css and overrides it.
   Edit here — never touch style.min.css.
   ============================================================ */

/* ---------- 1. HEADER: logged-in user button + dropdown ----------- */
.header__user {
  position: relative;
}
.header__user-btn {
  background: transparent;
  border: 1px solid #a5f112;
  color: #a5f112;
  padding: 10px 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.header__user-btn:hover,
.header__user-btn[aria-expanded="true"] {
  background: #a5f112;
  color: #0a0f06;
  transform: translateY(-1px);
}
.header__user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: #0c1208;
  border: 1px solid rgba(165, 241, 18, 0.4);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  z-index: 100;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.header__user-menu[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.header__user-menu[hidden] { display: none; }
.header__user-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.header__user-logout:hover {
  background: rgba(165, 241, 18, 0.12);
  color: #a5f112;
}
.header__user-logout svg {
  flex-shrink: 0;
}

/* ---------- 2. HOVERS — оживляем интерактив ---------- */

/* Главная кнопка */
.btn {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(165, 241, 18, 0.35);
}
.btn:active { transform: translateY(0); }

.btn-stroke {
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.btn-stroke:hover {
  background: rgba(165, 241, 18, 0.12);
  transform: translateY(-2px);
}

/* Карточки каталога */
.types__item,
.product-card {
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
  will-change: transform;
}
.types__item:hover,
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.types__item .link,
.product-card .link {
  transition: transform .3s ease, background-color .3s ease;
}
.types__item:hover .link,
.product-card:hover .link {
  transform: rotate(-12deg) scale(1.06);
}

/* Картинка в карточке стрейна */
.types__item-img img,
.product__img img {
  transition: transform .5s ease;
}
.types__item:hover .types__item-img img,
.product-card:hover .types__item-img img {
  transform: scale(1.05) rotate(-2deg);
}

/* Ссылки в навигации */
.nav a {
  position: relative;
  transition: color .2s ease;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: #a5f112;
  transition: width .3s ease;
}
.nav a:hover { color: #a5f112; }
.nav a:hover::after { width: 100%; }

/* Лого */
.logo { transition: transform .3s ease; }
.logo:hover { transform: scale(1.04); }

/* Переключатель языков */
.lang-swither .swith {
  transition: opacity .2s ease, transform .2s ease;
}
.lang-swither .swith:hover { transform: translateY(-1px); }
.lang-swither .swith.active { opacity: 1; }
.lang-swither .swith:not(.active) { opacity: 0.65; }
.lang-swither .swith:not(.active):hover { opacity: 1; }

/* Шаги "Как вступить в клуб" */
.club__item {
  transition: transform .3s ease;
}
.club__item:hover { transform: translateY(-4px); }
.club__item:hover .club__item-num { color: #a5f112; }
.club__item-num {
  transition: color .25s ease;
}

/* Карточки в футере */
.footer__nav a {
  transition: color .2s ease, padding-left .2s ease;
}
.footer__nav a:hover {
  color: #a5f112;
  padding-left: 4px;
}
.footer__bottom a {
  transition: color .2s ease;
}
.footer__bottom a:hover { color: #a5f112; }

/* Хлебные крошки */
.breadcrumbs a {
  transition: color .2s ease;
}
.breadcrumbs a:hover { color: #a5f112; }

/* Эффекты внутри карточки product */
.product__effect {
  transition: transform .2s ease;
}
.product__effect:hover {
  transform: scale(1.06);
}

/* Модалки — smooth open */
.modal {
  transition: opacity .35s ease, visibility .35s ease;
}
.modal__content {
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}
.modal:not(.active) .modal__content {
  transform: translateY(20px) scale(.96);
  opacity: 0;
}
.modal.active .modal__content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Поля формы — фокус */
.modal__form input,
.modal__form textarea,
.product__form input,
.product__form select,
.product__form textarea {
  transition: border-color .2s ease, box-shadow .2s ease;
}
.modal__form input:focus,
.modal__form textarea:focus,
.product__form input:focus,
.product__form select:focus,
.product__form textarea:focus {
  outline: none;
  border-color: #a5f112;
  box-shadow: 0 0 0 3px rgba(165, 241, 18, 0.18);
}

/* ---------- 3. ANIMATIONS — Reveal on scroll (GSAP-управляемые состояния) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}

/* Stagger детям */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
}

/* ---------- 4. FIX: catalog page — выезжающие карточки и декор ---------- */

/* Глобально гарантируем, что ничего не вылезает за viewport */
html, body { overflow-x: hidden; }
.wrapper { overflow-x: clip; } /* clip лучше hidden для sticky-эффектов */

.catalog {
  position: relative;
  overflow: hidden;
}

/* Декоративные картинки фиксируем внутри блока */
.catalog__dec,
.catalog__dec1 {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  max-width: 50%;
}
.catalog__dec  { top: 60px;    left: -120px; }
.catalog__dec1 { bottom: 40px; right: -100px; }
.catalog__dec img,
.catalog__dec1 img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Контейнер и крошки — поверх декора и без overflow проблем */
.catalog .container,
.catalog .breadcrumbs {
  position: relative;
  z-index: 1;
}
.catalog .container {
  max-width: 100%;
  box-sizing: border-box;
}

/* GRID каталога: minmax(0,1fr) предотвращает overflow карточек,
   автозаполнение для разной ширины экрана */
.catalog__wrapper {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}
.catalog__wrapper > * {
  min-width: 0;       /* запрещаем содержимому раздувать ячейку */
  max-width: 100%;
  box-sizing: border-box;
}

/* Sama карточка не должна выезжать */
.product-card,
.types__item {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.product-card .types__item-info,
.product-card .product__img {
  min-width: 0;
  max-width: 100%;
}

/* Хлебные крошки — не вылезают, контейнер ограничен */
.breadcrumbs .container {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Title page (Sativa) не должен вылезать */
.catalog__title {
  word-break: break-word;
  max-width: 100%;
}

/* ---------- 5. МЕЛКИЕ ШТРИХИ ---------- */

/* Текстовые поля — placeholder читаемее */
.product__form ::placeholder,
.modal__form ::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

/* Бургер — анимация в крестик при открытии */
.hamburger { transition: transform .3s ease; }
.hamburger__line {
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Smooth scroll по якорям */
html { scroll-behavior: smooth; }

/* ---------- 6. THANK YOU блок (после успешной заявки) ---------- */
.lg-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 8px;
  text-align: center;
  animation: lgThanksIn .5s cubic-bezier(.2, .8, .2, 1);
}
.lg-thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lg-thanks__text {
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  max-width: 360px;
  margin: 0;
}
@keyframes lgThanksIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ---------- 7. ADAPTIV — mobile / tablet ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .types__wrapper,
  .catalog__wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
  .club__wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .product__wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product__img img { width: 100%; height: auto; }
}

/* Mobile */
@media (max-width: 768px) {
  /* Navigation как off-canvas */
  .header .nav {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 4, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transform: translateY(-100%);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    z-index: 90;
    padding: 80px 24px 24px;
  }
  .header .nav.active {
    transform: translateY(0);
  }
  .header .nav a {
    font-size: 22px;
    text-align: center;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
    position: relative;
    cursor: pointer;
  }
  .hamburger__line {
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform .3s ease, opacity .3s ease, background-color .3s ease;
  }

  /* Карточки в одну колонку */
  .types__wrapper,
  .catalog__wrapper,
  .club__wrapper,
  .footer__nav {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Hero уменьшить */
  .hero__title,
  .hero h1,
  .product__name,
  .catalog__title,
  .section__title {
    font-size: clamp(28px, 6vw, 38px);
    line-height: 1.15;
  }
  .hero__descr,
  .hero p {
    font-size: 15px;
  }

  /* Контейнер с отступами */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Шапка — компактнее */
  .header {
    padding: 14px 0;
  }
  .header .container {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header .logo img {
    height: 36px;
    width: auto;
  }

  /* Переключатель языков — горизонтально, компактнее */
  .lang-swither {
    gap: 4px;
  }
  .lang-swither .swith {
    padding: 4px 8px;
    font-size: 12px;
  }
  .lang-swither .swith img {
    width: 16px;
    height: 12px;
  }

  /* User кнопка */
  .header__user-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Модалки на мобильных */
  .modal__content {
    width: calc(100vw - 24px);
    max-width: 100%;
    padding: 24px 18px;
    margin: 12px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
  .modal .close {
    top: 12px;
    right: 12px;
  }

  /* Product page форма заказа */
  .product__form {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .product__form-input.quantity,
  .product__form-input.date,
  .product__form-input.time {
    grid-column: span 1;
  }

  /* FAQ */
  .faq__item,
  .faq-item {
    padding: 14px 12px;
  }

  /* Декор не выезжает */
  .catalog__dec,
  .catalog__dec1,
  .dec,
  .dec1 {
    max-width: 65%;
    opacity: 0.55;
  }

  /* Steps "Как вступить в клуб" — стрелки уберём, vertical layout */
  .club__wrapper {
    gap: 24px;
  }
  .club__item {
    text-align: center;
  }

  /* Футер */
  .footer__wrapper {
    flex-direction: column;
    gap: 22px;
    text-align: center;
    align-items: center;
  }
  .footer__nav-block {
    align-items: center;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .modal__title {
    font-size: 18px;
    line-height: 1.3;
  }
  .modal__form input,
  .modal__form textarea {
    padding: 12px 14px;
    font-size: 14px;
  }
  .lang-swither .swith {
    padding: 3px 6px;
    font-size: 11px;
  }
  .lang-swither .swith img {
    display: none;
  }
}

/* ---------- 8. РЕДАКТУРА — мелкие баги ---------- */

/* Если у Леона .modal не имеет display:none по умолчанию — гарантируем */
body > .modal:not(.active) {
  /* не трогаем display: пусть остаётся flex/block, как у Леона; opacity+visibility управляются базовым CSS */
}

/* Picture внутри стрейн-карточки — фикс пропорций */
.product-card .types__item-img {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .types__item-img img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Если кнопка отправки внутри формы заявки blocked при загрузке — показываем cursor */
button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* Поля даты/времени — выровнять с другими */
input[type="date"],
input[type="time"] {
  font-family: inherit;
  color-scheme: dark;
}



/* === Effect/Taste level dots === */
.rate__bar{display:inline-flex;align-items:center;gap:.6rem}
.rate__dot{width:1.2rem;height:1.2rem;border-radius:50%;background:rgba(255,255,255,.28)}
.rate__dot.on{background:#fff}

/* === Strain card: contain image, fix arrow circle overlap === */
.product-card{position:relative;overflow:hidden}
.product-card .product__img{width:auto;flex:0 1 auto}
.product-card .link{right:2.4rem;bottom:2.4rem}


/* === Branded order-form dropdowns === */
.product__form .wrap{position:relative}
.csel__panel{position:absolute;top:calc(100% + .6rem);left:0;right:0;z-index:50;background:#0c1a22;border:1px solid rgba(165,241,18,.5);border-radius:1.2rem;padding:.6rem;display:none;max-height:26rem;overflow:auto;box-shadow:0 1rem 3rem rgba(0,0,0,.5)}
.product__form .wrap.open .csel__panel{display:block}
.csel__opt{padding:1.2rem 1.6rem;border-radius:.8rem;color:#fff;cursor:pointer;font-size:1.6rem}
.csel__opt:hover{background:rgba(165,241,18,.15)}
.csel__opt.sel{background:rgba(165,241,18,.22);color:#a5f112}


/* === Strain product card — clean square layout === */
.product-card{position:relative !important;display:block !important;height:46.8rem;border-radius:2.4rem !important;overflow:hidden !important;padding:0 !important;background-image:none !important}
.product-card.bord{background:linear-gradient(150deg,#E72388,#811415)!important}
.product-card.green{background:linear-gradient(150deg,#76B325,#2D8114)!important}
.product-card.orange{background:linear-gradient(150deg,#E7CD23,#811415)!important}
.product-card.gray{background:linear-gradient(150deg,#8D8D8D,#4F4F4F)!important}
.product-card.blue{background:linear-gradient(150deg,#239FE7,#144181)!important}
.product-card.purple{background:linear-gradient(150deg,#8823E7,#171481)!important}
.product-card.green-blue{background:linear-gradient(150deg,#23E7B9,#0E6A94)!important}
.product-card.purple-orange{background:linear-gradient(150deg,#9A109A,#FF4400)!important}
.product-card.blue-dark{background:linear-gradient(150deg,#04227C,#0E0D2E)!important}
.product-card .product__img{position:static !important;width:auto !important;display:contents !important}
.product-card .types__item-name{position:absolute !important;top:2.8rem;left:2.8rem;margin:0 !important;z-index:3}
.product-card .product-card-name{position:absolute !important;top:6.2rem;left:2.8rem;margin:0 !important;z-index:3}
.product-card .types__item-img{position:absolute !important;left:1rem;bottom:0;width:21rem !important;min-width:0 !important;height:auto !important;margin:0 !important;z-index:1}
.product-card .types__item-img img{width:100% !important;height:auto !important;object-fit:contain}
.product-card .types__item-info{position:absolute !important;top:2.8rem;right:2.8rem;left:auto !important;width:44% !important;display:flex !important;flex-direction:column;z-index:2}
.product-card .types__item-descr{margin-top:3rem !important;color:#fff !important;font-size:1.5rem;line-height:1.45}
.product-card .link{position:absolute !important;right:2.4rem;bottom:2.4rem}


/* === Single strain page — content text white === */
.product__wrapper .wp-block-paragraph,.product__wrapper p,.product__info p{color:#fff !important}

/* === Catalog archive — soften decorative background (no hard edges) === */
.catalog__dec,.catalog__dec1{opacity:.38 !important}
.catalog__dec img,.catalog__dec1 img{-webkit-mask-image:radial-gradient(closest-side,#000 30%,transparent 92%) !important;mask-image:radial-gradient(closest-side,#000 30%,transparent 92%) !important}

/* === Media platform: toggle + social buttons === */
.media__tabs{display:inline-flex;gap:.8rem;margin:0 0 3.2rem;background:rgba(255,255,255,.06);padding:.6rem;border-radius:999px}
.media__tab{font:600 1.6rem/1 inherit;color:#fff;background:transparent;border:0;padding:1.2rem 2.8rem;border-radius:999px;cursor:pointer;transition:.2s}
.media__tab.is-active{background:#a5f112;color:#0b1a12}
.media__cta{margin-top:3.2rem;text-align:center}
.media__cta a{display:inline-flex;align-items:center;gap:1rem;background:#a5f112;color:#0b1a12;font:700 1.6rem/1 inherit;padding:1.6rem 3.2rem;border-radius:1.2rem;text-decoration:none;transition:.2s}
.media__cta a:hover{filter:brightness(1.08)}
.media__ig{min-height:24rem;display:flex;align-items:center;justify-content:center}
.media__ig-ph{color:rgba(255,255,255,.6);font-size:1.6rem;padding:4rem 0;text-align:center}

/* === Хедер: плавное появление + высота кнопок как у переключателя языка === */
@media (min-width:1025px){
  @keyframes lzHeaderIn{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:none}}
  .header .logo,.header .nav,.header__actions{animation:lzHeaderIn .6s cubic-bezier(.22,.61,.36,1) both}
  .header .nav{animation-delay:.08s}
  .header__actions{animation-delay:.16s}
}
.header__actions .btn{height:69px;min-height:69px;padding-top:0;padding-bottom:0;display:inline-flex;align-items:center;justify-content:center;line-height:1}

/* === Карточки: убрать зум стрелки (резался угол при наведении) === */
.types__item:hover .link,.product-card:hover .link{transform:none}

/* === Media: кнопки YouTube + Instagram по центру под блоком === */
.media__links{display:flex;justify-content:center;gap:1.6rem;margin-top:4rem;flex-wrap:wrap}
.media__link{display:inline-flex;align-items:center;justify-content:center;min-width:20rem;padding:1.6rem 3.2rem;border-radius:1.2rem;font:700 1.6rem/1 inherit;text-decoration:none;transition:.2s}
.media__link--yt{background:#ff0033;color:#fff}
.media__link--ig{background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);color:#fff}
.media__link:hover{filter:brightness(1.08);transform:translateY(-2px)}

/* === Hero: фоновое видео (автоплей один раз) === */
.hero{position:relative;overflow:hidden}
.hero__video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;pointer-events:none}
.hero>*:not(.hero__video){position:relative;z-index:1}

/* === Переносы строк в описаниях сортов (из админки) === */
.types__item-descr,.product-card .types__item-descr,.product__wrapper p,.product__info p{white-space:pre-line}

/* === Hero video: контент поверх видео, кнопка кликабельна === */
.hero .container{position:relative;z-index:2}
.hero__video{z-index:0;pointer-events:none}
.hero .btn{position:relative;z-index:3;pointer-events:auto}

/* hero-layer-fix: hero над секцией types, чтобы .blur не затемнял кнопку */
.hero{position:relative;z-index:5}


/* media-breadcrumb-spacing: отступ крошек как на внутренних страницах */
.page-template-media .breadcrumbs{margin-top:5rem}


/* card-text-clamp */
.types__item-descr{display:-webkit-box;-webkit-line-clamp:5;line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}

/* hero-soft-bottom: мягкое растворение низа hero в фон (кнопка остаётся поверх) */
.types{margin-top:0 !important}
.hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:38%;background:linear-gradient(to bottom,rgba(1,13,22,0),rgba(1,13,22,1));z-index:2;pointer-events:none}

/* hero-btn-up: поднять кнопку ближе к описанию */
.hero .btn{margin-top:-7rem}
