/* Greenleaf Beauty — оживление: переходы, плотность, интерактив */
html.js body { opacity: 0; transition: opacity .35s ease; }
html.js body.ready { opacity: 1; }
html.js body.leaving { opacity: 0; transition: opacity .18s ease; }
.card-media { aspect-ratio: 3 / 4; }
.gallery .main { aspect-ratio: 3 / 4; }
.hero-visual .bottle { aspect-ratio: 3 / 4; }
.hero-visual .b1 { top: 18%; } .hero-visual .b2 { top: -2%; } .hero-visual .b3 { top: 26%; }
.hero-visual .bottle img { transition: transform .6s; }
.hero-visual .bottle:hover img { transform: scale(1.06); }
.hero-visual .bottle .tag { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); color: var(--g900); font-size: .68rem; font-weight: 800; padding: 5px 9px; border-radius: 999px; opacity: 0; transform: translateY(6px); transition: .3s; }
.hero-visual .bottle:hover .tag { opacity: 1; transform: none; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--g200); padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--g800); box-shadow: var(--shadow-s); }
.hero-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--g500); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(63,150,98,.5) } 60% { box-shadow: 0 0 0 8px rgba(63,150,98,0) } }
.section { padding: 56px 0; }
.section.tight { padding: 32px 0; }

/* бегущая строка */
.marquee { overflow: hidden; background: var(--g900); color: #cfe8d6; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { white-space: nowrap; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 14px; }
.marquee-track span::after { content: "✦"; color: var(--g400); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* категории с фото */
.cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card { padding: 0; aspect-ratio: 1 / 1.05; overflow: hidden; display: block; text-align: left; border: 0; background: var(--g100); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.cat-card:hover img { transform: scale(1.08); }
.cat-card .ov { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,54,38,0) 40%, rgba(20,54,38,.85)); }
.cat-card .em { position: absolute; top: 14px; left: 14px; margin: 0; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.92); font-size: 1.3rem; }
.cat-card .txt { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.cat-card .txt h3 { color: #fff; font-size: 1.3rem; margin-bottom: 2px; }
.cat-card .txt p { color: #cfe8d6; font-size: .8rem; margin: 0; }
.cat-card .txt small { display: inline-block; margin-top: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; opacity: .8; transition: .3s; }
.cat-card:hover .txt small { opacity: 1; letter-spacing: .14em; }
.cat-card.wide { grid-column: span 2; aspect-ratio: 2 / 1.05; }

/* карточки: быстрый просмотр, рейтинг */
.card .quick { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; opacity: 0; transform: translateY(8px); transition: .25s; }
.card:hover .quick { opacity: 1; transform: none; }
.card .quick .btn { width: 100%; background: rgba(255,255,255,.92); color: var(--g900); border-color: transparent; backdrop-filter: blur(6px); }
.card .quick .btn:hover { background: #fff; }
.card.reveal { transition: opacity .5s, transform .5s, box-shadow .25s, border-color .25s; }
.card-body .rating { font-size: .72rem; color: var(--gold); letter-spacing: 1px; }
.card-body .rating span { color: var(--muted); letter-spacing: 0; margin-left: 4px; }

/* квиз */
.quiz { background: var(--g800); color: #fff; border-radius: 28px; padding: 44px; position: relative; overflow: hidden; }
.quiz h2 { color: #fff; }
.quiz p { color: #c6dccd; }
.quiz .q { display: none; }
.quiz .q.active { display: block; animation: fadeUp .4s; }
.quiz .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.quiz .opt-btn { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18); color: #fff; padding: 16px; border-radius: 16px; font-weight: 700; text-align: left; transition: .2s; display: flex; gap: 10px; align-items: center; }
.quiz .opt-btn:hover { background: rgba(255,255,255,.16); border-color: #fff; transform: translateY(-2px); }
.quiz .opt-btn em { font-style: normal; font-size: 1.4rem; }
.quiz .steps-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.quiz .steps-dots i { width: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); }
.quiz .steps-dots i.on { background: var(--g300); }
.quiz .result .grid { margin-top: 20px; }
.quiz .result .card { color: var(--text); }
.quiz .again { margin-top: 16px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px) } }

/* отзывы: горизонтальная лента */
.reviews { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.reviews::-webkit-scrollbar { display: none; }
.review { flex: 0 0 min(360px, 85vw); scroll-snap-align: start; }
.review .prod { display: inline-block; margin-top: 8px; font-size: .78rem; color: var(--g700); text-decoration: underline; }

.faq-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }

/* недавно смотрели */
.recent-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-row a { flex: 0 0 120px; }
.recent-row img { width: 120px; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; transition: .3s; }
.recent-row a:hover img { transform: translateY(-3px); box-shadow: var(--shadow); }
.recent-row .n { font-size: .74rem; font-weight: 600; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* плавающие кнопки */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.fab a, .fab button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow); transition: .25s; cursor: pointer; }
.fab .wa { background: #25d366; color: #fff; padding: 12px 18px; }
.fab .wa:hover { transform: translateY(-2px); background: #1fb85a; }
.fab .wa svg { width: 22px; height: 22px; }
.fab .top { width: 44px; height: 44px; background: #fff; color: var(--g800); justify-content: center; opacity: 0; pointer-events: none; }
.fab .top.show { opacity: 1; pointer-events: auto; }
.fab .top svg { width: 20px; height: 20px; }

/* полёт в корзину */
.fly { position: fixed; z-index: 300; width: 70px; height: 70px; border-radius: 16px; object-fit: cover; pointer-events: none; box-shadow: var(--shadow); transition: all .75s cubic-bezier(.2,.7,.3,1); }
.icon-btn.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.25) } 60% { transform: scale(.95) } }

/* быстрый просмотр */
.qv { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; }
.qv img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 18px; }
.qv .p-title { font-size: 1.5rem; }
.modal .box { position: relative; }
.modal .x { position: absolute; top: 12px; right: 12px; }

/* галерея товара */
.gallery .main { cursor: zoom-in; }
.gallery .main img { transition: transform .25s; transform-origin: center; }
.gallery .main.zoomed { cursor: zoom-out; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 74px; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--g50); position: relative; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.active { border-color: var(--g600); }
.thumbs button span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(20,54,38,.7); color: #fff; font-size: .62rem; padding: 3px; }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 16px; display: none; align-items: center; gap: 12px; }
.buybar .price { font-size: 1.1rem; }
.buybar .btn { flex: 1; }
.main-nav > a { position: relative; }
.main-nav > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--g500); transform: scaleX(0); transform-origin: left; transition: .25s; }
.main-nav > a:hover::after { transform: scaleX(1); }
.leaf-float { position: absolute; color: var(--g300); opacity: .5; pointer-events: none; will-change: transform; }
.section-head .more { font-weight: 700; color: var(--g700); display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; }
.section-head .more:hover { gap: 10px; }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ig-grid a { border-radius: 14px; overflow: hidden; aspect-ratio: 1; position: relative; }
.ig-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ig-grid a:hover img { transform: scale(1.08); }
.ig-grid a::after { content: "♥"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; background: rgba(20,54,38,.45); opacity: 0; transition: .25s; }
.ig-grid a:hover::after { opacity: 1; }

@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } .cat-card.wide { grid-column: span 1; aspect-ratio: 1 / 1.05; } .ig-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .faq-2col, .qv { grid-template-columns: 1fr; } .quiz { padding: 28px 20px; } .buybar { display: flex; } body.has-buybar { padding-bottom: 70px; } body.has-buybar .fab { bottom: 84px; } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } .fab .wa span { display: none; } .fab .wa { padding: 12px; } .cat-card .txt h3 { font-size: 1.05rem; } .cat-card .txt p { display: none; } .hero-visual .bottle { border-radius: 16px; } }

.btn svg { width: 20px; height: 20px; flex: none; }

/* атрибут hidden должен работать и на flex/grid-элементах */
[hidden] { display: none !important; }

/* стоимость доставки, которая считается по тарифу службы */
.opt .p.onreq { color: var(--g700); font-size: .85rem; font-weight: 700; white-space: nowrap; }

/* выбранный пункт выдачи СДЭК */
.pvz-chosen { display: grid; gap: 4px; margin-top: 12px; padding: 14px 16px; border: 1.5px solid var(--g300);
  background: var(--g50); border-radius: 14px; position: relative; }
.pvz-chosen b { font-size: .95rem; }
.pvz-chosen span { font-size: .85rem; color: var(--muted); }
.pvz-chosen span.p { color: var(--g700); font-weight: 700; }
.pvz-chosen .btn { position: absolute; top: 10px; right: 10px; }

/* поиск пункта выдачи, когда виджет выключен */
.pvz-find { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.pvz-find .hint { flex: 1 1 260px; margin: 0; }

/* блок отправки СДЭК в админке */
.ship-box { display: grid; gap: 8px; margin-top: 8px; }
.ship-box .btn { justify-content: center; }
.pay-field { display: grid; gap: 3px; font-size: .75rem; color: var(--muted); }
.pay-field input { width: 100%; padding: 5px 8px; border: 1px solid var(--g200); border-radius: 8px;
  font: inherit; font-size: .85rem; color: var(--ink, inherit); }
.ship-data { font: 500 .8rem/1.5 var(--font-body, inherit); white-space: pre-wrap;
  background: var(--g50); border: 1px solid var(--g200); border-radius: 10px; padding: 10px 12px; margin: 0; }
