/* Локальные normal variable-шрифты; Manrope остаётся в прежнем styles.css. */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('/fonts/noto-sans-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('/fonts/noto-sans-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/noto-serif-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/noto-serif-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Все новые правила темы включаются только для полного resolved DTO версии 2. */
html[data-theme-format='2'] body {
  font-size: var(--storefront-text-scale);
}

html[data-theme-format='2'] :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
}

html[data-theme-format='2'] .header {
  background: var(--header-bg);
  color: var(--header-fg);
}

html[data-theme-format='2'] .header :is(.logo-word, .logo-tagline, .header-action, .catalog-btn) {
  color: var(--header-fg);
}

html[data-theme-format='2'] .header .catalog-btn {
  background: var(--header-bg);
}

html[data-theme-format='2'] :is(.chip, .chip:hover, .chip.active, .chip-filter, .chip-filter:hover, .chip-accent, .chip-accent:hover) {
  background: var(--chips-bg);
  color: var(--chips-fg);
  border-color: var(--chips-fg);
}

html[data-theme-format='2'] :is(.card-btn:not(.card-restock):not([data-buy-now]), .buy-btn) {
  background: var(--cart-button-bg);
  color: var(--cart-button-fg);
}

html[data-theme-format='2'] :is(.card-btn[data-buy-now], .buy-now, .pab-buy) {
  background: var(--buy-button-bg);
  color: var(--buy-button-fg);
}

html[data-theme-format='2'] .badge {
  background: var(--badges-bg);
  color: var(--badges-fg);
}

html[data-theme-format='2'] :is(.card-price, .product-price) {
  color: var(--price-current);
}

html[data-theme-format='2'] :is(.card-discount, .discount-pill) {
  color: var(--price-discount);
}

html[data-theme-format='2'] .discount-pill {
  background: transparent;
  border: 1px solid currentColor;
}

html[data-theme-format='2'] :is(.rating, .rating .star) {
  color: var(--rating);
}

html[data-theme-format='2'] .qty-ctl {
  background: var(--chips-bg);
  color: var(--chips-fg);
  border-color: var(--chips-fg);
}

html[data-theme-format='2'] :is(.qc-btn, .qc-val) {
  color: var(--chips-fg);
}

html[data-theme-format='2'] .qc-btn:hover {
  background: var(--chips-bg);
}

html[data-theme-format='2'] :is(.card, .p-photo, .buy-card, .btn-primary, .card-btn, .buy-btn, .buy-now, .pab-buy, .chip, .chip-filter, .badge, .qty-ctl, .cart-qty, .search-input, .catalog-btn, .discount-pill, .status-pill) {
  border-radius: var(--radius);
}

/* Масштабируем роли относительно прежней базовой величины 15px. */
html[data-theme-format='2'] .logo-word { font-size: calc(var(--storefront-text-scale) * 1.733333); }
html[data-theme-format='2'] .logo-tagline { font-size: calc(var(--storefront-text-scale) * .8); }
html[data-theme-format='2'] .header-action { font-size: calc(var(--storefront-text-scale) * .866667); }
html[data-theme-format='2'] .search-input { font-size: var(--storefront-text-scale); }
html[data-theme-format='2'] .section-title { font-size: calc(var(--storefront-text-scale) * 1.866667); }
html[data-theme-format='2'] .product-title { font-size: calc(var(--storefront-text-scale) * 1.666667); }
html[data-theme-format='2'] .catalog-title { font-size: calc(var(--storefront-text-scale) * 2); }
html[data-theme-format='2'] .card-series { font-size: calc(var(--storefront-text-scale) * .766667); }
html[data-theme-format='2'] .card-name { font-size: calc(var(--storefront-text-scale) * .9); }
html[data-theme-format='2'] .card-price { font-size: calc(var(--storefront-text-scale) * 1.266667); }
html[data-theme-format='2'] .card-old { font-size: calc(var(--storefront-text-scale) * .9); }
html[data-theme-format='2'] .card-discount { font-size: calc(var(--storefront-text-scale) * .8); }
html[data-theme-format='2'] :is(.card-btn, .chip, .chip-filter) { font-size: calc(var(--storefront-text-scale) * .933333); }
html[data-theme-format='2'] .rating { font-size: calc(var(--storefront-text-scale) * .833333); }
html[data-theme-format='2'] .rating .star { font-size: calc(var(--storefront-text-scale) * .933333); }
html[data-theme-format='2'] .product-price { font-size: calc(var(--storefront-text-scale) * 2); }
html[data-theme-format='2'] .product-old { font-size: calc(var(--storefront-text-scale) * 1.133333); }
html[data-theme-format='2'] .discount-pill { font-size: calc(var(--storefront-text-scale) * .866667); }
html[data-theme-format='2'] .buy-btn { font-size: calc(var(--storefront-text-scale) * 1.066667); }
html[data-theme-format='2'] .buy-btn .bb-main { font-size: calc(var(--storefront-text-scale) * 1.033333); }
html[data-theme-format='2'] .buy-btn .bb-sub { font-size: calc(var(--storefront-text-scale) * .8); }
html[data-theme-format='2'] :is(.btn-primary, .buy-now) { font-size: var(--storefront-text-scale); }
html[data-theme-format='2'] .pab-buy { font-size: calc(var(--storefront-text-scale) * 1.033333); }
html[data-theme-format='2'] .qc-btn { font-size: calc(var(--storefront-text-scale) * 1.333333); }
html[data-theme-format='2'] .qc-val { font-size: calc(var(--storefront-text-scale) * .966667); }
html[data-theme-format='2'] .qty-val { font-size: calc(var(--storefront-text-scale) * 1.066667); }
html[data-theme-format='2'] .status-pill { font-size: calc(var(--storefront-text-scale) * .733333); }

@media (max-width: 640px) {
  html[data-theme-format='2'] .catalog-title {
    font-size: calc(var(--storefront-text-scale) * 4 / 3);
  }

  html[data-theme-format='2'] :is(.section-title, .product-title, .logo-word) {
    font-size: calc(var(--storefront-text-scale) * 1.466667);
  }

  html[data-theme-format='2'] .product-price {
    font-size: calc(var(--storefront-text-scale) * 1.733333);
  }

  html[data-theme-format='2'] :is(.card-name, .chip, .chip-filter) {
    font-size: calc(var(--storefront-text-scale) * .866667);
  }
}

/* Статические образцы preview; никаких форм, обработчиков и ссылок. */
.design-preview-samples {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 44px;
}

.design-preview-samples .buy-row { width: 100%; flex-wrap: wrap; }
.design-preview-buy { display: flex; align-items: center; justify-content: center; padding: 0 20px; }
.design-preview-quantity { width: 180px; }
.design-preview-quantity .qc-btn { display: flex; align-items: center; justify-content: center; }
