/* ===== Переменные — палитра логотипа ТексФом ===== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  --bg-primary: #f3fce7;
  --bg-secondary: #e6f4d9;
  --bg-card: #ffffff;
  --bg-card-hover: #f7fcf2;
  --border: #c5dbb0;
  --border-dark: #b0c99a;
  --text-primary: #2c4118;
  --text-secondary: #4a5f32;
  --text-muted: #6e855b;
  --accent: #2c4118;
  --accent-hover: #32471c;
  --accent-light: #5a7340;
  --accent-glow: rgba(44, 65, 24, 0.1);
  --accent-border: rgba(44, 65, 24, 0.28);
  --on-accent: #f3fce7;
  --header-bg: rgba(243, 252, 231, 0.94);
  --overlay-badge: rgba(255, 255, 255, 0.92);
  --success: #3d8b4a;
  --danger: #c04444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(44, 65, 24, 0.08);
  --transition: 0.25s ease;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

/* ===== УНИВЕРСАЛЬНОЕ СКРЫТИЕ ===== */
[hidden] {
  display: none !important;
}

/* ===== Сброс и база ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 134px;
  height: auto;
  padding: 10px 0;
  gap: 16px;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
}

.logo__img {
  height: 117px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.logo__text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.header__phone {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  font-size: 0.9rem;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero__title span {
  color: var(--accent-light);
}

.hero__desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

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

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 65, 24, 0.18);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn--full {
  width: 100%;
  margin-top: 8px;
}

.hero__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: var(--bg-primary);
  border: 1px solid var(--border-dark);
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-primary);
}

.hero__features {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-feature span {
  color: var(--success);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ===== Секции ===== */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section__subtitle {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== О компании ===== */
.seo-intro {
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 32px;
  line-height: 1.7;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.about-card {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  color: inherit;
  font: inherit;
}

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

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

.about-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.about-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-card__text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Каталог ===== */
.catalog-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 220px;
}

.search-box__input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}

.search-box__input:focus {
  outline: none;
  border-color: var(--accent);
}

.sort-select {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.catalog-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filters--sub {
  margin-bottom: 32px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.filter-btn--sub {
  font-size: 0.82rem;
  padding: 8px 16px;
}

/* ===== Карточки товаров ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card__image {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg-secondary);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--overlay-badge);
  color: var(--text-secondary);
}

.product-card__badge--out {
  color: var(--danger);
}

.product-card__category {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--on-accent);
}

.product-card__sub {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--overlay-badge);
  color: var(--text-secondary);
}

.product-card__fav {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--overlay-badge);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  transition: transform var(--transition);
}

.product-card__fav:hover {
  transform: scale(1.15);
}

.product-card__fav.active {
  background: var(--accent-glow);
}

.product-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 12px;
  flex: 1;
}

.product-card__props {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.product-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.product-card__unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.product-card__cart {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}

.product-card__cart:hover {
  background: var(--accent-hover);
}

.product-card__more {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.product-card__more:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ===== Доставка ===== */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .delivery-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

.delivery-card--simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.delivery-card--simple .delivery-card__title {
  margin-bottom: 0;
  line-height: 1.35;
}

.delivery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
}

.delivery-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
}

.delivery-card__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.delivery-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.delivery-card__text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.delivery-card__time {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== Контакты ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(44, 65, 24, 0.18);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-item__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-item__value {
  font-size: 1rem;
  font-weight: 500;
}

.contact-item__value a {
  color: var(--text-primary);
}

.contact-item__value a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contacts-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contacts-map__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 280px;
}

.contacts-map__frame iframe,
.contacts-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contacts-map__open {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}

.contacts-map__open:hover {
  background: var(--accent-glow);
}

.contacts-map__placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

/* ===== Модальное окно товара ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.modal__dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal__dialog--checkout {
  max-width: 520px;
  padding: 32px;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal__close:hover {
  color: var(--accent);
  background: var(--bg-secondary);
}

.modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.modal__image-wrap {
  background: var(--bg-secondary);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: var(--radius) 0 0 var(--radius);
}

.modal__image-wrap img {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  max-height: min(52vh, 420px);
  min-height: 220px;
  object-fit: contain;
  object-position: center;
  padding: 16px;
  box-sizing: border-box;
  display: block;
  background: var(--bg-secondary);
}

.modal__image-wrap--color-only img {
  max-height: min(58vh, 480px);
}

.modal__body {
  padding: 32px 28px;
  min-width: 0;
  overflow-y: auto;
}

.modal__category {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.modal__title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.modal__desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
  white-space: pre-line;
}

.modal__thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  border-top: 1px solid var(--border);
}

.modal__thumbs--compact {
  gap: 6px;
  padding: 10px 12px 12px;
}

.modal__thumbs--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 8px;
  max-height: min(280px, 36vh);
  overflow-y: auto;
  overflow-x: hidden;
  flex-wrap: unset;
  align-content: start;
  justify-content: start;
}

.modal__thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: none;
  cursor: pointer;
  width: 64px;
  height: auto;
  overflow: hidden;
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.modal__thumbs--grid .modal__thumb {
  width: 72px;
}

.modal__thumb img {
  width: 100%;
  height: 64px;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.modal__thumb-label {
  display: block;
  padding: 2px 4px 3px;
  font-size: 0.58rem;
  line-height: 1.2;
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-card);
}

.modal__thumbs--compact .modal__thumb {
  width: 48px;
  height: auto;
  border-radius: 6px;
}

.modal__thumbs--compact .modal__thumb img {
  height: 48px;
}

.modal__thumb.active {
  border-color: var(--accent);
}

.modal__props {
  margin-bottom: 24px;
}

.modal__props div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.modal__props dt {
  color: var(--text-muted);
  font-weight: 500;
}

.modal__props dd {
  color: var(--text-primary);
}

.modal__price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.modal__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.modal__stock {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

.modal__stock--out {
  color: var(--danger);
}

.modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Корзина ===== */
.cart-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}

.cart-btn:hover {
  background: var(--bg-card-hover);
}

.cart-btn__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.cart-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cart-panel__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.cart-panel__title {
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-panel__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: var(--transition);
}

.cart-panel__close:hover {
  color: var(--accent);
  background: var(--bg-card);
}

.cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-panel__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.cart-item__img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.cart-item__name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cart-item__price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  font-family: inherit;
}

.cart-qty-btn:hover {
  border-color: var(--accent);
}

.cart-qty {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
  font-family: inherit;
}

.cart-item__total {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cart-totals__row--total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  box-shadow: var(--shadow);
  max-width: 90%;
  text-align: center;
}

.cart-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Оформление заказа ===== */
.checkout-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.checkout-summary {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  max-height: 160px;
  overflow-y: auto;
}

.checkout-line {
  padding: 4px 0;
  color: var(--text-secondary);
}

.checkout-line--total {
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}

.checkout-hint {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color var(--transition);
}

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

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 6px;
}

.verify-code-display {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--accent);
  text-align: center;
  font-weight: 600;
}

.checkout-success {
  text-align: center;
  padding: 20px 0;
}

.checkout-success__icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: var(--on-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}

.checkout-success h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.checkout-success p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ===== Авторизация ===== */
.auth-suggestions {
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.auth-suggestions__title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.auth-suggestions__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-suggestion {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.auth-suggestion:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-switch__btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  padding: 0;
  margin-left: 4px;
  transition: var(--transition);
}

.auth-switch__btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-switch--prominent {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.auth-switch--prominent .auth-switch__btn {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius, 10px);
  background: var(--bg-secondary, #f3fce7);
  text-decoration: none;
}

.auth-switch--prominent .auth-switch__btn:hover {
  background: var(--accent-soft, #e8f5dc);
  text-decoration: none;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.header-user-info #header-user-name {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.icon-btn__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.icon-btn--sm {
  padding: 4px 8px;
  font-size: 0.9rem;
}

/* ===== Избранное ===== */
.favorites-content {
  margin-top: 16px;
}

.favorites-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
}

/* ===== Подвал ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__nav {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer__nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ===== Пустое состояние ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

/* ===== WhatsApp кнопка ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: var(--transition);
  text-decoration: none;
  animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.7); }
  100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
}

/* ===== Пагинация ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: inherit;
}

.pagination button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

.admin-pagination {
  margin-top: 16px;
  margin-bottom: 8px;
  justify-content: flex-start;
  align-items: center;
}

.admin-pagination .pagination__info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 4px;
}

/* ===== Админка ===== */
.admin-body {
  background: var(--bg-primary);
  min-height: 100vh;
}

.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.admin-login__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.admin-login__logo {
  height: 117px;
  width: auto;
  max-width: min(320px, 90vw);
  margin: 0 auto 20px;
  object-fit: contain;
}

.admin-login__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.admin-login__desc {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.admin-login__back {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-header__title {
  font-size: 1.25rem;
}

.admin-header__sub {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.admin-header__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-alert {
  background: linear-gradient(90deg, #1a3a1a, #2a4a2a);
  border-bottom: 2px solid var(--success);
  padding: 16px 0;
}

.admin-alert--pulse {
  animation: pulse 0.5s ease 3;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.admin-alert__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-alert__content {
  color: var(--success);
  font-size: 0.95rem;
}

.admin-main {
  padding: 32px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.admin-stat--accent {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.admin-stat__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.admin-stat__label {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-products-nav {
  margin-bottom: 8px;
}

.admin-products-nav .filters {
  justify-content: flex-start;
}

.admin-products-nav .catalog-count {
  margin-bottom: 16px;
}

.admin-search {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 0 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.admin-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.admin-hint code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.captcha-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  min-height: 65px;
}

.captcha-wrap .form-error {
  width: 100%;
  text-align: center;
}

.products-table__row {
  cursor: grab;
}

.products-table__row--selected {
  background: rgba(59, 130, 246, 0.08);
}

.products-table__th-select,
.products-table__select-cell {
  width: 36px;
  padding-left: 12px;
  padding-right: 4px;
}

.products-table__select {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #6b7280;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.products-table__select:hover {
  border-color: #3b82f6;
}

.products-table__select--active {
  border-color: #3b82f6;
  background: #3b82f6;
  box-shadow: inset 0 0 0 3px var(--bg-card, #12121a);
}

.products-selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  font-size: 0.875rem;
}

.products-selection-bar[hidden] {
  display: none;
}

.products-selection-bar__text {
  flex: 1 1 200px;
  line-height: 1.4;
}

.products-selection-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.products-table__row--dragging {
  opacity: 0.45;
}

.products-table__row--drop-target {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: rgba(201, 168, 76, 0.1);
}

.products-table__row input,
.products-table__row button,
.products-table__row label {
  cursor: auto;
}

.products-table__drag-cell {
  width: 56px;
}

.admin-merge-drag {
  user-select: none;
  cursor: grabbing;
}

.admin-merge-drag .products-table__row {
  cursor: grabbing;
}

.products-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.products-table th,
.products-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.products-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-table__row--hidden {
  opacity: 0.45;
}

.products-table__photo-cell {
  width: 72px;
}

.products-table__photo-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.products-table__img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-secondary);
}

.products-table__photo-count {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted, #5a6b5a);
  line-height: 1;
  white-space: nowrap;
}

.products-table__name {
  font-weight: 600;
  min-width: 160px;
}

.products-table__id {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.products-table__price {
  width: 100px;
  padding: 6px 8px !important;
  font-size: 0.875rem;
}

.products-table__status {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.2s;
}

.toggle-switch__slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-switch__slider {
  background: var(--success);
}

.toggle-switch input:checked + .toggle-switch__slider:before {
  transform: translateX(20px);
}

.order-card--pending .order-card__status {
  background: var(--accent);
}

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

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.order-card--new {
  border-left: 4px solid var(--success);
}

.order-card--done {
  opacity: 0.7;
}

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

.order-card__id {
  font-weight: 700;
  color: var(--accent);
}

.order-card__status {
  background: var(--success);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.order-card--done .order-card__status {
  background: var(--text-muted);
}

.order-card__date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.order-card__phone {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.order-card__name {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.order-card__items {
  list-style: none;
  margin: 12px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.order-card__items li {
  padding: 2px 0;
}

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

.order-card__total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.order-card__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__image {
    max-width: 500px;
    margin: 0 auto;
  }
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .modal__grid {
    grid-template-columns: 1fr;
  }
  .modal__image-wrap {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .modal__image-wrap img {
    max-height: min(45vh, 360px);
  }
  .modal__props div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .admin-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 134px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .nav.open {
    display: flex;
  }
  .header__phone {
    display: none;
  }
  .header__actions {
    gap: 8px;
  }
  .logo {
    max-width: calc(100% - 56px);
  }
  .logo__img {
    height: auto;
    width: min(280px, calc(100vw - 96px));
    max-height: 117px;
  }
  .header__inner {
    min-height: 134px;
    padding: 10px 0;
  }
  .burger {
    display: flex;
  }
  .section {
    padding: 60px 0;
  }
  .cart-panel__dialog {
    max-width: 100%;
  }
  .hero__features {
    flex-direction: column;
    gap: 8px;
  }
  .header-user-info {
    padding: 4px 8px;
  }
  .header-user-info #header-user-name {
    max-width: 80px;
    font-size: 0.8rem;
  }
  .icon-btn {
    padding: 6px 10px;
  }
}

/* ===== Admin: товар + toast ===== */
.btn--danger {
  color: #8b1e1e;
  border-color: #d8a0a0;
}

.btn--danger:hover {
  background: #fff0f0;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1200;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  max-width: min(92vw, 420px);
  text-align: center;
}

.admin-toast--success {
  border-color: #9bc88a;
  background: #f3fce7;
}

.admin-toast--error {
  border-color: #d8a0a0;
  background: #fff5f5;
  color: #8b1e1e;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
}

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

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 16, 0.45);
}

.admin-modal__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.admin-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

.admin-modal__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.admin-modal__sub {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.product-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-form__field--wide {
  grid-column: 1 / -1;
}

.product-form__field--check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.product-form__textarea {
  min-height: 110px;
  resize: vertical;
}

.product-form__upload {
  margin-top: 20px;
}

.product-form__upload-title {
  margin: 0 0 10px;
  font-weight: 600;
}

.product-form__dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.product-form__dropzone--active,
.product-form__dropzone:hover {
  border-color: var(--accent);
  background: #f8fff0;
}

.product-form__dropzone-text {
  text-align: center;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
}

.product-form__dropzone-text strong {
  color: var(--text-primary);
  font-size: 1.05rem;
}

.product-form__preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
}

.product-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.products-table__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6f4dc;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.products-table__badge--deleted {
  background: #fdeaea;
  color: #8b1e1e;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-form__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 108px));
  justify-content: start;
  gap: 10px;
  margin-bottom: 12px;
  max-height: min(440px, 55vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}

.product-form__gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.product-form__gallery-toolbar[hidden] {
  display: none;
}

.product-form__gallery-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.35;
}

.product-form__gallery[hidden] {
  display: none;
}

.product-form__thumb {
  position: relative;
  width: 108px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.product-form__thumb--selected {
  box-shadow: 0 0 0 2px var(--accent);
}

.product-form__thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.product-form__thumb-num {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(20, 28, 16, 0.78);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  z-index: 1;
}

.product-form__thumb-check {
  position: absolute;
  top: 4px;
  left: 28px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.product-form__thumb-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.product-form__thumb-color {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 4px 6px;
  font-size: 0.68rem;
  background: var(--bg-card);
  color: var(--text-primary);
}

.product-form__thumb-label {
  display: block;
  padding: 3px 6px 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.product-form__thumb--new {
  box-shadow: 0 0 0 2px #9bc88a inset;
}

.product-form__thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 28, 16, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 720px) {
  .product-form__grid {
    grid-template-columns: 1fr;
  }

  .admin-modal__dialog {
    padding: 20px;
  }
}

.taxonomy-manager {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border, #2a2a38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.taxonomy-manager__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.taxonomy-manager__hint {
  margin: 0 0 16px;
}

.taxonomy-manager__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.taxonomy-manager__block h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gold, #c9a84c);
}

.taxonomy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.taxonomy-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.taxonomy-list__empty {
  color: #888;
  font-size: 0.9rem;
}

.taxonomy-list__color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-form__options {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.product-form__option-group {
  display: grid;
  gap: 10px;
}

.product-form__option-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.product-form__option-new {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-form__color-input {
  width: 48px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--border, #2a2a38);
  border-radius: 8px;
  background: transparent;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chips[hidden] {
  display: none;
}

.option-chips--many {
  max-height: min(260px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  -webkit-overflow-scrolling: touch;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #2a2a38);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
}

.option-chip--select {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option-chip--select:hover,
.option-chip--select.active {
  border-color: var(--gold, #c9a84c);
  background: rgba(201, 168, 76, 0.12);
}

.option-chip--editable {
  padding-right: 4px;
}

.option-chip__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.option-chip__remove {
  border: none;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}

.modal__options {
  margin: 12px 0;
}

.modal__options-label {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #aaa;
}

@media (max-width: 900px) {
  .taxonomy-manager__grid {
    grid-template-columns: 1fr;
  }
}
