/* ============================================================
   WHIEDA Marketplace — Compact Components CSS
   Использует переменные из tokens.css
   ============================================================ */

/* ---------- Header (glass sticky) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(15,93,75,0.05);
}
.hdr-in {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; gap: 14px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); flex: 0 0 auto;
}
.logo-img { width: 44px; height: 44px; border-radius: 50%; }
.logo-t {
  display: flex; flex-direction: column; line-height: 1.1;
}
.logo-t b { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.logo-t small {
  font-size: 10.5px; font-weight: 500;
  color: var(--acc); letter-spacing: 0.09em; text-transform: uppercase;
}
.nav {
  display: flex; gap: 4px; margin-left: auto;
  align-items: center;
}
.nav a {
  padding: 9px 15px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 14px;
  color: var(--ink); transition: var(--tr);
}
.nav a:hover { background: rgba(15,93,75,0.06); color: var(--acc); }
.nav a.is-cta {
  background: var(--acc); color: var(--white);
  box-shadow: var(--sh-acc);
}
.nav a.is-cta:hover { background: var(--acc-2); }
.hdr-cart {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--glass-2); border: 1px solid var(--bd);
  box-shadow: var(--sh); color: var(--ink);
  position: relative; transition: var(--tr);
}
.hdr-cart:hover { transform: translateY(-1px); background: var(--white); }
.hdr-cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--acc);
  color: var(--white); font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.burger-btn {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--bd);
  background: var(--glass-2);
}

/* ---------- View wrapper ---------- */
.view {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- Hero (главная) ---------- */
.hero {
  display: grid; gap: 30px;
  grid-template-columns: 1fr;
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.4fr 1fr; align-items: center; }
}
.hero h1 {
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.05;
  margin-bottom: 16px;
}
.hero h1 .acc { color: var(--acc); }
.hero p.lead {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 20px;
  max-width: 55ch;
}
.hero-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.hero-photo-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  padding-bottom: 30px; /* место под бейдж */
}
.hero-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid rgba(255,255,255,0.7);
  box-shadow: var(--sh-lg);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(15,93,75,0.15);
  pointer-events: none;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--bd);
  padding: 10px 18px; border-radius: var(--r-full);
  font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-md);
  white-space: nowrap;
  color: var(--ink);
}
.hero-badge b { color: var(--ink-2); font-weight: 800; }

/* ---------- Section wrapper ---------- */
.sec {
  margin-top: 48px;
}
.sec-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
}
.sec-h h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}
.sec-h .lnk {
  font-size: 14px; font-weight: 700;
  color: var(--acc);
}
.sec-h .lnk:hover { text-decoration: underline; }
.sec-lead {
  color: var(--mut); font-size: 16px;
  max-width: 65ch; margin: -12px 0 20px;
}

/* ---------- Trust badges ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.trust-card {
  padding: 22px;
  display: flex; gap: 14px;
  align-items: flex-start;
}
.trust-icon {
  flex: 0 0 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--acc-soft);
  color: var(--acc-2);
}
.trust-card h3 {
  font-size: 15px; font-weight: 800;
  margin: 0 0 6px;
}
.trust-card p {
  font-size: 13.5px; line-height: 1.45;
  color: var(--mut); margin: 0;
}

/* ---------- About Roman (секция) ---------- */
.about-sec {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
  padding: 36px;
}
@media (min-width: 900px) {
  .about-sec { grid-template-columns: 260px 1fr; align-items: start; }
}
.about-photo {
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 6px solid var(--white);
  box-shadow: var(--sh-md);
  overflow: hidden;
  margin: 0 auto;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { margin-bottom: 8px; }
.about-text .subtitle {
  color: var(--acc); font-weight: 700;
  font-size: 15px; margin-bottom: 16px;
}
.about-text p {
  font-size: 15.5px; line-height: 1.65;
  color: var(--ink); margin-bottom: 14px;
}
.about-text p strong { color: var(--ink-2); }
.about-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.about-num {
  padding: 16px;
  text-align: center;
  border-radius: var(--r);
  background: var(--acc-soft);
  border: 1px solid rgba(31,169,131,0.2);
}
.about-num b {
  display: block;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--acc-2);
  line-height: 1;
  margin-bottom: 4px;
}
.about-num span {
  font-size: 12px; font-weight: 600;
  color: var(--ink); text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Categories (сетка карточек) ---------- */
.cats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.cat-card {
  padding: 20px; text-align: left;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--tr), box-shadow var(--tr);
  color: var(--ink);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.cat-card .cat-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--acc-soft);
  color: var(--acc-2);
}
.cat-card b {
  font-size: 15px; font-weight: 800;
  display: block;
}
.cat-card small { color: var(--mut); font-size: 12.5px; }

/* ---------- Product cards (превью для главной) ---------- */
.prods-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .prods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .prods-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .prods-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pcard {
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--tr), box-shadow var(--tr);
  color: var(--ink);
}
.pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}
.pcard-ph {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  position: relative;
  display: block;
}
.pcard-ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--warm); color: #8B6914;
}
.pcard-name {
  font-size: 13.5px; font-weight: 600;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.pcard-art {
  font-size: 11px; color: var(--mut); letter-spacing: 0.03em;
}
.pcard-price {
  font-size: 19px; font-weight: 800;
  color: var(--acc-2);
  letter-spacing: -0.02em;
  margin-top: auto;
}
.pcard-price small {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--mut); margin-top: 2px;
}
.pcard-bought {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: var(--mut);
  margin: -4px 0 2px;
}
.pcard-bought svg { color: var(--acc); flex: 0 0 auto; }
.pcard-bought b { color: var(--ink-2); font-weight: 800; }
.pcard-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--ink); color: var(--white);
  font-size: 13.5px; font-weight: 700;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
}
.pcard-btn:hover { background: var(--acc); }

/* Две кнопки Купить/В корзину в карточке */
.pcard-btns {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; margin-top: auto;
}
.pcard-btn-buy {
  padding: 10px 4px;
  border-radius: var(--r-sm);
  background: var(--acc); color: var(--white);
  font-size: 13px; font-weight: 800;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  box-shadow: var(--sh-acc);
}
.pcard-btn-buy:hover { background: var(--acc-2); transform: translateY(-1px); }
.pcard-btn-cart {
  padding: 10px 4px;
  border-radius: var(--r-sm);
  background: var(--white); color: var(--ink);
  border: 1px solid var(--bd);
  font-size: 13px; font-weight: 700;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.pcard-btn-cart:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pcard-btn-cart svg { width: 14px; height: 14px; }

/* Старый fallback для карточек главной (если там ещё одна кнопка) */
.pcard .pcard-btn { margin-top: auto; }

/* ---------- Партнёрство CTA-блок ---------- */
.partner-cta {
  padding: 44px; margin-top: 48px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--white);
  border-radius: var(--r-lg);
}
.partner-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(31,169,131,0.35) 0%, transparent 50%);
  pointer-events: none;
}
.partner-cta-in {
  position: relative; z-index: 1;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .partner-cta-in { grid-template-columns: 2fr 1fr; align-items: center; }
}
.partner-cta h2 {
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.15; margin: 0 0 12px;
  color: var(--white);
}
.partner-cta p {
  font-size: 16px; line-height: 1.55;
  color: rgba(255,255,255,0.85);
  max-width: 55ch; margin: 0 0 20px;
}
.partner-cta .btn-acc {
  background: var(--acc);
}
.partner-cta .btn-acc:hover { background: var(--acc-2); }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 900px; margin: 0 auto;
}
.faq-item {
  padding: 0;
  overflow: hidden;
}
.faq-q {
  padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; width: 100%;
  font-size: 16px; font-weight: 700; text-align: left;
  color: var(--ink); cursor: pointer;
}
.faq-q svg {
  flex: 0 0 auto;
  transition: transform var(--tr);
  color: var(--acc);
}
.faq-item.is-open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  padding: 0 24px;
  max-height: 0; overflow: hidden;
  transition: max-height var(--tr-slow), padding var(--tr-slow);
  font-size: 15px; line-height: 1.65;
  color: var(--ink-soft);
}
.faq-item.is-open .faq-a {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* ---------- Footer ---------- */
.ftr {
  margin-top: 80px;
  padding: 48px 20px 24px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--line);
}
.ftr-in {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .ftr-in { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.ftr-col h4 {
  font-size: 12px; font-weight: 800;
  color: var(--mut); text-transform: uppercase;
  letter-spacing: 0.1em; margin: 0 0 16px;
}
.ftr-col ul { list-style: none; padding: 0; margin: 0; }
.ftr-col li { margin-bottom: 8px; }
.ftr-col a {
  font-size: 14px; color: var(--ink-soft);
  transition: var(--tr);
}
.ftr-col a:hover { color: var(--acc); }
.ftr-brand p {
  font-size: 13.5px; color: var(--mut);
  line-height: 1.55; margin: 12px 0 0;
}
.ftr-legal {
  max-width: var(--max-w); margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--mut);
  line-height: 1.5;
}
.ftr-legal p { margin: 6px 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  z-index: 90;
  padding: 20px 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  max-width: 900px; margin: 0 auto;
}
.cookie-banner p {
  flex: 1 1 300px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink); margin: 0;
}
.cookie-banner a { color: var(--acc); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; }

/* ---------- Responsive helpers ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .burger-btn { display: flex; }
  .hdr-in { padding: 8px 14px; gap: 10px; }
  .logo-t small { display: none; }
  .view { padding: 16px 14px 40px; }
  .hero { padding: 22px; }
  .about-sec { padding: 24px; }
  .partner-cta { padding: 28px 22px; }
  .prods-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .trust-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .about-photo { width: 200px; height: 200px; }
}

/* Mobile nav drawer */
.nav-mobile {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 85vw;
  background: var(--white);
  border-left: 1px solid var(--bd);
  box-shadow: var(--sh-lg);
  z-index: 100;
  padding: 24px 20px;
  display: none; flex-direction: column; gap: 4px;
  transform: translateX(100%);
  transition: transform var(--tr-slow);
}
.nav-mobile.is-open { transform: translateX(0); display: flex; }
.nav-mobile a {
  padding: 12px 16px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 15px;
  color: var(--ink);
}
.nav-mobile a:hover { background: rgba(15,93,75,0.06); }
.nav-mobile .close {
  align-self: flex-end;
  padding: 8px; margin-bottom: 12px;
}
.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,93,75,0.3);
  z-index: 95;
  display: none;
}
.nav-backdrop.is-open { display: block; }

/* ============================================================
   БАД-дисклеймер (по требованию ФЗ РФ)
   ============================================================ */
.bad-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  background: #FFF8E1;
  border: 1px solid #F5D390;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  line-height: 1.4;
  color: #7A5C00;
}
.bad-notice svg {
  flex: 0 0 auto;
  color: #C79300;
  margin-top: 1px;
}
.bad-notice b { color: #5C4400; font-weight: 800; }

/* На карточках — оверлей на нижнюю часть картинки, не влияет на геометрию */
.pcard .bad-notice {
  position: absolute;
  left: 6px; right: 6px; bottom: 6px;
  padding: 6px 8px;
  margin: 0;
  background: rgba(255, 248, 225, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(245, 211, 144, 0.6);
  border-radius: 6px;
  font-size: 9.5px;
  line-height: 1.25;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.pcard .bad-notice svg { width: 11px; height: 11px; }
.pcard-ph { position: relative; }

/* На странице товара — крупнее */
.pdp-bad-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  margin: 16px 0 0;
  background: #FFF8E1;
  border: 1px solid #F5D390;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.5;
  color: #7A5C00;
}
.pdp-bad-notice svg { flex: 0 0 auto; color: #C79300; margin-top: 2px; }
.pdp-bad-notice b { color: #5C4400; font-weight: 800; }
