/* Legal pages (terms, delivery, returns, privacy — BG + EN). Same look as the shop: warm paper, Playfair headings. */
:root {
  --bg: #F5F2EC; --surface: #fff; --ink: #34322F; --muted: #7B7670; --accent: #BDA171; --line: rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.2, .6, .2, 1); --header-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, sans-serif; line-height: 1.7; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #8C7246; }

/* Header */
.nav-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--line);
}
.nav-content {
  max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.back-link {
  justify-self: start; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; font-weight: 500; transition: all .3s var(--ease);
}
.back-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-title { font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 600; letter-spacing: .02em; white-space: nowrap; text-decoration: none; }
.lang-switch { justify-self: end; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .7); }
.lang-switch a { padding: .4rem .85rem; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--accent); color: #fff; }

/* Document */
.legal { max-width: 800px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 20px clamp(48px, 8vw, 96px); }
.eyebrow { letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-size: .76rem; font-weight: 500; }
.legal h1 { font-family: "Playfair Display", serif; font-weight: 500; font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.12; margin: .5rem 0 .6rem; }
.doc-meta { color: var(--muted); font-size: .86rem; margin: 0 0 1.6rem; }
.doc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2rem; padding: 0; list-style: none; }
.doc-tabs a {
  display: inline-block; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: .82rem; font-weight: 500; text-decoration: none; transition: border-color .2s, background .2s, color .2s;
}
.doc-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.doc-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lead { font-size: 1.05rem; color: #4a4743; }
.toc { background: var(--surface); border: 1px solid var(--line); padding: 18px 24px; margin: 1.8rem 0 2.4rem; }
.toc .eyebrow { margin-bottom: .4rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2 260px; column-gap: 32px; font-size: .9rem; }
.toc li { break-inside: avoid; margin: 0; padding: 0; line-height: 1.95; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.legal h2 {
  font-family: "Playfair Display", serif; font-weight: 500; font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.25;
  margin: 2.6rem 0 .8rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .4rem; }
.legal p, .legal li { font-size: .97rem; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin: .3rem 0; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 1rem 0; font-size: .95rem; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.note { background: var(--surface); border-left: 2px solid var(--accent); padding: 14px 18px; margin: 1.2rem 0; font-size: .93rem; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Facts still to be filled in before publishing — impossible to miss */
.fill { background: #FFF1B8; border-bottom: 1px dashed #B8891F; padding: 0 .2em; color: #5a4300; }

/* Withdrawal form */
.form-box { background: var(--surface); border: 1px solid var(--ink); padding: clamp(18px, 4vw, 32px); margin: 1.4rem 0; }
.form-box h3 { margin-top: 0; font-family: "Playfair Display", serif; font-weight: 500; font-size: 1.25rem; }
.form-box ul { list-style: none; padding: 0; }
.form-box li { margin: .9rem 0; }
.form-box .line { display: block; border-bottom: 1px solid #b9b3aa; height: 1.6rem; margin-top: .2rem; }
.print-btn {
  display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: .6rem 1.1rem; font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; transition: background .2s, color .2s;
}
.print-btn:hover { background: var(--ink); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 20px; text-align: center; font-size: .85rem; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.legal-links a { color: var(--ink); text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
  :root { --header-h: 60px; }
  .nav-content { padding: 0 14px; }
  .back-link { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .back-link span { display: none; }
  .page-title { font-size: .95rem; }
  .legal { padding-left: 16px; padding-right: 16px; }
  .legal dl { grid-template-columns: 1fr; gap: 0 0; }
  .legal dd { margin-bottom: .6rem; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table-wrap td { border: 0; padding: 3px 14px; }
  .table-wrap td::before { content: attr(data-label); display: block; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
}
@media print {
  .nav-header, .doc-tabs, .toc, .site-footer, .print-btn { display: none !important; }
  body { background: #fff; }
  .legal { max-width: none; padding: 0; }
  .fill { background: none; }
  body.print-form .legal > :not(.form-print) { display: none !important; }   /* „Принтирай формуляра“ prints only the form */
  body.print-form .form-print > :not(.form-box) { display: none !important; }
}
.toc ol.plain { list-style: none; padding-left: 0; }
