:root {
  --purple: #a68cf0;
  --purple-dark: #8a6bdb;
  --purple-light: #efe9ff;
  --teal: #17b8ac;
  --teal-dark: #0f8f86;
  --sky: #3ec6e0;
  --navy: #0e2438;
  --navy-2: #16324a;
  --bg: #eef4f6;
  --white: #ffffff;
  --text: #16324a;
  --text-muted: #6b8494;
  --border: #dde8ec;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ===== Top bar ===== */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--navy);
}

.logo-text span {
  color: var(--purple);
}

.currency {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
}

.currency svg:first-child {
  margin-top: 2px;
  flex-shrink: 0;
  stroke: var(--teal);
}

.currency strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.currency-caret {
  margin-top: 6px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.currency.open .currency-caret {
  transform: rotate(180deg);
}

.currency-panel {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(14, 36, 56, 0.15);
  z-index: 30;
  padding: 6px;
  min-width: 150px;
}

.currency.open .currency-panel {
  display: block;
}

.currency-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: none;
}

.currency-panel button:hover {
  background: var(--bg);
  color: var(--purple-dark);
}

.currency-panel button.active {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.phone {
  flex-shrink: 0;
  font-size: 14px;
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.phone-number svg {
  stroke: var(--purple);
}

.phone-call {
  color: var(--teal-dark);
  font-size: 13px;
  margin-left: 24px;
}

.search {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 4px 4px 20px;
  border: 1px solid var(--border);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(14, 36, 56, 0.18);
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.search-suggestion:hover,
.search-suggestion.active {
  background: var(--purple-light);
}

.search-suggestion img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg);
}

.search-suggestion-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-suggestion-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-price {
  font-size: 12.5px;
  color: var(--text-muted);
}

.search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 10px 0;
  color: var(--text);
}

.search button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search button svg {
  stroke: var(--white);
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn svg {
  stroke: var(--navy-2);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid var(--purple);
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
  position: relative;
}

.cart-btn .cart-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-btn .cart-icon svg {
  stroke: var(--white);
}

.cart-btn .cart-text {
  text-align: left;
  line-height: 1.2;
}

.cart-btn .cart-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.cart-btn .cart-total {
  font-size: 13px;
  color: var(--text-muted);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wish-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

.icon-btn.active-page {
  background: var(--purple-light);
  border-color: var(--purple);
}

.icon-btn.active-page svg {
  stroke: var(--purple-dark);
}

/* ===== Nav bar ===== */
.navbar {
  background: var(--navy);
}

.navbar .container {
  display: flex;
  align-items: stretch;
}

.catalog-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 18px 26px;
  flex-shrink: 0;
}

.catalog-toggle svg {
  stroke: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding-left: 12px;
  overflow-x: auto;
}

.nav-links a {
  position: relative;
  color: #cfe3ea;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 18px 16px;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.active {
  color: var(--white);
}

/* Hidden until auth.js reveals it — the "Сделать добро" nav link starts
   hidden (its site_settings column defaults to false), so it's hidden here
   by CSS too, to avoid flashing the link then hiding it with JS disabled or
   slow. Контакты/Вакансии/Статьи default to visible instead, so they don't
   need this — auth.js only ever needs to hide them, which a brief JS delay
   doesn't flash. */
.nav-links a[href$="dobro.html"] {
  display: none;
}

/* Admin-only visibility toggle for a gated nav section — auth.js appends
   one of these into that section's own .page-head-title, next to its <h1>,
   never into the nav bar itself. */
.page-head-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fs-section-visibility-toggle {
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #fff;
  background: #c0392b;
  cursor: pointer;
  transition: background 0.2s;
}

.fs-section-visibility-toggle.is-visible {
  background: #2e9e5b;
}

.fs-section-visibility-toggle:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== Hero ===== */
.hero-section {
  padding: 24px 0 0;
}

.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 380px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 45%, var(--teal-dark) 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide.image-slide {
  background-image: url('bannery/zavoz_30sent.png');
  background-size: cover;
  background-position: center;
}

.hero-waves {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 56px 64px;
  max-width: 560px;
}

.hero-eyebrow {
  color: var(--sky);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 13px;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.hero-subtitle {
  color: #d3e6ec;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 32px;
  max-width: 380px;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  border: none;
  cursor: pointer;
  padding: 16px 34px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(166, 140, 240, 0.35);
}

.hero-content .hero-cta {
  margin-top: 10px;
}

.hero-slide.image-slide > .hero-cta {
  position: absolute;
  left: 64px;
  bottom: 49px;
  z-index: 2;
}

.hero-graphic {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 28px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots span {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots span.active {
  background: var(--white);
  width: 32px;
}

.hero-arrows {
  position: absolute;
  right: 32px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-arrows button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-arrows button svg {
  stroke: var(--navy);
}

/* ===== Brands ===== */
.brands {
  padding: 40px 0 8px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 20px;
}

.brand-card {
  background: var(--white);
  border-radius: 16px;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
  padding: 16px 22px;
}

.brand-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}

.brand-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== Catalog ===== */
.catalog-section {
  padding: 56px 0 80px;
}

.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.catalog-head h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.view-all {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  transition: background 0.2s, color 0.2s;
}

.view-all:hover {
  background: var(--purple);
  color: var(--white);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: 14px;
  padding: 20px 20px 20px 22px;
  border-left: 4px solid var(--teal);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14, 36, 56, 0.08);
}

.cat-item.purple {
  border-left-color: var(--purple);
}

.cat-item span.label {
  font-weight: 600;
  font-size: 16px;
  color: var(--navy);
}

.cat-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-arrow svg {
  stroke: var(--navy);
}

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: #cfe3ea;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  margin-top: 14px;
  font-size: 14px;
  color: #9fb8c4;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: #b8ccd4;
}

.footer-col ul li a:hover {
  color: var(--sky);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #7f99a5;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Consultation button ===== */
.consult-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #29a9ea;
  border: 2px solid #29a9ea;
  border-radius: 999px;
  padding: 6px 24px 6px 6px;
  box-shadow: 0 14px 30px rgba(41, 169, 234, 0.4);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.consult-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(41, 169, 234, 0.5);
}

.consult-text {
  color: var(--white);
}

.consult-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  background: #29a9ea;
}

.consult-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 560px) {
  .consult-btn {
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    padding: 5px 18px 5px 5px;
    font-size: 13px;
    gap: 8px;
  }
  .consult-icon {
    width: 32px;
    height: 32px;
  }
}

/* ===== Mobile menu ===== */
.catalog-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  width: 300px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 20px 40px rgba(14, 36, 56, 0.15);
  z-index: 20;
  padding: 10px;
}

.catalog-panel.open {
  display: block;
}

.catalog-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.catalog-panel a:hover {
  background: var(--bg);
  color: var(--purple-dark);
}

.catalog-panel a.all-link {
  color: var(--purple-dark);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  margin-bottom: 4px;
  padding-bottom: 12px;
}

.catalog-toggle {
  position: relative;
}

/* ===== Catalog page ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 20px 0 0;
}

.breadcrumb a:hover {
  color: var(--purple-dark);
}

.breadcrumb .sep {
  color: var(--border);
}

.breadcrumb .current {
  color: var(--navy);
  font-weight: 600;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 24px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 34px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.page-head .count {
  color: var(--text-muted);
  font-size: 14px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.toolbar-count {
  font-size: 14px;
  color: var(--text-muted);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
}

.filter-toggle svg {
  stroke: var(--navy);
}

.sort-select {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding-bottom: 12px;
  align-items: start;
}

.filters {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: sticky;
  top: 20px;
}

.filter-block {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filter-block:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.filter-check:last-child {
  margin-bottom: 0;
}

.filter-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-check .brand-thumb {
  width: 26px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.filter-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-dot.in-stock {
  background: #1fa661;
}

.filter-dot.preorder {
  background: #2f88d8;
}

.filter-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-price input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--navy);
  background: var(--bg);
}

.filter-price span {
  color: var(--text-muted);
  font-size: 13px;
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.filter-apply,
.filter-reset {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.filter-apply {
  background: var(--purple);
  color: var(--white);
  border: 1px solid var(--purple);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.filter-apply:hover {
  background: var(--purple-dark);
  box-shadow: 0 4px 14px rgba(166, 140, 240, 0.45);
  transform: translateY(-1px);
}

.filter-apply:active {
  transform: translateY(0);
  box-shadow: none;
}

.filter-reset {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filter-reset:hover {
  background: var(--bg);
  border-color: var(--purple);
  color: var(--purple-dark);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

/* catalog.html ships with body.catalog-loading, so from the very first paint
   the grid shows only skeletons — no hand-authored card, heading or count
   shows through. script.js removes the class once, after the final filtered
   result is in place: one loading state, one final state. */
body.catalog-loading #catalogGrid > .product-card {
  display: none !important;
}

body.catalog-loading .breadcrumb .current,
body.catalog-loading .page-head h1,
body.catalog-loading .page-head .count,
body.catalog-loading .toolbar-count,
body.catalog-loading .pagination {
  visibility: hidden;
}

body:not(.catalog-loading) .product-skeleton {
  display: none;
}

.product-skeleton {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-skeleton-media {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.product-skeleton-line {
  height: 12px;
  border-radius: 6px;
}

.product-skeleton-line-short {
  width: 55%;
}

.product-skeleton-media,
.product-skeleton-line {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .product-skeleton-media,
  .product-skeleton-line {
    animation: none;
  }
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(14, 36, 56, 0.1);
}

.product-card[data-product-url] {
  cursor: pointer;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
}

.product-media.alt {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
}

.product-media.photo {
  background: var(--white);
  padding: 14px;
  box-sizing: border-box;
}

.product-media svg {
  width: 44%;
  height: 44%;
  stroke: #fff;
  opacity: 0.95;
}

.product-media.photo .product-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-thumbs {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.thumb {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--white);
  background: var(--white);
  padding: 0;
  box-shadow: 0 2px 6px rgba(14, 36, 56, 0.18);
  flex-shrink: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb.active {
  border-color: var(--purple);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.product-badge.sale {
  background: var(--purple);
  color: var(--white);
}

.product-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.product-wish svg {
  stroke: var(--navy);
  width: 16px;
  height: 16px;
  fill: none;
  transition: fill 0.2s, stroke 0.2s;
}

.product-edit-admin {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  z-index: 2;
  text-decoration: none;
}

.product-edit-admin:hover {
  background: var(--purple-dark);
}

.product-wish.active svg {
  fill: var(--purple);
  stroke: var(--purple);
}

.product-info {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.size-chip {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

button.size-chip:hover {
  border-color: var(--purple);
}

.size-chip.selected {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.size-chip.size-chip-unavailable {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-muted);
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.6;
}

button.size-chip.size-chip-unavailable:hover {
  border-color: var(--border);
}

.size-chip.one-size {
  width: auto;
  color: var(--text-muted);
  font-weight: 600;
  cursor: default;
}

.product-card.size-required .product-sizes {
  animation: size-shake 0.4s;
}

.product-card.size-required .size-chip:not(.one-size) {
  border-color: #d64545;
}

@keyframes size-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.product-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--teal-dark);
  text-transform: uppercase;
}

.product-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
}

.stock-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.stock-badge.in-stock {
  background: rgba(31, 166, 97, 0.12);
  color: #1fa661;
}

.stock-badge.preorder {
  background: rgba(47, 136, 216, 0.12);
  color: #2f88d8;
}

.product-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.product-price-old {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.btn-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  width: 100%;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-cart-qty {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(14, 36, 56, 0.25);
}

.btn-cart-qty[hidden] {
  display: none;
}

.btn-cart svg {
  stroke: currentColor;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-cart:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.btn-cart.added {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.btn-inquire {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  width: 100%;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-inquire svg {
  stroke: currentColor;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-inquire:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding-bottom: 60px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  font-family: inherit;
}

.pagination button.active {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.pagination button:hover:not(.active) {
  border-color: var(--purple);
  color: var(--purple-dark);
}

.pagination button svg {
  stroke: currentColor;
}

/* ===== Contacts page ===== */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-bottom: 70px;
  align-items: start;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.contact-card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 22px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-item:last-of-type {
  margin-bottom: 0;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  stroke: var(--purple-dark);
}

.contact-item .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.contact-item .value {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

a.value:hover {
  color: var(--purple-dark);
}

.contact-telegram {
  margin-top: 24px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #29a9ea, #1c8cc9);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.contact-telegram .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-telegram a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
}

.contact-social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.social-btn svg {
  stroke: var(--navy);
  transition: stroke 0.2s;
}

.social-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
}

.social-btn:hover svg {
  stroke: var(--white);
}

.contact-form .form-group {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--bg);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  border-radius: 999px;
  padding: 14px 32px;
  transition: background 0.2s;
}

.form-submit:hover {
  background: var(--purple-dark);
}

.form-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.cooperation-text {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.cooperation-second-title {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ===== Articles page ===== */
.article-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.article-tabs .tab {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.article-tabs .tab:hover {
  border-color: var(--purple);
  color: var(--purple-dark);
}

.article-tabs .tab.active {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 20px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(14, 36, 56, 0.1);
}

.article-media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
}

.article-media.alt {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
}

.article-media svg {
  width: 34%;
  height: 34%;
  stroke: #fff;
  opacity: 0.95;
}

.article-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-edit-admin {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  z-index: 2;
  text-decoration: none;
}

.article-edit-admin:hover {
  background: var(--purple-dark);
}

.article-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
}

.article-info {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.article-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-dark);
}

.article-link svg {
  stroke: currentColor;
  transition: transform 0.2s;
}

.article-card:hover .article-link svg {
  transform: translateX(3px);
}

/* ===== Article detail page ===== */
.article-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 60px;
  display: block;
}

.article-detail-category {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.article-detail-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 10px;
}

.article-detail-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-detail-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.article-detail-body p {
  margin-bottom: 18px;
}

.article-detail-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 14px;
  scroll-margin-top: 90px;
}

.article-detail-body a {
  color: var(--purple-dark);
  text-decoration: underline;
}

.article-detail-body strong {
  font-weight: 700;
}

.article-detail-body em {
  font-style: italic;
}

.article-detail-body ul,
.article-detail-body ol {
  margin: 0 0 18px 22px;
}

/* The global `ul { list-style: none }` reset (meant for nav menus) also
   stripped the markers from lists inside article/charity post text. */
.article-detail-body ul {
  list-style: disc;
}

.article-detail-body ol {
  list-style: decimal;
}

.article-inline-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  margin: 8px 0 18px;
}

/* Swipeable photo gallery embedded in a post's rich-text content — see
   initCharityGalleries() in script.js for the prev/next wiring. Scroll-snap
   alone already makes it swipeable on touch. */
.charity-gallery {
  position: relative;
  margin: 8px 0 24px;
}

.charity-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.charity-gallery-track::-webkit-scrollbar {
  display: none;
}

.charity-gallery-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16 / 10;
  scroll-snap-align: start;
  margin: 0;
}

.charity-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.charity-gallery-slide figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 14px;
  background: rgba(14, 36, 56, 0.72);
  color: var(--white);
  font-size: 13px;
  line-height: 1.4;
  border-radius: 0 8px 0 0;
}

.charity-gallery-prev,
.charity-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(166, 140, 240, 0.6);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(14, 36, 56, 0.35);
  transition: background 0.2s;
}

.charity-gallery-prev:hover,
.charity-gallery-next:hover {
  background: rgba(138, 107, 219, 0.8);
}

.charity-gallery-prev {
  left: 10px;
}

.charity-gallery-next {
  right: 10px;
}

.charity-donate-btn {
  display: block;
  width: fit-content;
  margin: 12px auto 0;
  padding: 14px 32px;
  text-decoration: none;
}

.charity-donate-btn.charity-donate-btn-disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: default;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .filters {
    display: none;
    position: static;
    margin-bottom: 20px;
  }
  .filters.open {
    display: block;
  }
  .filter-toggle {
    display: flex;
  }
  .contacts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar .container {
    flex-wrap: wrap;
  }
  .search {
    order: 5;
    width: 100%;
  }
  .hero-title {
    font-size: 38px;
  }
  .hero-subtitle {
    font-size: 17px;
  }
  .hero-graphic {
    width: 60%;
    opacity: 0.5;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 0;
    aspect-ratio: 1.53 / 1;
  }
  .hero-slide.image-slide {
    background-image: url('bannery/zavoz_30sent_mob.png');
  }
  .hero-content {
    padding: 26px 22px;
    max-width: 100%;
  }
  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 6px;
  }
  .hero-title {
    font-size: 30px;
    margin-bottom: 8px;
  }
  .hero-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
    max-width: 200px;
  }
  .hero-cta {
    padding: 11px 22px;
    font-size: 12px;
  }
  .hero-slide.image-slide > .hero-cta {
    left: 22px;
    bottom: 40px;
  }
  .hero-graphic {
    width: 34%;
    opacity: 0.3;
  }
  .hero-graphic svg {
    width: 140px;
    height: 140px;
  }
  .hero-dots {
    left: 22px;
    bottom: 12px;
  }
  .hero-dots span {
    width: 14px;
    height: 3px;
  }
  .hero-dots span.active {
    width: 20px;
  }
  .hero-arrows {
    right: 14px;
    bottom: 10px;
    gap: 6px;
  }
  .hero-arrows button {
    width: 30px;
    height: 30px;
  }
  .hero-arrows button svg {
    width: 14px;
    height: 14px;
  }
  .catalog-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .page-head {
    padding: 10px 0 18px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .navbar .container {
    padding-left: 0;
  }
  .catalog-toggle {
    padding: 12px 14px;
    font-size: 12px;
    gap: 6px;
  }
  .catalog-toggle svg {
    width: 16px;
    height: 16px;
  }
  .catalog-toolbar {
    padding: 12px 14px;
  }
  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .article-tabs {
    gap: 8px;
  }
  .article-tabs .tab {
    padding: 9px 16px;
    font-size: 12px;
  }
  .product-info {
    padding: 12px 12px 14px;
  }
  .product-title {
    font-size: 13.5px;
  }
  .product-price {
    font-size: 16px;
  }
  .product-thumbs {
    gap: 4px;
  }
  .thumb {
    width: 20px;
    height: 20px;
    border-radius: 5px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brands {
    padding: 28px 0 4px;
  }
  .brands-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
  }
  .brand-card {
    height: 52px;
    border-radius: 10px;
    padding: 6px 10px;
  }
}

@media (max-width: 380px) {
  .brands-grid {
    gap: 4px;
  }
  .brand-card {
    height: 44px;
    border-radius: 8px;
    padding: 5px 8px;
  }
}

/* ===== Auth: modals + profile menu ===== */
.fs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 56, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.fs-modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 20px 60px rgba(14, 36, 56, 0.3);
}

.fs-modal h3 {
  color: var(--navy);
  font-size: 20px;
  margin-bottom: 8px;
}

.fs-modal-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.fs-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.fs-modal-close:hover {
  color: var(--navy);
}

.fs-telegram-login {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-telegram-login .fs-btn-primary,
.fs-telegram-login .fs-btn-secondary {
  width: 100%;
}

.fs-telegram-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.fs-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: fs-spin 0.8s linear infinite;
}

@keyframes fs-spin {
  to {
    transform: rotate(360deg);
  }
}

.fs-modal-note {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.size-guide-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-dark);
  text-decoration: underline;
  cursor: pointer;
  width: fit-content;
  font-family: inherit;
}

.size-guide-link:hover {
  color: var(--purple);
}

.fs-modal-wide {
  max-width: 480px;
}

.size-guide-table-wrap {
  overflow-x: auto;
}

.size-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.size-guide-table th,
.size-guide-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: center;
}

.size-guide-table th {
  background: var(--bg);
  color: var(--navy);
  font-weight: 700;
}

.fs-modal-error {
  color: #d64545;
  margin-top: 12px;
}

.fs-profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-profile-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.fs-profile-form input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}

.fs-profile-form input:focus {
  outline: none;
  border-color: var(--purple);
}

.fs-combobox {
  position: relative;
}

.fs-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(14, 36, 56, 0.18);
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
}

.fs-combobox-list li {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.fs-combobox-list li:hover,
.fs-combobox-list li.active {
  background: var(--purple-light);
}

.fs-btn-primary {
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.fs-btn-primary:hover {
  background: var(--purple-dark);
}

.fs-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fs-form-error {
  color: #d64545;
  font-size: 13px;
}

.fs-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(14, 36, 56, 0.16);
  min-width: 200px;
  padding: 8px;
  z-index: 500;
  display: flex;
  flex-direction: column;
}

.fs-profile-menu-name {
  padding: 10px 12px 6px;
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.fs-role-badge:not([hidden]) {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 16px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 12px;
}

.fs-profile-menu-name .fs-role-badge {
  font-size: 10.5px;
  padding: 3px 8px;
  margin-left: 6px;
}

.fs-profile-menu-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.fs-profile-menu-item:hover {
  background: var(--bg);
}

/* ===== Order status badges ===== */
.order-status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.order-status[data-status="Новый"] {
  background: #e7edf5;
  color: var(--navy-2);
}

.order-status[data-status="Оплачен"] {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.order-status[data-status="Собирается"] {
  background: #fdf1d8;
  color: #a3720a;
}

.order-status[data-status="Передан перевозчику"] {
  background: #e0f2fe;
  color: #0369a1;
}

.order-status[data-status="В пути"] {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-status[data-status="Доставлен"] {
  background: #dcf5e8;
  color: var(--teal-dark);
}

.order-status[data-status="Отменен"] {
  background: #fbe2e2;
  color: #b3261e;
}

/* Admin order list: overrides the status-specific colors above so new,
   unactioned orders stand out yellow and everything mid-pipeline reads
   blue, regardless of which exact status it's in. */
.order-status.order-status-new {
  background: #ffe066;
  color: #6b5300;
}

.order-status.order-status-progress {
  background: #cfe8fb;
  color: #0b5a8a;
}

/* ===== Account page ===== */
.account-guest {
  padding: 40px 0 60px;
}

.account-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 24px 0 60px;
  align-items: start;
}

.account-guest[hidden],
.account-layout[hidden] {
  display: none;
}

@media (min-width: 861px) {
  .account-layout.account-layout-admin {
    grid-template-columns: 320px;
  }
}

.account-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.account-card h2 {
  color: var(--navy);
  font-size: 18px;
  margin-bottom: 18px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.account-field:last-of-type {
  border-bottom: none;
}

.account-field .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.account-field .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.account-logout {
  width: 100%;
  margin-top: 16px;
  text-align: center;
  border: 1px solid var(--border);
  color: #b3261e;
}

.account-logout:hover {
  background: #fbe2e2;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.order-card.order-card-delivered {
  background: #f0f0f3;
  border-color: #e2e2e7;
}

.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.order-header strong {
  color: var(--navy);
  font-size: 15px;
}

.order-date {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.order-change-log {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
}

.order-items {
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  padding: 10px 0;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text);
  gap: 12px;
}

.order-item-review-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  border: 1px solid var(--purple);
  color: var(--purple);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.order-item-review-btn + .order-item-review-btn {
  margin-top: 8px;
}

.order-item-review-btn:hover {
  background: var(--purple);
  color: var(--white);
}

.order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-muted);
}

.order-footer strong {
  color: var(--navy);
  font-size: 15px;
}

@media (max-width: 860px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Cart drawer ===== */
.fs-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 56, 0.45);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  display: flex;
  justify-content: flex-end;
}

.fs-cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.fs-cart-drawer {
  background: var(--white);
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -20px 0 60px rgba(14, 36, 56, 0.25);
}

.fs-cart-overlay.open .fs-cart-drawer {
  transform: translateX(0);
}

.fs-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.fs-cart-header h3 {
  color: var(--navy);
  font-size: 18px;
}

.fs-cart-close {
  position: static;
}

.fs-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fs-cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.fs-cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.fs-cart-item-img-empty {
  border: 1px solid var(--border);
}

.fs-cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fs-cart-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.fs-cart-item-brand {
  font-size: 12px;
  color: var(--text-muted);
}

.fs-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.fs-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--navy);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fs-qty-btn:hover {
  background: var(--border);
}

.fs-cart-item-price {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.fs-cart-item-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.fs-cart-item-remove:hover {
  color: #d64545;
}

.fs-promo-row {
  display: flex;
  gap: 8px;
}

.fs-promo-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}

.fs-promo-input:focus {
  outline: none;
  border-color: var(--purple);
}

.fs-promo-apply {
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.fs-promo-apply:hover {
  background: var(--purple-dark);
}

.fs-promo-msg {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
}

.fs-promo-msg-error {
  color: #d64545;
}

.fs-cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  color: var(--text);
  padding-top: 6px;
}

.fs-cart-total-row strong {
  color: var(--navy);
  font-size: 18px;
}

/* A promo code / manager discount keeps the pre-discount amount visible,
   small and struck through above the new one — so the customer can see the
   discount actually took effect. */
.fs-price-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.fs-price-was {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

.fs-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fs-checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.fs-field-label-row {
  display: block;
}

.fs-field-hint {
  display: block;
  font-weight: 400;
  margin-top: 2px;
}

.fs-checkout-form select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

.fs-payment-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fs-delivery-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: -8px;
  font-size: 13px;
}

.fs-delivery-free {
  color: #1fa661;
  font-weight: 700;
}

.fs-delivery-fee {
  color: var(--navy);
  font-weight: 700;
}

.fs-delivery-hint {
  color: var(--text-muted);
}

.fs-payment-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.fs-paypal-buttons {
  min-height: 45px;
}

.fs-paypal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0;
}

.fs-paypal-divider::before,
.fs-paypal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.fs-payment-option:has(input:checked) {
  border-color: var(--purple);
  background: var(--purple-light);
}

.fs-payment-option input {
  margin: 0;
  accent-color: var(--purple);
}

.fs-cart-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
  cursor: pointer;
  padding: 6px;
}

.fs-cart-back:hover {
  color: var(--navy);
}

.fs-btn-secondary {
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.fs-btn-secondary:hover {
  background: var(--border);
}

.fs-btn-danger {
  background: #fbe2e2;
  color: #b3261e;
  border: 1px solid #f0b8b8;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.fs-btn-danger:hover {
  background: #f5c6c6;
}

#fsCartPage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 60px;
}

.fs-cart-success {
  text-align: center;
  padding: 30px 0;
}

.fs-cart-success-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.fs-cart-to-account {
  display: inline-block;
  margin-top: 16px;
  text-align: center;
}

/* ===== Admin page ===== */
.admin-orders {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0 60px;
}

.admin-orders[hidden] {
  display: none;
}

.admin-order-card {
  background: var(--white);
}

.admin-order-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.admin-status-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

.admin-status-save {
  padding: 8px 16px;
  font-size: 13.5px;
}

.admin-payment-toggle {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.admin-payment-toggle.is-unpaid {
  background: #fbe2e2;
  color: #b3261e;
  border: 1px solid #f0b8b8;
}

.admin-payment-toggle.is-paid {
  background: #dcf5e8;
  color: var(--teal-dark);
  border: 1px solid #b6e6cc;
}

.admin-tracking-fields {
  display: flex;
  gap: 8px;
  flex-basis: 100%;
}

.admin-tracking-fields input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}

.admin-tracking-fields input:focus {
  outline: none;
  border-color: var(--purple);
}

.admin-status-msg {
  font-size: 12.5px;
}

.admin-status-ok {
  color: var(--teal-dark);
}

.admin-status-error {
  color: #b3261e;
}

.admin-broadcast {
  margin-top: 20px;
  padding-bottom: 60px;
}

.admin-broadcast[hidden] {
  display: none;
}

.admin-broadcast-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-broadcast-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-broadcast-radios {
  display: flex;
  gap: 10px;
}

.admin-broadcast-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.admin-broadcast-radio:has(input:checked) {
  border-color: var(--purple);
  background: var(--purple-light);
}

.admin-broadcast-radio input {
  margin: 0;
  accent-color: var(--purple);
}

.admin-broadcast-preview {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

.admin-broadcast-preview strong {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.admin-broadcast-preview p {
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.admin-broadcast-form-title {
  font-size: 15px;
  color: var(--navy);
}

/* ---------- admin "Промокоды" panel ---------- */
.admin-promo-stats-card {
  margin-top: 16px;
  max-width: 640px;
}

.admin-promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-promo-hint,
.admin-promo-empty {
  font-size: 12.5px;
  color: var(--text-muted);
}

.admin-promo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-promo-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-promo-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-promo-code {
  font-size: 16px;
  color: var(--navy);
  letter-spacing: 0.5px;
  word-break: break-all;
}

.admin-promo-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.admin-promo-status.is-active {
  background: #dcf5e8;
  color: var(--teal-dark);
}

.admin-promo-status.is-off {
  background: var(--bg);
  color: var(--text-muted);
}

.admin-promo-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-promo-numbers div {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-promo-numbers span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.admin-promo-numbers strong {
  font-size: 15px;
  color: var(--navy);
}

.admin-promo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-promo-actions .fs-btn-secondary {
  display: inline-block;
  padding: 8px 12px;
  font-size: 13px;
}

.admin-promo-actions .fs-btn-secondary:disabled {
  opacity: 0.5;
  cursor: default;
}

.admin-promo-discount {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.admin-promo-discount input {
  width: 64px;
}

.admin-promo-orders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.admin-promo-order {
  font-size: 13px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (max-width: 480px) {
  .admin-promo-numbers {
    grid-template-columns: 1fr 1fr;
  }
}

/* Wraps so the product form's four edit-mode buttons drop to a second row on
   a phone instead of pushing the last one out past the card's edge. */
.admin-broadcast-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-broadcast-form-actions .fs-btn-primary,
.admin-broadcast-form-actions .fs-btn-secondary,
.admin-broadcast-form-actions .fs-btn-danger {
  display: inline-block;
  flex: 1;
}

.admin-product-current-photo {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.admin-color-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-color-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px;
}

.admin-color-row-top {
  display: grid;
  grid-template-columns: 1fr 36px auto;
  align-items: center;
  gap: 8px;
}

.admin-color-row-top input[type="text"] {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

.admin-color-row-top input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.admin-color-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-color-photo-thumb {
  position: relative;
  width: 44px;
  height: 44px;
}

.admin-color-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.admin-color-photo-thumb-pending img {
  border: 2px dashed var(--purple);
}

.admin-color-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-color-photo-remove:hover {
  background: #d33;
}

.admin-color-row input[type="file"] {
  font-size: 12px;
  min-width: 0;
}

.admin-color-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.admin-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.admin-editor-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  width: 34px;
  height: 34px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.admin-editor-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.admin-editor-body {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-y: auto;
}

.admin-editor-body:focus {
  outline: none;
  border-color: var(--purple);
}

.admin-editor-body h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 10px 0 6px;
}

.admin-editor-body a {
  color: var(--purple-dark);
  text-decoration: underline;
}

.admin-color-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.admin-color-remove:hover {
  color: #d33;
}

/* ===== Preorder chat picker ===== */
.fs-preorder-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fs-preorder-choices a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.fs-preorder-telegram {
  background: #29a9ea;
}

.fs-preorder-telegram:hover {
  background: #1c93d1;
}

.fs-preorder-whatsapp {
  background: #25d366;
}

.fs-preorder-whatsapp:hover {
  background: #1fb959;
}

/* ===== Product detail page ===== */
.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  gap: 44px;
  padding: 24px 0 60px;
  align-items: start;
}

.product-detail-layout .product-card {
  display: contents;
}

.product-detail-layout .product-media {
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 1 / 1;
}

.product-detail-layout .thumb {
  width: 46px;
  height: 46px;
}

.product-detail-layout .product-info {
  padding: 0;
  gap: 16px;
}

.product-detail-layout .product-brand {
  font-size: 13px;
}

.product-detail-layout .product-title {
  font-size: 28px;
  line-height: 1.3;
}

.product-detail-layout .product-sizes {
  margin-bottom: 0;
  margin-top: 4px;
  order: 5;
}

.product-detail-layout .product-brand {
  order: 1;
}

.product-detail-layout .product-title {
  order: 2;
}

.product-detail-layout .stock-badge {
  order: 3;
}

.product-detail-layout .product-prices {
  order: 4;
}

.product-detail-layout .product-actions {
  order: 6;
}

.product-detail-layout .product-description {
  order: 7;
  margin-top: 14px;
}

.product-description-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.product-description p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.product-description p + p {
  margin-top: 10px;
}

.product-detail-layout .size-guide-link {
  order: 5;
}

.product-detail-layout .size-chip {
  min-width: 38px;
  height: 34px;
  font-size: 13px;
}

.product-detail-layout .product-prices {
  margin-top: 4px;
  padding-top: 4px;
}

.product-detail-layout .product-price {
  font-size: 32px;
}

.product-detail-layout .product-price-old {
  font-size: 17px;
}

.product-detail-layout .product-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 400px;
  margin-top: 6px;
}

.product-detail-layout .btn-cart {
  flex: 1;
  margin-top: 0;
  padding: 14px;
  font-size: 14px;
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.product-detail-layout .btn-cart:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
}

.product-detail-layout .btn-inquire {
  flex: 1;
  margin-top: 0;
  padding: 14px;
  font-size: 14px;
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.product-detail-layout .btn-inquire:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
}

.product-wish.product-wish-inline {
  position: static;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Preorder detail pages reuse .products-grid (script.js keys the
   "Оформить предзаказ" cart-button behavior off ".products-grid .btn-cart")
   alongside .product-detail-layout for the two-column look — the compound
   selector's higher specificity overrides .products-grid's own grid,
   regardless of stylesheet order. */
.product-detail-layout.products-grid {
  grid-template-columns: minmax(0, 460px) 1fr;
}

@media (max-width: 860px) {
  .product-detail-layout.products-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Product reviews ===== */
.product-reviews {
  padding: 12px 0 60px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.product-reviews h2 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 14px;
}

.product-reviews-summary {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.product-reviews-stars,
.product-review-stars {
  color: #f0a93a;
  letter-spacing: 1px;
}

.product-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.product-review {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.product-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.product-review-author {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}

.product-review-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: auto;
}

.product-review-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.product-reviews-write {
  margin-top: 8px;
}

.product-review-write-btn {
  width: auto;
  padding: 12px 24px;
}

.product-review-rating-input {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.product-review-star-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--border);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.product-review-star-btn.selected {
  color: #f0a93a;
}

.fs-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  min-height: 80px;
  margin-bottom: 14px;
}

.fs-textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.article-comments {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 0 60px;
  border-top: 1px solid var(--border);
}

.article-comments h2 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 14px;
}

.article-comments-empty {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.article-comments-count {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.article-comment {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.article-comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.article-comment-author {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}

.article-comment-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: auto;
}

.article-comment-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.article-comments-write {
  margin-top: 8px;
}

.article-comments-error {
  color: #d94141;
  font-size: 13px;
  margin: -6px 0 12px;
}

.product-review-reward-code {
  font-size: 20px;
  font-weight: 800;
  color: var(--purple-dark);
  background: var(--purple-light);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  letter-spacing: 1px;
}

/* ===== Color swatches (same product, different photo set) ===== */
.product-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid var(--white);
  outline: 1px solid var(--border);
  background: var(--swatch-color, var(--border));
  cursor: pointer;
  transition: outline-color 0.15s, transform 0.15s;
}

.color-chip:hover {
  transform: scale(1.1);
}

.color-chip.color-chip-unavailable {
  cursor: not-allowed;
  opacity: 0.35;
  filter: grayscale(1);
  position: relative;
}

.color-chip.color-chip-unavailable::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--text-muted), transparent calc(50% + 1px));
}

.color-chip.color-chip-unavailable:hover {
  transform: none;
}

.color-chip.selected {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.product-detail-layout .product-colors {
  order: 5;
}

.product-detail-layout .color-chip {
  width: 30px;
  height: 30px;
}
