/* Legal pages + shared cookie banner — Тихата Граница */
:root {
  --navy: #F6F7F9;
  --panel: #FFFFFF;
  --panel-2: #F6F7F9;
  --gold: #B8860B;
  --gold-2: #C9A227;
  --red: #E11D2E;
  --red-2: #FF3B4A;
  --green: #1F9D57;
  --text: #171A1F;
  --text-soft: #5B6470;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.legal-page {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 45% at 10% 0%, rgba(225,29,46,.06), transparent 50%),
    radial-gradient(ellipse 70% 40% at 90% 10%, rgba(201,162,39,.07), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(31,157,87,.04), transparent 45%),
    #F6F7F9;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body.legal-page::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .035;
}

.legal-page a { color: var(--gold); text-decoration: none; transition: color .2s; }
.legal-page a:hover { color: var(--text); text-decoration: underline; }

.wrap {
  position: relative; z-index: 1;
  max-width: 740px; margin: 0 auto; padding: 28px 20px 64px;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 36px; flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(20,24,32,.08);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 22px; color: var(--text); text-decoration: none;
  background: linear-gradient(120deg, var(--red), var(--gold) 55%, #8B6914);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand:hover { text-decoration: none; filter: brightness(1.08); }

.back {
  font-size: 13px; font-weight: 600; color: var(--text-soft);
  text-decoration: none; border: 1px solid rgba(20,24,32,.1);
  padding: 9px 16px; border-radius: 999px;
  background: #FFFFFF;
  transition: border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.back:hover {
  color: var(--gold); border-color: rgba(184,134,11,.4);
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20,24,32,.08);
}

.legal-hero {
  margin-bottom: 28px;
  animation: legalIn .7s cubic-bezier(.22,1,.36,1) both;
}
.legal-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.legal-kicker::before {
  content: ""; width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em;
  line-height: 1.15;
}
.meta { color: var(--text-soft); font-size: 14px; margin-bottom: 0; }

.card {
  position: relative;
  background: var(--panel);
  border: 1.5px solid rgba(20,24,32,.08);
  border-radius: 22px;
  padding: 32px 26px;
  box-shadow: 0 12px 40px rgba(20,24,32,.08);
  animation: legalIn .75s cubic-bezier(.22,1,.36,1) .08s both;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--red), var(--gold), transparent);
  opacity: .85;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 19px; margin: 30px 0 12px; color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.card h2:first-child { margin-top: 0; }
.card h2::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), var(--gold));
  box-shadow: 0 0 12px rgba(225,29,46,.45);
}
.card p, .card li { color: var(--text-soft); margin-bottom: 10px; font-size: 15px; }
.card ul, .card ol { padding-left: 20px; margin-bottom: 14px; }
.card li { margin-bottom: 7px; }
.card li::marker { color: var(--gold); }

.merchant {
  margin-top: 8px; padding: 18px 20px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(225,29,46,.1), rgba(232,184,74,.08));
  border: 1px solid rgba(232,184,74,.35);
  font-size: 14px; color: var(--text-soft); line-height: 1.7;
  box-shadow: inset 0 0 30px rgba(232,184,74,.04);
}
.merchant strong { color: var(--text); font-size: 16px; }

.nav-legal {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 32px 0 0;
}
.nav-legal a {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--text-soft);
  text-decoration: none;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(20,24,32,.1);
  background: #FFFFFF;
  transition: transform .2s, border-color .2s, color .2s, box-shadow .2s;
}
.nav-legal a:hover {
  color: var(--gold); border-color: rgba(184,134,11,.4);
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20,24,32,.08);
}

.alert-fill {
  background: rgba(225,29,46,.12);
  border: 1px solid rgba(225,29,46,.4);
  color: #B4232F;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.55;
  animation: legalIn .6s ease both;
}
.alert-fill code {
  color: var(--text); background: rgba(20,24,32,.06);
  padding: 2px 6px; border-radius: 6px; font-size: 12px;
}
.alert-fill[hidden] { display: none !important; }

.contact-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px;
}
.contact-actions a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-radius: 14px; font-weight: 700;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.contact-actions a:hover { transform: translateY(-2px); text-decoration: none; }
.contact-actions .mail {
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff; box-shadow: 0 10px 28px rgba(225,29,46,.35);
}
.contact-actions .tel {
  background: rgba(201,162,39,.1);
  color: var(--gold); border: 1px solid rgba(184,134,11,.35);
}

/* Shared site footer (checkout + legal) */
.site-footer {
  position: relative; z-index: 1;
  margin-top: 40px;
  padding: 36px 20px 48px;
  text-align: center;
  border-top: 1px solid rgba(20,24,32,.08);
  background: linear-gradient(180deg, transparent, rgba(225,29,46,.03));
}
.site-footer .footer-brand {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800; color: var(--text);
  display: block; margin-bottom: 10px;
  text-shadow: none;
}
.site-footer p { color: var(--text-soft); font-size: 13px; margin: 0 0 14px; }
.site-footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 4px;
}
.site-footer-links a {
  color: var(--text-soft); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.site-footer-links a:hover {
  color: var(--gold); background: rgba(201,162,39,.1); text-decoration: none;
}

/* Cookie banner (global class — also used on index/checkout) */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10050;
  max-width: 520px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(20,24,32,.08);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 16px 40px rgba(20,24,32,.12);
  color: var(--text-soft);
  font-size: 13px; line-height: 1.55;
  font-family: var(--font-body);
  animation: cookieUp .42s cubic-bezier(.22,1,.36,1) both;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner p { margin: 0 0 14px; color: var(--text-soft); }
.cookie-banner a { color: var(--gold); font-weight: 600; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions button,
.cookie-actions a.more {
  border: none; border-radius: 12px; padding: 11px 16px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: inherit; text-decoration: none;
  display: inline-flex; align-items: center;
}
.cookie-actions .ok {
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff; box-shadow: 0 8px 20px rgba(225,29,46,.35);
}
.cookie-actions .ok:hover { filter: brightness(1.06); }
.cookie-actions a.more {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(184,134,11,.35);
}
.cookie-actions a.more:hover { background: rgba(232,184,74,.08); }

@keyframes legalIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes cookieUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .legal-hero, .cookie-banner, .alert-fill { animation: none !important; }
}
