* {
  box-sizing: border-box;
}

/* Ensure [hidden] always wins over component display rules (.shop-empty, .cart-layout, …). */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-site);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

img.header__logo-image {
  width: auto;
  max-width: min(220px, 46vw);
  height: 42px;
  max-height: 42px;
  object-fit: contain;
}

:root {
  color-scheme: light;
  --color-white: #ffffff;
  --color-ink: #2c241c;
  --color-muted: #6f675f;
  --color-accent: #e0aa00;
  --color-accent-strong: #c49200;
  --color-cream: #f7f4f0;
  --color-line: #ece7e1;
  --color-line-strong: #e0d9d1;
  --color-placeholder: #9a938c;
  --color-on-media: #ffffff;
  --shadow-dropdown: 0 16px 40px rgba(45, 32, 24, 0.08);
  --color-overlay: rgba(20, 14, 10, 0.45);
  --color-image-bg: #f3f1ee;
  --container-width: 1280px;
  --tap-size: 48px;
  --bp-mobile-min: 375px;
  --bp-tablet: 768px;
  --bp-desktop: 1920px;
  --font-site: "Montserrat", sans-serif;
  --font-inter: var(--font-site);
  --font-playfair: var(--font-site);
}

/* Ночной режим — тёплый boutique dark, без «холодного» синего */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-white: #14110f;
  --color-ink: #f2ebe3;
  --color-muted: #a89f94;
  --color-accent: #e0aa00;
  --color-accent-strong: #f0c453;
  --color-cream: #1c1815;
  --color-line: #2c2621;
  --color-line-strong: #3a322c;
  --color-placeholder: #8a8278;
  --color-on-media: #ffffff;
  --shadow-dropdown: 0 18px 44px rgba(0, 0, 0, 0.45);
  --color-overlay: rgba(0, 0, 0, 0.55);
  --color-image-bg: #1a1613;
}

html[data-theme="dark"] body {
  background: var(--color-white);
  color: var(--color-ink);
}

html[data-theme="dark"] .header__logo-image {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

html[data-theme="dark"] .content-hero {
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-white) 100%);
}

.container {
  width: min(var(--container-width), calc(100% - 40px));
  margin: 0 auto;
}

.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.page {
  padding-bottom: 0;
}

.page--lightbox-open {
  overflow: hidden;
}

.page-stub {
  min-height: 70vh;
  padding: 56px 0 96px;
}

.page-stub__title {
  margin: 0 0 12px;
  font-family: var(--font-site);
  font-size: 40px;
  font-weight: 500;
}

.page-stub__text {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
}

/* §1 ТЗ: основной читаемый текст — не менее 16px */
.shop-page__lead,
.shop-empty__text,
.product-accordion__content--text p,
.contacts-form-card__lead,
.contacts-card__text,
.contacts-faq__answer,
.blog-article__content p,
.content-section__body p {
  font-size: max(16px, 1em);
}

@media (max-width: 900px) {
  .page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  input,
  textarea,
  select,
  .header__search-input {
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(var(--container-width), calc(100% - 32px));
  }
}

@media (max-width: 374px) {
  .container {
    width: min(var(--container-width), calc(100% - 24px));
  }
}

.field--invalid {
  border-color: #c0392b !important;
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.15);
}

.field--invalid:focus {
  border-color: #c0392b !important;
}

.product-subscribe__checkbox-input.field--invalid + .product-subscribe__checkbox-icon {
  border-color: #c0392b;
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.15);
}

.image-upload-spec {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
}

html:not([data-liara-preview]) .image-upload-spec {
  display: none !important;
}

