/* style.css — оформление витрины и страницы товара */

/* Базовые сбросы и шрифт */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1f2937;
  background: #f7f5ef;
  line-height: 1.5;
}

a {
  color: inherit;
}

/* Контейнер с ограничением ширины и отступами */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====== Шапка сайта (фирменный стиль FOHOW+: золото на чёрном) ====== */
.site-header {
  /* тёплое золотистое свечение на чёрном — как на аватаре/офсайте */
  background: radial-gradient(120% 140% at 18% 50%, #3a2607 0%, #140d05 55%, #0a0a0a 100%);
  color: #fff;
  padding: 22px 0;
  border-bottom: 3px solid #d4af37; /* золотая фирменная полоса */
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #e9c46a; /* золото */
  background: transparent;
  padding: 6px 12px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 8px;
  text-decoration: none; /* логотип — ссылка на промо-регистрацию */
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

a.logo:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #f5d061;
}

/* Кнопка перехода в админку — иконка «вход» у правого края шапки */
.admin-link {
  margin-left: auto; /* прижимаем к правому краю */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #e9c46a;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2; /* выше центрального заголовка */
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-link:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #f5d061;
}

.admin-link svg {
  width: 22px;
  height: 22px;
}

/* Заголовок «Прайс-лист 2026» — крупный, по центру всей шапки */
.header-title {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #e9c46a;
  pointer-events: none; /* чтобы не перекрывать клики по логотипу */
}

/* ====== Закреплённая оболочка витрины (класс .app на <body>) ======
   Шапка, подвал и левая колонка зафиксированы и не прокручиваются.
   Прокручивается только блок товаров (.content). */
.app {
  --header-h: 96px;   /* высота шапки (уточняется скриптом) */
  --footer-h: 56px;   /* высота подвала (уточняется скриптом) */
  --sidebar-w: 240px; /* ширина левой колонки */
}

html,
body {
  height: 100%;
}

/* Страница товара: подвал всегда прижат к низу экрана (sticky footer) */
body.product-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.product-page main {
  flex: 1 0 auto;
}

body.product-page .site-footer {
  margin-top: 0;
}

body.app {
  overflow: hidden; /* убираем прокрутку всей страницы — скроллится только контент */
}

/* Шапка и подвал — во всю ширину */
.site-header .container,
.site-footer .container {
  max-width: none;
}

.app .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.app .site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 0;
}

/* Контейнер-раскладка: левая колонка фиксирована, контент скроллится */
.app .layout {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Левая колонка: зафиксирована между шапкой и подвалом */
.app .sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: 0;
  width: var(--sidebar-w);
  overflow-y: auto;     /* если категорий много — скроллится только она */
  padding: 16px;
  z-index: 25;
}

/* Блок товаров: единственная прокручиваемая область */
.app .content {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow-y: auto;
  padding: 12px 24px 28px;
}

.cat-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 10px;
}

/* Кнопка-гамбургер: видна только на узких экранах */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #fff;
}

/* Затемнение под выехавшим меню (по умолчанию скрыто) */
.nav-overlay {
  display: none;
}

.cat-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: #374151;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cat-nav-item:hover {
  background: #f6efdc;
  color: #a07d18;
}

.cat-nav-item.is-active {
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  color: #1a1a1a;
  font-weight: 700;
}

/* Заголовок раздела в навигаторе (PRIZE MALL, Каталог) */
.cat-nav-section {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a07d18;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 12px 4px;
  margin-top: 6px;
  cursor: pointer;
}

.cat-nav-section:hover {
  color: #c8962f;
}

.cat-nav-section.is-active {
  color: #c8962f;
}

/* Строки «Избранное»/«Корзина» в левой панели — появляются при наличии товаров */
.nav-collections {
  margin-top: 6px;
}

.nav-collections:not(:empty) {
  border-top: 1px solid #f0e7cf;
  padding-top: 6px;
}

.cat-nav-collection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a07d18;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cat-nav-collection:hover {
  background: #f6efdc;
  color: #c8962f;
}

.cat-nav-collection.is-active {
  background: #f6efdc;
  color: #c8962f;
  box-shadow: inset 3px 0 0 #d4af37;
}

/* Золотой бейдж со счётчиком */
.nav-badge {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  border-radius: 10px;
  padding: 3px 8px;
  min-width: 20px;
  text-align: center;
}

/* Поле поиска в левой панели */
.catalog-search {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid #d9c9a0;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
}

.catalog-search:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Курс F$ в левой панели — локальный пересчёт рублей */
.rate-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.rate-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a07d18;
  white-space: nowrap;
}

.rate-input-wrap {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
}

.rate-field {
  width: 100%;
  padding: 9px 28px 9px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid #d9c9a0;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
}

.rate-field:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.rate-cur {
  position: absolute;
  right: 10px;
  color: #7a5c12;
  font-weight: 700;
  pointer-events: none;
}

/* «Все товары» — золотой и жирный, в тон заголовкам разделов */
.cat-nav-all {
  color: #a07d18;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

/* Подкатегории внутри раздела — с отступом */
.cat-nav-sub {
  padding-left: 22px;
  font-size: 13px;
}

/* ====== Мобильная версия: меню-гамбургер с выезжающей панелью ====== */
@media (max-width: 820px) {
  .menu-toggle {
    display: flex;
  }

  .header-title {
    font-size: 19px;
  }

  /* Контент занимает всю ширину — колонка прячется в drawer */
  .app .content {
    margin-left: 0;
    padding: 12px 16px 24px;
  }

  /* Левая колонка превращается в выезжающую панель слева */
  .app .sidebar {
    bottom: 0;
    width: 280px;
    max-width: 82%;
    background: #fff;
    border-right: 1px solid #ececec;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 40;
  }

  .app.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  /* Затемнение фона при открытом меню */
  .app.nav-open .nav-overlay {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
  }
}

/* ====== Раздел (PRIZE MALL и т.п.) ====== */
.section-title {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a07d18;
  margin: 36px 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid #d4af37;
}

.section-title:first-child {
  margin-top: 0;
}

/* ====== Категории ====== */
.category {
  margin: 32px 0;
}

.category:first-child {
  margin-top: 0;
}

.section-title + .category {
  margin-top: 18px;
}

.category-title {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a07d18;
  border-left: 4px solid #d4af37;
  padding-left: 12px;
  margin-bottom: 18px;
}

/* ====== Сетка карточек ======
   auto-fill + minmax: число колонок подстраивается под доступную ширину.
   Чем шире область (или мельче масштаб) — тем больше карточек в ряд. */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

/* Карточка товара — кликабельная ссылка */
.card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Обёртка над фото — нужна для позиционирования кнопок поверх изображения */
.card-media {
  position: relative;
}

.card-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #eee;
  display: block;
}

/* Кнопка «Избранное» в правом верхнем углу фото — фон прозрачный */
.card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.card-fav {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  /* мягкая подложка-свечение, чтобы иконка читалась на любом фото */
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
  transition: color 0.15s ease, transform 0.15s ease;
}

.card-fav:hover {
  transform: scale(1.12);
}

.card-fav svg {
  width: 24px;
  height: 24px;
  fill: none;
}

/* Активное избранное: красное закрашенное сердечко */
.card-fav.is-active {
  color: #e3342f;
}

.card-fav.is-active svg {
  fill: currentColor;
}

/* Строка с кодом товара (F001) и кнопкой корзины справа */
.card-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

/* Кнопка «Корзина» — фон прозрачный, золотится при добавлении */
.card-cart {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.card-cart svg {
  width: 23px;
  height: 23px;
}

.card-cart:hover {
  color: #a07d18;
}

/* Активная корзина: золотая и крупнее */
.card-cart.is-active {
  color: #c8962f;
  transform: scale(1.18);
}

/* Счётчик добавленных товаров */
.cart-count {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  border-radius: 10px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

/* «Подскок» корзины при каждом добавлении */
@keyframes cart-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1.18); }
}

.card-cart.bump {
  animation: cart-bump 0.3s ease;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-code {
  font-size: 12px;
  font-weight: 700;
  color: #a07d18;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 16px;
  margin: 4px 0 12px;
  flex: 1; /* растягиваем, чтобы таблицы цен выровнялись по низу карточек */
}

/* ====== Заглушка вместо фото ====== */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    45deg, #f1f1f1, #f1f1f1 10px, #e9e9e9 10px, #e9e9e9 20px
  );
  color: #9ca3af;
  font-size: 13px;
}

/* ====== Таблица цен ====== */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px; /* мельче — большие суммы (165 000) помещаются в карточку */
}

.price-table th,
.price-table td {
  border: 1px solid #eee;
  padding: 5px 6px;
  text-align: center;
  white-space: nowrap; /* числа не переносятся на две строки */
}

.price-table thead th {
  background: #f1e2bf; /* золотистая шапка (в тон строкам H000/FOHOW+) */
  color: #7a5c12;
  font-weight: 700;
}

.price-table tbody th {
  background: #faf4e6; /* мягкое золото */
  text-align: left;
  font-weight: 700;
  color: #7a5c12;
}

.price-table tbody td {
  font-variant-numeric: tabular-nums;
}

.no-price {
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

/* ====== Страница товара ====== */
.back-link {
  display: inline-block;
  margin: 24px 0 8px;
  color: #a07d18;
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

.detail {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 28px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 40px;
}

.detail-media {
  width: 100%;
}

.detail-image {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
}

/* Миниатюры галереи */
.detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.detail-thumb:hover {
  opacity: 1;
}

.detail-thumb.is-active {
  border-color: #d4af37;
  opacity: 1;
}

/* Превью видео под фото — ссылка, открывается в новой вкладке */
.detail-video {
  position: relative;
  display: block;
  margin-top: 14px;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2407 0%, #14110a 60%, #0a0a0a 100%);
  cursor: pointer;
}

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

.detail-video-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: #e9c46a;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.detail-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.92);
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}

.detail-video:hover .detail-video-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #e9c46a;
}

.detail-video-play svg {
  width: 26px;
  height: 26px;
  margin-left: 3px; /* визуальная компенсация треугольника */
}

.detail-code {
  font-size: 13px;
  font-weight: 700;
  color: #a07d18;
  letter-spacing: 0.5px;
}

.detail-title {
  font-size: 26px;
  margin: 6px 0;
}

.detail-subtitle {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #374151;
  margin: 22px 0 10px;
}

.detail-description {
  font-size: 15px;
  color: #374151;
}

/* Кнопки «Избранное» и «Корзина» на странице товара */
.detail-actions {
  display: flex;
  gap: 12px;
  margin: 22px 0 6px;
  flex-wrap: wrap;
}

.detail-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.detail-action svg {
  width: 19px;
  height: 19px;
}

.detail-action.is-fav {
  background: #fff;
  color: #a07d18;
  border: 1px solid #d4af37;
}

.detail-action.is-fav:hover {
  background: #faf4e6;
}

.detail-action.is-cart {
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  color: #1a1a1a;
  border: none;
}

.detail-action.is-cart:hover {
  filter: brightness(1.05);
}

/* Кнопка «Подробнее» — ссылка во внешний материал (новая вкладка) */
.detail-action.is-more {
  background: #14110a;
  color: #e9c46a;
  border: 1px solid #d4af37;
  text-decoration: none;
}

.detail-action.is-more:hover {
  background: #0d0d0d;
  color: #f5d061;
}

/* Активное избранное на странице товара — красное сердечко */
.detail-action.is-fav svg {
  fill: none;
}

.detail-action.is-fav.is-active {
  color: #e3342f;
  border-color: #e3342f;
}

.detail-action.is-fav.is-active svg {
  fill: currentColor;
}

/* Счётчик на золотой кнопке корзины — тёмный, чтобы читался */
.detail-action.is-cart .cart-count {
  background: #1a1a1a;
  color: #e9c46a;
}

@keyframes detail-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.detail-action.bump {
  animation: detail-bump 0.25s ease;
}

/* Характеристики товара (состав, упаковка, срок годности и т. д.) */
.detail-specs {
  margin-top: 8px;
}

.detail-spec {
  padding: 12px 0;
  border-top: 1px solid #f0e7cf;
}

.detail-spec:first-child {
  border-top: none;
  padding-top: 4px;
}

.detail-spec dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7a5c12;
  margin-bottom: 5px;
}

.detail-spec dd {
  margin: 0;
  font-size: 15px;
  color: #374151;
}

.muted {
  color: #9ca3af;
  font-style: italic;
}

/* На узких экранах детальная карточка в одну колонку */
@media (max-width: 720px) {
  .detail {
    grid-template-columns: 1fr;
  }
  .detail-image {
    height: 260px;
  }
}

/* ====== Корзина ====== */
.cart {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 30px;
}

.cart-title {
  font-size: 22px;
  color: #7a5c12;
  margin-bottom: 16px;
}

.cart-empty {
  color: #6b7280;
  font-style: italic;
  padding: 18px 0 24px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table thead th {
  background: #f6efdc;
  color: #7a5c12;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #eadfbf;
}

.cart-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0e7cf;
  vertical-align: middle;
}

.cart-c-check {
  width: 130px;
  white-space: nowrap;
}

.cart-c-price,
.cart-c-qty,
.cart-c-del {
  width: 1%;
  white-space: nowrap;
}

.cart-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7a5c12;
  cursor: pointer;
}

/* Колонка товара: фото + название */
.cart-c-prod {
  width: auto;
}

.cart-prod {
  display: flex;
  gap: 14px;
  align-items: center;
}

.cart-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
  flex: none;
}

.cart-thumb.placeholder {
  font-size: 11px;
}

.cart-prod-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-prod-name {
  font-weight: 700;
  color: #1f2937;
  text-decoration: none;
}

.cart-prod-name:hover {
  color: #a07d18;
}

.cart-prod-sub {
  font-size: 13px;
  color: #a07d18;
}

/* Цена за единицу */
.cart-c-price {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
}

.cart-c-price b {
  color: #1f2937;
}

/* Количество: − N + */
.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9c9a0;
  border-radius: 8px;
  overflow: hidden;
}

.cart-minus,
.cart-plus {
  width: 34px;
  height: 34px;
  border: none;
  background: #faf4e6;
  color: #7a5c12;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cart-minus:hover,
.cart-plus:hover {
  background: #f1e2bf;
}

.cart-q {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  border: none;
  background: transparent;
  color: #c0392b;
  font: inherit;
  cursor: pointer;
}

.cart-remove:hover {
  text-decoration: underline;
}

/* Низ корзины: массовые действия, итоги, кнопки */
.cart-footer {
  margin-top: 18px;
}

.cart-bulk {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0e7cf;
}

.cart-del-selected {
  border: none;
  background: transparent;
  color: #c0392b;
  font: inherit;
  cursor: pointer;
}

.cart-del-selected:hover {
  text-decoration: underline;
}

.cart-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: flex-end;
  padding: 16px 0;
  font-size: 15px;
  color: #374151;
}

.cart-totals b {
  color: #7a5c12;
  font-size: 17px;
}

.cart-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-light,
.btn-gold {
  padding: 12px 22px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #d4af37;
}

.btn-light {
  background: #fff;
  color: #a07d18;
}

.btn-light:hover {
  background: #faf4e6;
}

.btn-gold {
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  color: #1a1a1a;
  border: none;
}

.btn-gold:hover {
  filter: brightness(1.05);
}

.cart-note {
  text-align: right;
  color: #7a5c12;
  margin-top: 10px;
  min-height: 18px;
}

/* Узкие экраны: упрощаем таблицу корзины в карточки */
@media (max-width: 760px) {
  .cart-table thead {
    display: none;
  }
  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: auto;
  }
  .cart-table tr {
    border: 1px solid #f0e7cf;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 12px;
  }
  .cart-table tbody td {
    border-bottom: none;
    padding: 8px;
  }
  .cart-totals {
    justify-content: flex-start;
  }
  .cart-actions-row {
    justify-content: stretch;
  }
  .btn-light,
  .btn-gold {
    flex: 1;
  }
}

/* ====== Окно с чеком заказа ====== */
.receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px 16px;
  overflow-y: auto;
}

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

.receipt-box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  border-top: 4px solid #d4af37;
  padding: 18px;
  width: 560px;
  max-width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.receipt-box.is-resizing {
  user-select: none;
}

.receipt-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 7;
}

/* Зоны захвата для масштабирования окна (видны и активны только на ПК) */
.receipt-grip {
  display: none;
}

@media (min-width: 821px) {
  .receipt-grip {
    display: block;
    position: absolute;
    z-index: 5;
    touch-action: none;
  }
  .g-n { top: -3px; left: 12px; right: 12px; height: 10px; cursor: ns-resize; }
  .g-s { bottom: -3px; left: 12px; right: 12px; height: 10px; cursor: ns-resize; }
  .g-e { top: 12px; bottom: 12px; right: -3px; width: 10px; cursor: ew-resize; }
  .g-w { top: 12px; bottom: 12px; left: -3px; width: 10px; cursor: ew-resize; }
  .g-ne { top: -5px; right: -5px; width: 18px; height: 18px; cursor: nesw-resize; z-index: 6; }
  .g-nw { top: -5px; left: -5px; width: 18px; height: 18px; cursor: nwse-resize; z-index: 6; }
  .g-se { bottom: -5px; right: -5px; width: 18px; height: 18px; cursor: nwse-resize; z-index: 6; }
  .g-sw { bottom: -5px; left: -5px; width: 18px; height: 18px; cursor: nesw-resize; z-index: 6; }

  /* Подсказка-уголок: видно, что окно можно тянуть за правый нижний угол */
  .g-se::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #c8962f;
    border-bottom: 2px solid #c8962f;
    border-bottom-right-radius: 3px;
  }
}

.receipt-close:hover {
  color: #1f2937;
}

.receipt-canvas-wrap {
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.receipt-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

.receipt-loading {
  text-align: center;
  color: #6b7280;
  padding: 40px 0;
}

.receipt-send-title {
  text-align: center;
  font-size: 16px;
  color: #374151;
  margin: 18px 0 12px;
}

.receipt-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.receipt-soc {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid #ececec;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.receipt-soc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.receipt-soc img {
  width: 30px;
  height: 30px;
  display: block;
}

/* Кнопки заблокированы, пока чек формируется */
.receipt-soc:disabled,
.receipt-save:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.receipt-hint {
  text-align: center;
  color: #7a5c12;
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
}

/* ====== Окно входа в админ-панель ====== */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

/* Скрытие должно работать поверх display:flex (иначе окно видно всегда) */
.login-modal[hidden] {
  display: none;
}

.login-box {
  background: #161616;
  color: #fff;
  border: 1px solid #2c2c2c;
  border-top: 3px solid #d4af37;
  border-radius: 14px;
  padding: 26px;
  width: 320px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
  color: #e9c46a;
  font-size: 20px;
  margin-bottom: 18px;
  text-align: center;
}

.login-box label {
  display: block;
  font-size: 13px;
  color: #d9bd84;
  margin-bottom: 12px;
}

.login-box input {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  background: #0d0d0d;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #fff;
  font: inherit;
}

.login-box input:focus {
  outline: none;
  border-color: #d4af37;
}

.login-error {
  color: #f08a8a;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 6px;
}

.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.login-submit,
.login-cancel {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-submit {
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  color: #1a1a1a;
}

.login-cancel {
  background: transparent;
  color: #d9bd84;
  border: 1px solid #3a3a3a;
}

/* Подзаголовок в окне входа (например «Как показывать каталог?») */
.login-sub {
  color: #d9bd84;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

/* Шаги модалки входа: показывается один */
.login-step[hidden] {
  display: none;
}

/* Кнопки выбора (Вход / Гостевой вход / Регистрация / Партнёр / Клиент / роли модалки) */
.login-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-choice {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d4af37;
  background: rgba(212, 175, 55, 0.08);
  color: #e9c46a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.login-choice:hover {
  background: linear-gradient(135deg, #e1b941 0%, #c8962f 100%);
  color: #1a1a1a;
}

.login-choice:disabled {
  opacity: 0.45;
  cursor: default;
  background: transparent;
  color: #d9bd84;
}

.login-choice:disabled:hover {
  background: transparent;
  color: #d9bd84;
}

/* Клиентский вид: только цена в рублях вместо таблицы */
.price-rub-only {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  padding: 6px 0;
}

/* Поле курса, заблокированное для гостя */
.rate-field.is-locked {
  background: #f3f0e7;
  color: #9b8a5e;
  cursor: pointer;
}

/* ====== Сообщения и подвал ====== */
.message {
  text-align: center;
  color: #6b7280;
  padding: 40px 0;
}

.site-footer {
  background: #0d0d0d;
  color: #d9bd84;
  text-align: center;
  padding: 18px 0;
  font-size: 14px;
  margin-top: 40px;
  border-top: 3px solid #d4af37; /* золотая фирменная полоса */
}

/* Подвал: копирайт по центру, соцсети у левого края */
.footer-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.copyright {
  margin: 0;
}

.copyright a {
  color: #e9c46a;
  text-decoration: none;
}

.copyright a:hover {
  text-decoration: underline;
}

.social {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.social a {
  display: inline-flex;
  opacity: 0.9;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.social a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.social img {
  display: block;
  width: 26px;
  height: 26px;
}
