:root {
  color-scheme: dark;
  /* Тёмная тема: тёплый «деликатесный» фон */
  --bg: #120d10;
  --bg-mid: #1c1016;
  --bg-glow: #251018;
  --surface: #1c1519;
  --surface2: #282022;
  --text: #f2ecee;
  --muted: #9c8f96;
  --accent: #e85d4c;
  --accent-hover: #ff7a6a;
  --border: #3d2f36;
  --radius: 12px;
  --shadow: 0 8px 36px rgba(12, 4, 8, 0.45);
  --header-bg: rgba(18, 13, 16, 0.93);
  --card-hover-border: #4d3e46;
  --error: #ff8a80;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1120px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #faf7f4;
  --bg-mid: #f2eae4;
  --bg-glow: #ebe3dd;
  --surface: #ffffff;
  --surface2: #f7f2ee;
  --text: #1c1614;
  --muted: #6d625e;
  --border: #e3d9d3;
  --accent: #c73d32;
  --accent-hover: #e85d4c;
  --shadow: 0 8px 28px rgba(60, 35, 28, 0.1);
  --header-bg: rgba(255, 252, 250, 0.94);
  --card-hover-border: #c9a090;
  --error: #c62828;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(232, 93, 76, 0.08), transparent 50%),
    radial-gradient(ellipse 90% 60% at -10% 60%, rgba(120, 60, 90, 0.12), transparent 45%),
    linear-gradient(168deg, var(--bg) 0%, var(--bg-mid) 42%, var(--bg-glow) 58%, var(--bg) 100%);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 110% 75% at 100% -15%, rgba(232, 93, 76, 0.08), transparent 50%),
    radial-gradient(ellipse 85% 55% at -5% 55%, rgba(160, 100, 80, 0.1), transparent 48%),
    linear-gradient(168deg, var(--bg) 0%, var(--bg-mid) 45%, #fffefb 100%);
  background-color: var(--bg);
}

a {
  color: var(--accent-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .site-header {
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  min-height: 3.25rem;
  flex-wrap: wrap;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: min(100%, 22rem);
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s ease;
}

.logo-link:hover {
  opacity: 0.92;
  text-decoration: none;
}

.logo-img {
  flex-shrink: 0;
  height: 2.25rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 480px) {
  .logo-img {
    height: 2.5rem;
    max-width: 11rem;
  }
}

.logo-text {
  font-weight: 700;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: normal;
}

.logo-link:hover .logo-text {
  color: var(--accent-hover);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.theme-toggle:hover {
  border-color: var(--muted);
  transform: scale(1.04);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__icon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

html[data-theme="light"] .theme-toggle__moon {
  display: block;
}

html[data-theme="light"] .theme-toggle__sun {
  display: none;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.usp-strip {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .usp-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.usp-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

.usp-item strong {
  color: var(--text);
  font-weight: 600;
}

.usp-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-hover);
}

.marketing-note {
  margin: 0.5rem 0 0;
  max-width: 48rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.marketing-note strong {
  color: var(--text);
}

.price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.price-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-hint,
.checkout-hint {
  margin: 0 0 1rem;
  line-height: 1.4;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.footer-brand {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1rem;
}

.footer-bullets {
  margin: 0;
  padding-left: 1.1rem;
}

.footer-bullets li {
  margin-bottom: 0.35rem;
}

.main {
  padding: 2rem 0 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}

.muted {
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
  max-width: 42ch;
}

.small {
  font-size: 0.875rem;
}

.page-head {
  margin-bottom: 1.75rem;
}

.page-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.tab:hover {
  color: var(--text);
  border-color: var(--muted);
  text-decoration: none;
}

.tab-active {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}

.category-block {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

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

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

.product-media {
  aspect-ratio: 4 / 3;
  background: var(--surface2);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.product-name {
  margin: 0;
  font-size: 1.05rem;
}

.product-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
}

.product-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-hover);
}

.price-lg {
  font-size: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input,
.checkout-form textarea,
.checkout-form input[type="text"],
.checkout-form input[type="tel"] {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.input:focus,
.checkout-form textarea:focus,
.checkout-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.qty-input {
  width: 4.5rem;
  max-width: 5rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 640px) {
  .cart-row {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
}

.cart-row-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface2);
}

.cart-thumb.placeholder {
  border: 1px dashed var(--border);
}

.cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cart-row-total {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-hover);
}

@media (min-width: 640px) {
  .cart-row-total {
    text-align: right;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.cart-summary .summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.cart-summary .btn {
  margin-bottom: 0.5rem;
}

.checkout-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.errorlist {
  color: var(--error);
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.order-preview h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.mini-cart {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
}

.mini-cart li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.mini-cart li:last-child {
  border-bottom: none;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

/* Каталог: промо-слайдер (ширина как у контента — внутри .container) */
.hero-slider-outer {
  width: 100%;
  margin-bottom: 1.5rem;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-slider__viewport {
  overflow: hidden;
  width: 100%;
  background: var(--surface2);
}

.hero-slider__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-slide {
  position: relative;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.hero-slide--linked {
  cursor: pointer;
}

.hero-slide--linked:hover .hero-slide__media img {
  transform: scale(1.02);
}

.hero-slide__media {
  position: relative;
  line-height: 0;
}

.hero-slide__media img {
  width: 100%;
  height: min(28vh, 280px);
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

@media (min-width: 768px) {
  .hero-slide__media img {
    height: min(32vh, 320px);
  }
}

.hero-slide__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 45%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-slide__caption-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0.75rem 1rem;
  pointer-events: none;
}

@media (min-width: 480px) {
  .hero-slide__caption-wrap {
    padding: 0 1rem 1.1rem;
  }
}

.hero-slide--linked .hero-slide__caption-wrap {
  pointer-events: none;
}

.hero-slide__caption {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero-slide__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.hero-slide__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  max-width: 42rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-slide__cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.hero-slider__btn:hover {
  opacity: 1;
  background: var(--surface2);
}

.hero-slider__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero-slider__btn--prev {
  left: 0.5rem;
}

.hero-slider__btn--next {
  right: 0.5rem;
}

@media (max-width: 480px) {
  .hero-slider__btn {
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
  }

  .hero-slider__btn--prev {
    left: 0.25rem;
  }

  .hero-slider__btn--next {
    right: 0.25rem;
  }
}

.hero-slider__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.65rem 0 0.35rem;
  width: 100%;
}

.hero-slider__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.hero-slider__dot[aria-selected="true"] {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.15);
}

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