/* ============ Tokens (imi) ============ */
:root {
  --bg: #f8f6f4;
  --card: #ebe6e0;
  --ink: #141414;
  --muted: #8b857e;
  --line: #d9d3cb;
  --white: #fff;
  --accent: #141414;

  --font-serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-sans: "DM Sans", "Jost", "Noto Sans", "Segoe UI", system-ui, sans-serif; /* DM Sans matches the mockups; Jost renders Cyrillic */

  --radius: 0;
  --gutter: 20px;
  --container: 1440px;
  --header-h: 84px;
  --track: .22em;
}
@media (min-width: 1024px) { :root { --gutter: 56px; --header-h: 96px; } }

/* Russian: Newsreader has no Cyrillic, so headings use Source Serif 4 (same spirit). Both are in assets/fonts/base.css. */
html[lang=ru] { --font-serif: "Source Serif 4", serif; }

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; margin: 0; line-height: 1.1; letter-spacing: -.01em; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.label { font: 400 11px/1.4 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; }
.muted { color: var(--muted); }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 34px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: var(--radius);
  font: 500 12px/1 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--light { background: transparent; color: #fff; border-color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ============ Header ============ */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); }
.site-header__bar { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: var(--gutter); }
.header-start, .header-end { display: flex; align-items: center; gap: 22px; }
.header-end { justify-content: flex-end; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; position: relative; }
.icon-btn svg { width: 28px; height: 28px; }
.logo { display: block; color: var(--ink); line-height: 0; }
.logo svg { height: 30px; width: auto; }
@media (min-width: 1024px) { .logo svg { height: 38px; } }
.logo--sub { display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateY(4px); }
.logo__sub { font: 400 10px/1 var(--font-sans); letter-spacing: .32em; text-transform: uppercase; margin-inline-end: -.32em; }
.cart-count { position: absolute; top: -2px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--ink); color: var(--bg); font: 500 10px/18px var(--font-sans); text-align: center; }
.cart-count:empty { display: none; }
.lang-btn { display: none; align-items: center; gap: 6px; font: 400 12px/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.lang-btn svg { width: 18px; height: 18px; }
@media (min-width: 768px) { .lang-btn { display: inline-flex; } }

/* Category tabs */
.tabs { display: flex; gap: clamp(0px, 3vw, 40px); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; padding: 12px 14px 14px; font-size: 11px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s; }
.tabs a:first-child { padding-inline: 18px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-color: var(--ink); font-weight: 500; }
@media (max-width: 599px) {
  .tabs { justify-content: space-between; gap: 0; padding-inline: calc(var(--gutter) - 8px); }
  .tabs a, .tabs a:first-child { padding-inline: 8px; letter-spacing: .16em; }
}
@media (min-width: 1024px) { .tabs { justify-content: center; } }

/* ============ Drawers ============ */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(20,20,20,.35); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; width: min(440px, 92vw); background: var(--bg); display: flex; flex-direction: column; transition: transform .3s ease; }
.drawer--start .drawer__panel { inset-inline-start: 0; transform: translateX(-100%); }
.drawer--end .drawer__panel { inset-inline-end: 0; transform: translateX(100%); }
[dir=rtl] .drawer--start .drawer__panel { transform: translateX(100%); }
[dir=rtl] .drawer--end .drawer__panel { transform: translateX(-100%); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow: auto; padding: 10px var(--gutter); }
.drawer__foot { padding: 20px var(--gutter); border-top: 1px solid var(--line); display: grid; gap: 14px; }

/* Side menu — full-screen sheet, proportions after the reference */
.drawer--menu .drawer__panel { width: 100%; max-width: 480px; display: flex; flex-direction: column;
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
@media (max-width: 599px) { .drawer--menu .drawer__panel { max-width: none; } }
.menu-top { display: flex; justify-content: flex-end; align-items: center; height: 64px; flex: none; margin-inline-end: -6px; }
.menu-top button { width: 36px; height: 36px; display: grid; place-items: center; }
.menu-top svg { width: 22px; height: 22px; }
.menu-main { display: grid; padding-top: 18px; }
.menu-main > a, .menu-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 36px;
  padding: 0; font: 500 21px/1.25 var(--font-serif); letter-spacing: -.005em; text-align: start; }
.menu-main > a + *, .menu-group + * { margin-top: 0; }
.menu-toggle i { position: relative; width: 16px; height: 16px; flex: none; }
.menu-toggle i::before, .menu-toggle i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.4px solid currentColor; transition: transform .25s; }
.menu-toggle i::after { transform: rotate(90deg); }
.menu-toggle[aria-expanded="true"] i::after { transform: rotate(0deg); }
.menu-cats { display: grid; padding: 4px 0 10px 16px; }
.menu-cats[hidden] { display: none; }
.menu-cats a { padding: 7px 0; font: 400 16px/1.3 var(--font-serif); color: #444; }
.menu-cats a.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.menu-bottom { margin-top: auto; padding-top: 40px; display: grid; }
.menu-small { justify-self: start; padding: 4px 0; font: 500 15px/1.3 var(--font-serif); }
.menu-locale { display: flex; align-items: center; gap: 30px; margin-top: 22px; font: 400 12px/1 var(--font-sans); letter-spacing: .04em; }
.menu-locale button { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.menu-locale svg { width: 16px; height: 16px; }
.menu-shop { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 30px; border: 1px solid var(--ink); border-radius: 6px;
  font: 600 13px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s; }
.menu-shop:hover { background: var(--ink); color: var(--bg); }
.drawer--menu .menu-main, .drawer--menu .menu-bottom { opacity: 0; transform: translateY(8px); transition: opacity .35s ease .1s, transform .35s ease .1s; }
.drawer--menu.is-open .menu-main, .drawer--menu.is-open .menu-bottom { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer--menu .menu-main, .drawer--menu .menu-bottom { opacity: 1; transform: none; transition: none; } }

/* Language modal */
.lang-list { display: grid; padding-top: 8px; }
.lang-list button { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line);
  font: 400 30px/1.1 var(--font-serif); text-align: start; }
.lang-list button[lang=ru] { font-family: "Source Serif 4", serif; }
.lang-list small { font: 400 11px/1 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.lang-list button.is-active { font-style: italic; }
.lang-list button.is-active small { color: var(--ink); }

/* Cart */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 84px; height: 84px; object-fit: cover; background: var(--card); }
.cart-line__title { font: 400 16px/1.3 var(--font-sans); }
.cart-line__meta { font-size: 13px; color: var(--muted); }
.cart-line__remove { font-size: 12px; text-decoration: underline; color: var(--muted); margin-top: 6px; }
.cart-total { display: flex; justify-content: space-between; }
.cart-empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ============ Grid head ============ */

.grid-head { display: flex; justify-content: space-between; align-items: center; padding-block: 28px 24px; gap: 16px; }
.grid-head h1 { font: 500 12px/1.4 var(--font-sans); letter-spacing: var(--track); }
.filter-btn { font-weight: 500; font-size: 12px; }
.filter-btn { display: inline-flex; align-items: center; gap: 12px; }
.filter-btn svg { width: 26px; height: 26px; }

/* ============ Product grid ============ */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 48px 28px; } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.card__media { position: relative; aspect-ratio: 1 / .88; background: var(--card); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__title { margin-top: 14px; font: 400 clamp(15px, 1.5vw, 18px)/1.3 var(--font-sans); }
.card__row { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .price { font-size: 12px; letter-spacing: .1em; }
.price { font: 500 12px/1 var(--font-sans); letter-spacing: .12em; }
.price s { color: var(--muted); font-weight: 400; margin-inline-start: 8px; }
.dots { display: flex; gap: 6px; }
.dot { width: 13px; height: 13px; flex: none; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.dot--silver { background: linear-gradient(135deg, #e9e9e9, #a9a9a9); }
.dot--gold { background: linear-gradient(135deg, #e3c27c, #b8893a); }
.empty-state { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--muted); }

/* Ornament divider */
.ornament { display: flex; align-items: center; gap: 22px; padding-block: 56px; color: var(--ink); }
.ornament::before, .ornament::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ornament svg { width: 18px; height: 18px; }

/* Filters panel (drawer body) */
.filters fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.filters legend { margin-bottom: 12px; }
.filters label { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.filters input[type=radio], .filters input[type=checkbox] { accent-color: var(--ink); width: 16px; height: 16px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-range input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--white); outline: 0; }

/* ============ Feature banner ============ */
.feature { display: grid; gap: 0; background: var(--card); margin-block: 20px 0; }
@media (min-width: 900px) { .feature { grid-template-columns: 1fr 1fr; } }
.feature__media { aspect-ratio: 4 / 3; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__text { padding: clamp(32px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.feature__text h2 { font-size: clamp(36px, 4.5vw, 60px); font-weight: 400; }
.feature__text h2 em { font-style: italic; }
.feature__text p { color: var(--muted); max-width: 440px; }

/* ============ Values strip ============ */
.values { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-top: 72px; }
.values div { padding: 30px 12px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.values div + div { border-inline-start: 1px solid var(--line); }
.values svg { width: 26px; height: 26px; }
@media (max-width: 599px) { .values { grid-template-columns: 1fr; } .values div + div { border-inline-start: 0; border-top: 1px solid var(--line); } }

/* ============ FAQ ============ */
.faq { padding-block: 72px; max-width: 860px; margin-inline: auto; }
.faq h2 { font-size: clamp(36px, 4vw, 52px); font-weight: 400; text-align: center; margin-bottom: 28px; }
.faq details, .accordion details { border-bottom: 1px solid var(--line); }
.faq summary, .accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; }
.faq summary { font: 400 21px/1.3 var(--font-serif); }
.faq summary::-webkit-details-marker, .accordion summary::-webkit-details-marker { display: none; }
.faq summary::after, .accordion summary::after { content: "+"; font: 300 22px/1 var(--font-sans); }
.faq details[open] summary::after, .accordion details[open] summary::after { content: "−"; }
.faq .answer, .accordion .answer { padding-bottom: 20px; color: #4a4642; }

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: var(--bg); margin-top: 40px; padding-block: 64px 32px; }
.footer__grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; } }
.footer__brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer__brand { grid-column: auto; } }
.footer__brand .logo { color: var(--bg); }
.footer__brand .logo svg { height: 48px; }
.footer__brand p { margin-top: 14px; color: #a7a19a; max-width: 280px; }
.footer__col h4 { margin: 0 0 16px; font-weight: 400; color: #a7a19a; }
.footer__col a { display: block; padding: 3px 0; }
.footer__col a:hover { text-decoration: underline; }
.footer__news { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer__news { grid-column: auto; } }
.news-form { display: flex; border-bottom: 1px solid var(--bg); margin-top: 6px; }
.news-form input { flex: 1; min-width: 0; height: 48px; background: none; border: 0; outline: 0; color: var(--bg); }
.news-form input::placeholder { color: #a7a19a; }
.news-form button svg { width: 20px; height: 20px; }
[dir=rtl] .news-form button svg, [dir=rtl] .arrow-flip { transform: scaleX(-1); }
.form-msg { min-height: 1.4em; margin-top: 10px; font-size: 13px; color: #a7a19a; }
.footer__bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid #333; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; color: #a7a19a; font-size: 13px; }
.footer__bottom .lang-btn { display: inline-flex; color: var(--bg); }
.socials { display: flex; gap: 18px; }
.socials svg { width: 20px; height: 20px; }

/* ============ Product page ============ */
.product { display: grid; gap: 0 72px; padding-block: 18px 20px; }
@media (min-width: 1024px) { .product { grid-template-columns: 1.2fr 1fr; padding-block: 28px 48px; } .back-link { grid-column: 1 / -1; } }
.back-link { display: inline-flex; align-items: center; gap: 4px; justify-self: start; margin-bottom: 16px; color: #5c5751; font-size: 14px; transition: color .2s; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 18px; height: 18px; margin-inline-start: -4px; }
[dir=rtl] .back-link svg { transform: scaleX(-1); }
.gallery { min-width: 0; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--card); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; aspect-ratio: 1; scroll-snap-align: start; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__dots { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
.gallery__dots button { width: 18px; height: 18px; display: grid; place-items: center; }
.gallery__dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c9c3bb; transition: background .2s; }
.gallery__dots button.is-active::before { background: var(--ink); }
.product__info { max-width: 520px; padding-top: 18px; }
@media (min-width: 1024px) { .product__info { padding-top: 0; } }
.product__info h1 { font: 400 clamp(24px, 2.6vw, 34px)/1.2 var(--font-sans); letter-spacing: 0; }
.product__info .price { display: block; margin-top: 8px; font-size: 18px; letter-spacing: .02em; }
.option { margin-top: 26px; }
.option .label { font-size: 12px; letter-spacing: .12em; }
.swatches { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent; transition: border-color .2s; }
.swatches button:hover { border-color: var(--line); }
.swatches button.is-active { border-color: var(--ink); }
.swatches .dot { width: 26px; height: 26px; }
.add-btn { width: 100%; margin-top: 28px; min-height: 52px; font-size: 14px; letter-spacing: .14em; }
.accordion { margin-top: 28px; border-top: 1px solid var(--line); }
.accordion summary { align-items: center; min-height: 52px; padding-block: 8px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.related h2 { font-size: clamp(32px, 3.5vw, 46px); font-weight: 400; margin-bottom: 26px; }

/* ============ Content pages ============ */
.page-head { padding-block: 56px 40px; text-align: center; }
.page-head h1 { margin-top: 14px; font-size: clamp(42px, 6vw, 84px); font-weight: 400; }
.page-head h1 em { font-style: italic; }
.page-head p { margin: 18px auto 0; max-width: 620px; color: var(--muted); }
.steps { display: grid; gap: 22px; margin-top: 20px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); padding: 34px 28px; }
.step__num { font: 400 italic 46px/1 var(--font-serif); color: var(--muted); }
.step h3 { margin-top: 18px; font-size: 28px; }
.step p { margin-top: 10px; color: #4a4642; }
.form-block { max-width: 760px; margin: 72px auto 40px; }
.form-block h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 400; text-align: center; margin-bottom: 30px; }
.form { display: grid; gap: 16px; }
@media (min-width: 700px) { .form--two { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.form input, .form textarea { width: 100%; padding: 16px 18px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); outline: 0; }
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form textarea { min-height: 200px; resize: vertical; }
.form .btn { justify-self: center; min-width: 220px; }
.form .form-msg { text-align: center; color: var(--ink); }

/* Support (contact) page */
/* Look and colours follow the imi mockup; sizes and spacing follow the reference's mobile rhythm
   (52px fields, 20px gaps, 16px field text so iOS doesn't zoom on focus). */
.support { --s-border: #898987; --s-text: #555452; --s-rule: #e1e0de; --s-row: #a8a7a5;
  max-width: 640px; margin-inline: auto; padding-block: 28px 48px; }
.support__head { text-align: center; }
.support__head h1 { font-size: clamp(32px, 9vw, 56px); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; }
.support__head p { max-width: 30em; margin: 16px auto 0; font-size: 15px; line-height: 1.5; color: var(--s-text); }
.form--support { gap: 20px; margin-top: 40px; }
.form--support input, .form--support textarea { height: 52px; padding: 0 20px; font-size: 16px; background: transparent;
  border: 1px solid var(--s-border); border-radius: 0; color: var(--ink); -webkit-appearance: none; appearance: none; transition: border-color .2s; }
.form--support input:focus, .form--support textarea:focus { border-color: var(--ink); }
.form--support input::placeholder, .form--support textarea::placeholder { color: #444; opacity: 1; }
.form--support textarea { height: auto; min-height: 150px; padding: 15px 20px; line-height: 1.5; resize: vertical; }
.form--support .btn { justify-self: stretch; min-width: 0; border-radius: 0; min-height: 52px; font-size: 13px; letter-spacing: .32em; }
.form--support .form-msg:empty { display: none; }
.help-faq { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--s-rule); }
.help-faq h2 { font-size: clamp(28px, 7.6vw, 44px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; margin-bottom: 24px; }
.help-faq details { border-top: 1px solid var(--s-row); }
.help-faq details:last-child { border-bottom: 1px solid var(--s-row); }
.help-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 56px; padding: 8px 0; font-size: 16px; line-height: 1.35; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::after { content: "+"; flex: none; font: 300 26px/1 var(--font-sans); transition: transform .25s; }
.help-faq details[open] summary::after { transform: rotate(45deg); }
.help-faq .answer { padding-bottom: 18px; font-size: 15px; line-height: 1.55; color: var(--s-text); }
.logo__sub { color: #444; }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
