/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ДЛЯ TILDA T123 БЛОКОВ ===== */

/* ===== СТИЛИ VPN УВЕДОМЛЕНИЯ ===== */
.panda-vpn-notification {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  background: #e74c3c !important;
  color: white !important;
  padding: 16px 24px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
  z-index: 10001 !important;
  font-family: var(--panda-font, sans-serif) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  opacity: 0 !important;
  transform: translateX(100%) !important;
  transition: all 0.3s ease !important;
  max-width: 320px !important;
  border-left: 4px solid #c0392b !important;
}

.panda-vpn-notification.show {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.panda-vpn-notification .panda-vpn-icon {
  display: inline-block !important;
  margin-right: 8px !important;
  font-size: 16px !important;
}

/* Базовые CSS переменные для всех блоков */
:root {
  --panda-bg: #F4EDE2;
  --panda-bg-alt: #f7efe5;
  --panda-bg-dark: #4a2d22;
  --panda-text: #2f211a;
  --panda-text-alt: #2c231d;
  --panda-muted: #8e7f75;
  --panda-muted-alt: #8c7d73;
  --panda-accent: #1F4F2E;
  --panda-green: #3aa65b;
  --panda-green-100: #f3f3f3;
  --panda-cta: #1F4F2E;
  --panda-cta-hover: #155022;
  --panda-cta-text: #fff;
  --panda-paper: #fffaf3;
  --panda-radius: 18px;
  --panda-radius-sm: 14px;
  --panda-shadow: 0 12px 32px rgba(0,0,0,.10);
  --panda-shadow-strong: 0 14px 40px rgba(0,0,0,.14);
  --panda-container: 1200px;
  --panda-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

/* Базовые стили для всех блоков */
.panda-block {
  font-family: var(--panda-font);
  box-sizing: border-box;
}

.panda-block *,
.panda-block *::before,
.panda-block *::after {
  box-sizing: border-box;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.panda-block input,
.panda-block button,
.panda-block select,
.panda-block textarea {
  font: inherit;
}

.panda-block a {
  color: var(--panda-text) !important;
  text-decoration: none;
}

/* Страховка от переполнения изображениями */
.panda-block img {
  max-width: 100%;
  height: auto;
}

/* Принудительное применение шрифта Montserrat для всех элементов */
.panda-block,
.panda-block *,
.panda-block h1,
.panda-block h2,
.panda-block h3,
.panda-block h4,
.panda-block h5,
.panda-block h6,
.panda-block p,
.panda-block span,
.panda-block div,
.panda-block a,
.panda-block button,
.panda-block input,
.panda-block select,
.panda-block textarea {
  font-family: var(--panda-font) !important;
}

.panda-block a.pc-buy {
  color: #fff !important;
}

.panda-block :focus-visible {
  outline: 2px solid var(--panda-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .panda-block * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== СКРЫТАЯ ФОРМА ЗАКАЗА ===== */
/* Скрываем блок формы заказа от пользователей */
#rec1259864071 {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Обеспечиваем доступность формы для отправки */
#rec1259864071 form,
#rec1259864071 input {
  pointer-events: auto !important;
}

/* ===== HEADER STYLES ===== */
#header-search {
  --bg: var(--panda-bg);
  --bg-dark: var(--panda-bg-dark);
  --text: var(--panda-text);
  --muted: var(--panda-muted);
  --accent: var(--panda-accent);
  --radius: var(--panda-radius);
  --shadow: var(--panda-shadow);
  --input-h: 44px;

  background: var(--bg);
  padding: 8px 0;
  width: 100%;
  z-index: 1000;
  /* Плавный переход для sticky режима */
  transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* Дополнительные стили для sticky режима через JavaScript */
#header-search.js-sticky-active {
  background: var(--bg);
}

/* sticky для хедера отключен полностью (чистый лист) */

#header-search .empty .btn {
  color: #fff !important;
}

.hs-wrap {
  max-width: var(--panda-container);
  margin: 0 auto;
  padding: 0 12px;
}

/* Desktop layout */
.hs-row.desktop {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
}

/* Header logo */
.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f7e8d8;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Search */
.hs-search {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #d9cfc6;
  border-radius: 999px;
  height: var(--input-h);
  padding: 0 40px 0 14px;
  box-shadow: var(--shadow);
}

.hs-input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

.hs-input::placeholder {
  color: #b6a89c;
}

.hs-input:focus,
.hs-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.ico.search {
  position: absolute;
  right: 14px;
  width: 18px;
  height: 18px;
  fill: #9f8e7f;
  pointer-events: none;
}

.clear {
  position: absolute;
  right: 38px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #9f8e7f;
  display: none;
}

/* Search results */
.results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #eadfd5;
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  display: none;
  z-index: 5;
}

.results.open {
  display: block;
}

.res-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

.res-item:hover,
.res-item[aria-selected="true"] {
  background: #f7efe7;
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #f2e6db;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.title {
  font-weight: 700;
  line-height: 1.25;
}

.price {
  color: #553b2f;
  font-weight: 800;
  white-space: nowrap;
}

/* Empty state */
.empty {
  padding: 18px 16px 20px;
  text-align: center;
  color: var(--text);
}

.empty .ill {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  margin: 6px auto 12px;
  background: #fff4eb;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px #ffe3cc;
}

.empty .ill svg {
  width: 34px;
  height: 34px;
  fill: #d37a2e;
}

.empty .h {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 6px;
}

.empty .p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.empty .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

.empty .btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Actions */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid #d9cfc6;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn.accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.bag {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #d8cec2;
  display: grid;
  place-items: center;
  color: #624e42;
  text-decoration: none;
  transition: all 0.2s ease;
}

.bag:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.bag svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile */
.hs-row.mobile {
  display: none;
}

@media (max-width: 980px) {
  /* На экранах 980px и меньше убираем фиксированное позиционирование с основного блока */
  #header-search {
  position: static !important; /* НЕ липкий на мобильных */
  top: auto;
    padding-top: 0;
    box-shadow: none;
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
  }
  
  /* И убираем отступ для body */
  body {
  padding-top: 0 !important;
  overflow-x: hidden !important; /* предотвращаем горизонтальный скролл */
  }
  
  .hs-row.desktop {
    display: none;
  }
  
  .hs-row.mobile {
    display: block !important;
    overflow: visible !important;
    position: relative !important;
  }

  .topbar {
    background: var(--bg-dark);
    color: #fff;
    padding: 10px 12px;
    border-radius: 0 0 18px 18px;
  width: 100%; /* избегаем 100vw из-за возможных скроллбаров */
  margin-left: 0;
  margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .top-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px;
  }

  .title {
    font-weight: 800;
  }

  /* Поисковая строка в обычном потоке без sticky */
  .hs-row.mobile .hs-search {
    margin: 12px 12px 0 !important; /* Уменьшаем отступ сверху с 25px до 12px */
    height: 46px !important;
    background: var(--bg) !important;
    box-shadow: var(--shadow) !important;
    border-radius: 999px !important;
    border: 2px solid #d9cfc6 !important;
    padding: 10px 12px !important;
    /* Убираем все sticky свойства */
    position: relative !important;
  }
}

/* ===== MOBILE MENU STYLES ===== */
#mobile-menu {
  font-family: var(--panda-font);
}

.mobile-bottom-menu {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panda-paper, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

@media (max-width: 980px) {
  .mobile-bottom-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  /* Добавляем отступ снизу для body, чтобы контент не перекрывался меню */
  body {
    padding-bottom: 70px !important;
  }
}

.mobile-bottom-menu .menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--panda-text, #333) !important;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 60px;
  position: relative;
}

.mobile-bottom-menu .menu-item:hover,
.mobile-bottom-menu .menu-item:active {
  background: rgba(255, 107, 53, 0.1);
  color: var(--panda-accent, #ff6b35) !important;
  transform: translateY(-2px);
}

.mobile-bottom-menu .menu-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-bottom: 2px;
}

.mobile-bottom-menu .menu-item span {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.mobile-bottom-menu .menu-item small {
  font-size: 8px;
  opacity: 0.7;
  margin-top: -2px;
  line-height: 1;
}

.mobile-bottom-menu .menu-item.coming-soon {
  opacity: 0.7;
}

.mobile-bottom-menu .menu-item.coming-soon:hover {
  opacity: 1;
}

/* Анимация для активного состояния */
.mobile-bottom-menu .menu-item:active {
  transform: translateY(-1px) scale(0.95);
}

/* ===== MOBILE MENU STYLES ===== */
.mobile-bottom-menu {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panda-paper, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

@media (max-width: 980px) {
  .mobile-bottom-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  /* Добавляем отступ снизу для body, чтобы контент не перекрывался меню */
  body {
    padding-bottom: 70px !important;
  }
}

.mobile-bottom-menu .menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--panda-text, #333) !important;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 60px;
  position: relative;
}

.mobile-bottom-menu .menu-item:hover,
.mobile-bottom-menu .menu-item:active {
  background: rgba(31, 79, 46, 0.1);
  color: var(--panda-accent, #1F4F2E) !important;
  transform: translateY(-2px);
}

.mobile-bottom-menu .menu-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-bottom: 2px;
}

.mobile-bottom-menu .menu-item span {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.mobile-bottom-menu .menu-item small {
  font-size: 8px;
  opacity: 0.7;
  margin-top: -2px;
  line-height: 1;
}

.mobile-bottom-menu .menu-item.coming-soon {
  opacity: 0.7;
}

.mobile-bottom-menu .menu-item.coming-soon:hover {
  opacity: 1;
}

/* Анимация для активного состояния */
.mobile-bottom-menu .menu-item:active {
  transform: translateY(-1px) scale(0.95);
}

/* ===== CATALOG STYLES ===== */
#catalog {
  --bg: var(--panda-bg-alt);
  --paper: var(--panda-paper);
  --shadow: var(--panda-shadow);
  --radius: var(--panda-radius);
  --radius-sm: var(--panda-radius-sm);
  --text: var(--panda-text-alt);
  --muted: var(--panda-muted-alt);
  --green: var(--panda-green);
  --green-100: var(--panda-green-100);
  --cta: var(--panda-cta);
  --cta-hover: var(--panda-cta-hover);
  --cta-text: var(--panda-cta-text);
  --container: var(--panda-container);
  background: var(--bg);
  padding: 18px 0 28px;
  /* убраны sticky-хаки (чистый лист) */
}

@media (max-width: 980px) {
  #catalog {
  /* mobile specific: keep defaults; ensure not empty */
  padding-top: 0;
  }
}

.pc-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

/* Внутренняя колонка не должна раздувать ширину контейнера */
.pc-main { min-width: 0; }

/* Обёртка категорий — вспомогательная, без sticky; sticky на внутренних элементах */
.pc-cats-sticky-wrapper {
  position: static;
  z-index: auto;
  align-self: start;
  height: auto;
  overflow: visible;
}

/* (удалено) js-fixed не нужен — работаем нативным sticky */

/* Скрываем мобильный wrapper на ПК */
@media (min-width: 981px) {
  .pc-cats-sticky-wrapper[data-mode="mobile"] {
    display: none !important;
  }
  
  .pc-cats-sticky-wrapper[data-mode="desktop"] { position: static; top: auto; }
  .pc-cats { position: static; top: auto; z-index: auto; }

  /* Дополнительная страховка видимости на ПК */
  .pc-cats { display: block !important; }
  .pc-cats-mobile { display: none !important; }
}

/* Мобильная версия sticky контейнера */
@media (max-width: 980px) {
  /* Скрываем десктопный wrapper на мобильных */
  .pc-cats-sticky-wrapper[data-mode="desktop"] {
    display: none !important;
  }
  
  .pc-cats-sticky-wrapper[data-mode="mobile"] { display: block; position: static; }
  .pc-cats-mobile { position: static; top: auto; z-index: auto; }

  /* Дополнительная страховка видимости на мобилке */
  .pc-cats { display: none !important; }
  .pc-cats-mobile { display: block !important; }
}

/* удалены отладочные рамки sticky */

/* Sidebar базовые параметры */
.pc-cats {
  align-self: start;
  height: max-content;
  overflow: visible;
  /* Плавный переход для sticky режима */
  transition: box-shadow 0.3s ease;
}


/* На мобильных список категорий без sticky */
@media (max-width: 980px) {
  .pc-cats { position: static; }
}



.pc-catlist {
  list-style: none;
  margin: 0;
  padding: 10px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pc-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease;
}

.pc-cat:hover {
  background: #f1eadf;
}

.pc-cat[aria-current="true"] {
  background: var(--green-100);
  outline: 2px solid rgba(58,166,91,.15);
}

.pc-cat .icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pc-cat .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pc-cat .label {
  font-weight: 800;
}





@media (max-width: 980px) {
  .pc-wrap {
    grid-template-columns: 1fr;
  }

  .pc-cats-mobile {
  display: block;
  margin: 0 0 12px;
  padding: 3px 0;
  backdrop-filter: saturate(140%) blur(2px);
  width: 100%;
  overflow: visible;
  /* Плавный переход для sticky режима */
  transition: box-shadow 0.3s ease;
  }

  .pc-catstrip {
    display: flex;
    gap: 12px;
    overflow-x: auto; /* Возвращаем горизонтальный скролл */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 4px;
    scrollbar-width: none;
    overscroll-behavior-x: contain; /* изолируем горизонтальный скролл от страницы */
    /* Изолируем скролл для категорий */
    touch-action: pan-x;
    min-width: 0; /* критично: флекс-контейнер не должен раздувать родителя */
    max-width: 100%;
    /* Обеспечиваем контроль переполнения на уровне этого элемента */
    flex-shrink: 0;
  }

  .pc-catstrip::-webkit-scrollbar {
    display: none;
  }

  .pc-chip {
    flex: 0 0 auto;
    width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    background: var(--paper);
    color: var(--text);
    padding: 10px 8px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
  }

  .pc-chip:hover {
    transform: translateY(-1px);
  }

  .pc-chip[aria-current="true"] {
    background: var(--green-100);
    box-shadow: inset 0 0 0 2px var(--green);
  }

  .pc-chip .icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
  }

  .pc-chip .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .pc-chip .label {
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
  }
}

/* Sections */

.pc-section {
  margin-bottom: 24px;
}

.pc-h2 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--text);
  margin: 6px 0 14px;
}

@media (min-width: 981px) {
  .pc-h2 {
    font-size: 32px;
  }
}

.pc-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .pc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Cards */
.pc-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.15);
}

.pc-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eee;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-thumb:hover {
  transform: scale(1.02);
}

.pc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pc-title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.pc-title:hover {
  color: var(--panda-accent);
}

.pc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.pc-price {
  font-weight: 900;
  color: #3b2a22;
  font-size: 17px;
  white-space: nowrap;
  flex: 0 1 auto;
}

.pc-buy {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff !important;
  background: var(--cta);
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(31,79,46,.25);
  max-width: 56%;
  transition: all .15s ease;
}

.pc-buy:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31,79,46,.3);
}

.pc-buy .pc-buy-text {
  display: inline;
}

@media (max-width: 980px) {
  .pc-buy {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    max-width: none;
    font-size: 28px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(31,79,46,.25);
  }

  .pc-buy .pc-buy-text {
    display: none;
  }

  .pc-buy::before {
    content: '+';
    display: block;
    transform: translateY(-1px);
  }
}

/* Skeleton */
.pc-skeleton .sk-cats {
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ece5da 20%, #e2d9cd 40%, #ece5da 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  margin-bottom: 16px;
}

.pc-skeleton .sk-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pc-skeleton .sk-card {
  height: 200px;
  border-radius: 16px;
  background: linear-gradient(90deg, #ece5da 20%, #e2d9cd 40%, #ece5da 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== PROMO SLIDER STYLES ===== */
#promo-slider {
  --ps-radius: var(--panda-radius);
  --ps-shadow: var(--panda-shadow-strong);
  --ps-dot: rgba(0,0,0,.28);
  --ps-dot-active: #2a211d;
  --ps-bg: #f6efe6;

  /* стрелки */
  --ps-side-size: clamp(38px, 4.6vw, 46px);
  --ps-side-icon: #6B7170;
  --ps-side-icon-hover: var(--panda-accent);
  --ps-side-bg: #fff;
  --ps-side-border: rgba(0,0,0,.08);
  --ps-side-shadow: 0 8px 24px rgba(0,0,0,.16);

  /* внутренние отступы контейнера */
  --ps-wrap-pad: clamp(10px, 3vw, 18px);

  /* полоски индикатора */
  --ps-dot-w: 12px;
  --ps-dot-h: 6px;
  --ps-dot-gap: 10px;
  --ps-dot-active-w: calc(var(--ps-dot-w) + 2*var(--ps-dot-gap) - 2px);

  width: 100%;
  background: var(--ps-bg);
  padding: clamp(12px, 2vw, 20px) 0 clamp(24px, 3vw, 34px);
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Уменьшаем отступ промо-слайдера на мобильных */
@media (max-width: 980px) {
  #promo-slider {
    padding-bottom: 12px; /* Уменьшаем нижний отступ */
  }
}

.ps-wrap {
  max-width: var(--panda-container);
  margin: 0 auto;
  padding: 0 var(--ps-wrap-pad);
  overflow: visible;
}

.ps-layout {
  position: relative;
}

.ps-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  background: #2a211d;
  width: 100%;
  aspect-ratio: 16/9;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

@media (min-width: 980px) {
  .ps-viewport {
    aspect-ratio: 21/9;
  }
}

.ps-track {
  position: absolute;
  inset: 0;
  display: flex;
  will-change: transform;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}

.ps-slide {
  position: relative;
  flex: 0 0 100%;
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.ps-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* На ПК: изображения заполняют контейнер 21:9 */
@media (min-width: 980px) {
  .ps-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* Альтернативный режим отображения - показывать изображение полностью */
.ps-slide.contain img {
  object-fit: contain;
  background: #f5f5f5;
}

/* Navigation arrows */
.ps-side {
  position: absolute;
  top: 50%;
  width: var(--ps-side-size);
  height: var(--ps-side-size);
  border: 0;
  border-radius: 50%;
  background: var(--ps-side-bg);
  color: var(--ps-side-icon);
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  box-shadow: var(--ps-side-shadow);
  border: 1px solid var(--ps-side-border);
  transition: all 0.2s ease;
  transform: translateY(-50%);
}

.ps-side:hover {
  color: var(--ps-side-icon-hover);
  transform: translateY(-50%) scale(1.05);
}

.ps-left {
  left: calc(-1 * var(--ps-side-size) / 2);
}

.ps-right {
  right: calc(-1 * var(--ps-side-size) / 2);
}

.ps-side svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ps-knob {
  display: none;
}

/* Dots */
.ps-dots {
  display: flex;
  justify-content: center;
  gap: var(--ps-dot-gap);
  margin-top: 16px;
}

.ps-dot {
  width: var(--ps-dot-w);
  height: var(--ps-dot-h);
  border: 0;
  border-radius: 999px;
  background: var(--ps-dot);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ps-dot[aria-selected="true"] {
  background: var(--ps-dot-active);
  width: var(--ps-dot-active-w);
}

@media (max-width: 980px) {
  .ps-side {
    display: none;
  }
}

/* Стили для сообщения об ошибке загрузки слайдов */
.ps-error-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--ps-bg);
  border-radius: var(--ps-radius);
}

.ps-error-content {
  text-align: center;
  color: #666;
}

.ps-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.ps-error-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.ps-error-subtext {
  font-size: 14px;
  opacity: 0.7;
}

/* ===== POPUP ДЛЯ ТОВАРОВ (В СТИЛЕ КОРЗИНЫ) ===== */
.product-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  font-family: var(--panda-font) !important;
}

.product-popup *,
.product-popup h1,
.product-popup h2,
.product-popup h3,
.product-popup h4,
.product-popup h5,
.product-popup h6,
.product-popup p,
.product-popup span,
.product-popup div,
.product-popup a,
.product-popup button {
  font-family: var(--panda-font) !important;
}

.product-popup.active {
  opacity: 1;
  visibility: visible;
}

.product-popup.active .cart-content {
  transform: scale(1) translateY(0);
}

.product-popup .cart-content {
  max-width: 900px;
  max-height: 85vh;
  width: 100%;
  position: relative;
  background: var(--panda-paper);
  border-radius: var(--panda-radius);
  box-shadow: var(--panda-shadow-strong);
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Заголовки попапа */
.popup-desktop-header {
  display: none !important;
}

.popup-mobile-header {
  display: none !important;
}

/* ПК версия попапа */
.popup-desktop-layout {
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
}

.popup-close-desktop {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--panda-muted);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white
}

.popup-close-desktop:hover {
  background: white;
  color: var(--panda-text);
  transform: scale(1.1);
}

.popup-desktop-main {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
  margin-bottom: 80px;
}

.popup-mobile-header {
  display: none;
}

.popup-mobile-layout {
  display: none;
}

.popup-product-image-container {
  flex-shrink: 0;
  width: 350px;
}

.popup-product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  background: #f0f0f0;
  border-radius: 15px;
  display: block;
}

.popup-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.popup-product-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-product-title-desktop {
  font-size: 28px;
  font-weight: 600;
  color: var(--panda-text);
  margin: 0;
  line-height: 1.3;
}

.popup-product-weight-desktop {
  font-size: 16px;
  font-weight: 500;
  color: var(--panda-muted);
}

.popup-product-description-desktop {
  color: var(--panda-text);
  line-height: 1.6;
  font-size: 16px;
  flex: 1;
}

.popup-product-actions-desktop {
  position: absolute;
  bottom: 24px;
  left: 6%;
  right: 6%;
  display: flex;
  gap: 16px;
  margin: 0 -24px -24px -24px;
  border-radius: 0 0 var(--panda-radius) var(--panda-radius);
}

.popup-product-actions-desktop .cart-item-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
}

.popup-product-actions-desktop .cart-submit {
  flex: 1;
  height: 48px;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: var(--panda-accent);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.popup-product-actions-desktop .cart-submit:hover {
  background: var(--panda-cta-hover);
}

/* Размер кнопок +/- как в корзине */
.popup-product-actions-desktop .cart-qty-btn {
  width: 48px;
  height: 48px;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--panda-paper);
  color: var(--panda-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.popup-product-actions-desktop .cart-qty-btn:hover {
  border-color: var(--panda-accent);
  color: var(--panda-accent);
  background: rgba(108, 146, 70, 0.05);
}

.popup-product-actions-desktop .cart-qty {
  min-width: 50px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  margin: 0 4px;
  text-align: center;
  line-height: 1;
}

/* Мобильные стили для попапа товара */
@media (max-width: 768px) {
  .product-popup {
    padding: 0 !important;
    /* Дополнительная защита от проблем с viewport на iOS */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .product-popup .cart-content {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Динамическая высота viewport для Safari */
    height: calc(var(--vh, 1vh) * 100) !important; /* Фаллбэк для iOS Safari */
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  /* Показываем мобильную версию, скрываем десктопную */
  .popup-desktop-layout {
    display: none !important;
  }
  
  .popup-desktop-header {
    display: none !important;
  }
  
  .popup-mobile-header {
    display: flex !important;
  }
  
  .popup-mobile-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
    min-height: 0 !important;
  }
  
  .popup-mobile-header {
    display: flex !important;
    padding: 10px 20px !important;
    border-bottom: 1px solid #eee !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 50px !important;
  }
  
  .popup-mobile-header .popup-mobile-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--panda-text) !important;
    margin: 0 !important;
  }
  
  .popup-mobile-header .cart-close {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    color: var(--panda-muted) !important;
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
  }
  
  .popup-mobile-header .cart-close:hover {
    background: var(--panda-bg-alt) !important;
    color: var(--panda-text) !important;
  }
  
  .popup-mobile-spacer {
    flex: 1;
  }
  
  .product-popup .cart-body {
    flex: 1 !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  
  .popup-mobile-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
    min-height: 0 !important;
  }
  
  .popup-mobile-scrollable-content {
    flex: 1 !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    /* Дополнительные стили для iOS Safari */
    overscroll-behavior: contain !important;
    transform: translate3d(0, 0, 0) !important; /* Принуждаем аппаратное ускорение */
  }
  
  .popup-product-image-container-mobile {
    width: 100%;
    flex-shrink: 0;
  }
  
  .popup-product-image-mobile {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
    background: #f0f0f0;
    border-radius: 0;
    display: block;
  }
  
  .popup-product-content-mobile {
    padding: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: auto;
  }
  
  .popup-product-header-mobile {
    margin-bottom: 16px;
  }
  
  .popup-product-title-mobile {
    font-size: 24px;
    font-weight: 600;
    color: var(--panda-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
  }
  
  .popup-product-weight-mobile {
    font-size: 16px;
    font-weight: 500;
    color: var(--panda-muted);
    margin: 0;
  }
  
  .popup-product-description-mobile {
    color: var(--panda-text);
    line-height: 1.5;
    font-size: 15px;
    flex: 1;
    padding-bottom: 20px;
    min-height: auto;
  }
  
  .popup-product-actions-mobile {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px !important;
    border-top: 1px solid #eee !important;
    background: var(--panda-paper) !important;
    margin: 0 !important;
    position: relative !important;
  }
  
  .popup-mobile-controls {
    justify-content: center !important;
    order: 1 !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  
  .popup-product-actions-mobile .cart-submit {
    order: 2 !important;
    width: calc(100% - 40px) !important;
    margin: 0 20px !important;
    min-height: 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    padding: 16px !important;
    background: var(--panda-accent) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }
  
  .popup-product-actions-mobile .cart-submit:hover {
    background: var(--panda-cta-hover) !important;
  }
  
  /* Размеры кнопок на мобильных */
  .popup-product-actions-mobile .cart-qty-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: var(--panda-paper) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--panda-text) !important;
    cursor: pointer !important;
  }
  
  .popup-product-actions-mobile .cart-qty {
    min-width: 50px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: transparent !important;
    margin: 0 8px !important;
    text-align: center !important;
  }
  
  .popup-product-actions-mobile .cart-submit {
    width: 100% !important;
    max-width: 300px !important;
    height: 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--panda-accent);
    margin-bottom: 50px !important;
  }
  
  .popup-product-actions-mobile .cart-submit:hover {
    background: var(--panda-primary-dark) !important;
    transform: translateY(-1px) !important;
  }
  
  .popup-product-actions-mobile .cart-submit:active {
    transform: translateY(0) !important;
  }

}

/* ===== COMBO POPUP СТИЛИ ===== */
.combo-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  font-family: var(--panda-font) !important;
}

.combo-popup.active {
  opacity: 1;
  visibility: visible;
}

.combo-popup-content {
  background: var(--panda-paper);
  border-radius: var(--panda-radius);
  box-shadow: var(--panda-shadow-strong);
  max-width: 700px;
  max-height: 90vh;
  width: 100%;
  position: relative;
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.combo-popup.active .combo-popup-content {
  transform: scale(1) translateY(0);
}

.combo-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0;
  flex-shrink: 0;
}

.combo-popup-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--panda-text);
  margin: 0;
}

.combo-popup-close {
  width: 32px;
  height: 40px;
  border: none;
  background: var(--panda-bg);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--panda-text);
  transition: all 0.2s ease;
}

.combo-popup-close:hover {
  background: var(--panda-bg-alt);
  transform: scale(1.05);
}

.combo-popup-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.combo-description {
  color: var(--panda-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.combo-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--panda-accent);
  margin-bottom: 24px;
}

.combo-additional-price {
  font-size: 18px;
  color: var(--panda-muted);
  font-weight: 600;
}

.combo-selections {
  margin-bottom: 24px;
}

.combo-change-btn {
  padding: 6px 12px;
  border: 1px solid var(--panda-accent);
  border-radius: var(--panda-radius-sm);
  background: transparent;
  color: var(--panda-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.combo-change-btn:hover {
  background: var(--panda-accent);
  color: white;
}

.combo-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0;
}

.combo-btn {
  flex: 1;
  padding: 16px 24px;
  border-radius: var(--panda-radius-sm);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.combo-btn-primary {
  background: var(--panda-cta);
  color: var(--panda-cta-text);
}

.combo-btn-primary:hover:not(:disabled) {
  background: var(--panda-cta-hover);
  transform: translateY(-2px);
  box-shadow: var(--panda-shadow);
}

.combo-btn-primary:disabled {
  background: var(--panda-muted);
  cursor: not-allowed;
}

.combo-btn-primary.disabled {
  background: var(--panda-muted) !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.combo-btn-secondary {
  background: var(--panda-bg);
  color: var(--panda-text);
  border: 1px solid var(--panda-muted);
}

.combo-btn-secondary:hover {
  background: var(--panda-bg-alt);
  transform: translateY(-1px);
}

/* Селектор блюд */
.combo-selector {
  margin-bottom: 16px;
  border: 1px solid var(--panda-bg);
  border-radius: var(--panda-radius-sm);
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
}

.combo-selector.expanded {
  border-color: var(--panda-accent);
  box-shadow: var(--panda-shadow);
}

.combo-selector-header {
  padding: 16px;
  border-bottom: 1px solid var(--panda-bg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.combo-selector-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--panda-text);
}

.combo-selector-header .required {
  color: #e74c3c;
  font-weight: 700;
}

.combo-selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--panda-green-100);
  border-bottom: 1px solid var(--panda-bg);
}

.combo-selected-name {
  font-weight: 600;
  color: var(--panda-text);
}

.combo-change-btn {
  padding: 6px 12px;
  border: 1px solid var(--panda-accent);
  border-radius: var(--panda-radius-sm);
  background: transparent;
  color: var(--panda-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.combo-change-btn:hover {
  background: var(--panda-accent);
  color: white;
}

.combo-select-btn {
  width: 100%;
  padding: 16px;
  border: none;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  text-align: left;
  transition: background 0.2s ease;
  color: var(--panda-text);
}

.combo-select-btn:hover {
  background: var(--panda-bg);
}

.combo-select-btn .required {
  color: #e74c3c;
  font-weight: 700;
  margin-left: 4px;
}

.combo-select-text {
  color: var(--panda-text);
  font-weight: 500;
}

.combo-select-icon {
  color: var(--panda-muted);
  transition: transform 0.3s ease;
}

.combo-selector.expanded .combo-select-icon {
  transform: rotate(180deg);
}

.combo-selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--panda-green-100);
  border-bottom: 1px solid var(--panda-bg);
}

.combo-selected-name {
  font-weight: 600;
  color: var(--panda-text);
}

.combo-change-btn {
  padding: 6px 12px;
  border: 1px solid var(--panda-accent);
  border-radius: var(--panda-radius-sm);
  background: transparent;
  color: var(--panda-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.combo-change-btn:hover {
  background: var(--panda-accent);
  color: white;
}

/* Выпадающий список блюд */
.combo-dish-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.combo-dish-dropdown.expanded {
  max-height: 300px;
  overflow-y: auto;
}

.combo-dish-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.combo-dish-item {
  border-bottom: 1px solid var(--panda-bg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  position: relative;
}

.combo-dish-item:last-child {
  border-bottom: none;
}

.combo-dish-item:hover {
  background: var(--panda-green-100);
}

.combo-dish-item.selected {
  background: var(--panda-green-100);
  border-left: 4px solid var(--panda-accent);
}

.combo-dish-item.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  color: var(--panda-accent);
  font-weight: 700;
}

.combo-dish-item img {
  display: none; /* Скрываем картинки */
}

.combo-dish-item-name {
  font-weight: 600;
  color: var(--panda-text);
  flex-grow: 1;
  text-align: left;
}

.combo-dish-item-price {
  display: none; /* Скрываем цену */
}

/* Блокируем disabled кнопки через CSS */
.combo-btn.disabled {
  pointer-events: none !important;
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* ===== CART POPUP СТИЛИ ===== */
.cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  font-family: var(--panda-font) !important;
}

.cart-popup.active {
  opacity: 1;
  visibility: visible;
}

.cart-content {
  background: var(--panda-paper);
  border-radius: var(--panda-radius);
  box-shadow: var(--panda-shadow-strong);
  max-width: 600px;
  max-height: 90vh;
  width: 100%;
  position: relative;
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-popup.active .cart-content {
  transform: scale(1) translateY(0);
}

.cart-header {
  flex-shrink: 0;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0d5c7;
  margin-bottom: 0;
  padding-bottom: 15px;
}

.cart-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--panda-text);
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--panda-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.cart-close:hover {
  background: var(--panda-bg);
  color: var(--panda-text);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 200px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--panda-muted);
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cart-items {
  margin-bottom: 24px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--panda-radius-sm);
  margin-bottom: 8px;
  background: var(--panda-bg);
  position: relative;
  transition: all 0.3s ease;
}

.cart-item.removing {
  opacity: 0.7;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
}

.cart-item.removing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
  animation: slideProgress 5s linear forwards;
  z-index: 1;
}

@keyframes slideProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

.cart-item.removing .cart-item-image,
.cart-item.removing .cart-item-name,
.cart-item.removing .cart-item-controls,
.cart-item.removing .cart-item-price {
  position: relative;
  z-index: 2;
  opacity: 0.6;
}

.cart-undo {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: #ff6b6b;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  transition: all 0.2s ease;
}

.cart-undo:hover {
  background: #ff5252;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.cart-undo::before {
  content: '↶';
  font-size: 18px;
}

.cart-item-image {
  width: 50px;
  height: 50px;
  border-radius: var(--panda-radius-sm);
  object-fit: cover;
  background: var(--panda-paper);
  flex-shrink: 0;
}

.cart-item-name {
  flex: 1;
  font-weight: 500;
  color: var(--panda-text);
  font-size: 14px;
  line-height: 1.3;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-composition {
  font-size: 12px;
  color: var(--panda-muted);
  line-height: 1.3;
  font-style: italic;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-qty-btn {
  background: var(--panda-paper);
  border: 1px solid #e0d5c7;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  color: var(--panda-text);
}

.cart-qty-btn:hover {
  background: var(--panda-accent);
  color: white;
  border-color: var(--panda-accent);
}

.cart-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-qty-btn:disabled:hover {
  background: var(--panda-paper);
  color: var(--panda-text);
  border-color: #e0d5c7;
}

.cart-qty {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: var(--panda-text);
}

.cart-item-price {
  font-weight: 600;
  color: var(--panda-accent);
  font-size: 14px;
  min-width: 80px;
  text-align: right;
}

.cart-remove {
  background: #7b1a1a;
  border: none;
  color: var(--panda-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-size: 18px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-remove:hover {
  background: #7b1a1a;
  color: white;
}

.cart-form {
  background: var(--panda-bg);
  padding: 20px;
  border-radius: var(--panda-radius-sm);
  margin-bottom: 20px;
}

.cart-form-group {
  margin-bottom: 16px;
}

.cart-form-label {
  display: block;
  font-weight: 500;
  color: var(--panda-text);
  margin-bottom: 6px;
  font-size: 14px;
}

.cart-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0d5c7;
  border-radius: var(--panda-radius-sm);
  background: var(--panda-paper);
  color: var(--panda-text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.cart-form-input:focus {
  outline: none;
  border-color: var(--panda-accent);
  box-shadow: 0 0 0 3px rgba(31, 79, 46, 0.1);
}

.cart-form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.4;
}

.cart-form-static {
  background: var(--panda-bg-alt);
  color: var(--panda-muted);
  cursor: not-allowed;
}

/* Способы оплаты */
.cart-payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.cart-payment-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid #e0d5c7;
  border-radius: var(--panda-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--panda-bg);
}

.cart-payment-option:hover {
  border-color: var(--panda-accent);
  background: rgba(31, 79, 46, 0.05);
}

.cart-payment-option input[type="radio"] {
  margin: 0 12px 0 0;
  transform: scale(1.2);
  accent-color: var(--panda-accent);
}

.cart-payment-text {
  font-weight: 500;
  color: var(--panda-text);
  flex: 1;
}

.cart-payment-status {
  font-size: 12px;
  color: var(--panda-muted);
  margin-left: 8px;
  font-style: italic;
}

/* Недоступная опция оплаты */
.cart-payment-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  background: var(--panda-bg-alt) !important;
}

.cart-payment-disabled:hover {
  border-color: #e0d5c7 !important;
  background: var(--panda-bg-alt) !important;
}

.cart-payment-disabled input[type="radio"] {
  cursor: not-allowed;
}

.cart-payment-disabled .cart-payment-text {
  color: var(--panda-muted);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #e0d5c7;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--panda-text);
}

.cart-submit {
  width: 100%;
  background: var(--panda-accent);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--panda-radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 50px;
}

.cart-submit:hover {
  background: var(--panda-cta-hover);
}

.cart-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .cart-popup {
    padding: 10px;
  }
  
  .cart-content {
    max-height: 95vh;
  }
  
  .cart-header {
    padding: 15px 15px 0;
    padding-bottom: 12px;
  }
  
  .cart-body {
    padding: 15px;
  }
  
  .cart-item {
    padding: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .cart-item-controls {
    order: 3;
  }
  
  .cart-item-price {
    order: 4;
    margin-left: auto;
  }
  
  .cart-form {
    padding: 15px;
  }
}

/* ===== НОВЫЕ СТИЛИ КОРЗИНЫ ===== */

/* Стили для товаров в корзине */
.cart-item {
  position: relative;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item.removing {
  opacity: 0.7;
  background-color: rgba(255, 68, 68, 0.05);
  border-left: 3px solid #ff4444;
}

/* Мобильная версия - количество под названием */
.cart-item-mobile-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Десктопная версия - количество справа */
.cart-item-desktop-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
  .cart-item-desktop-controls {
    display: none;
  }
  
  .cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    grid-template-areas: 
      "image details price remove"
      "image . . .";
    gap: 12px;
    align-items: start;
    padding: 12px;
  }
  
  .cart-item-image {
    grid-area: image;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
  }
  
  .cart-item-details {
    grid-area: details;
    min-width: 0;
  }
  
  .cart-item-price {
    grid-area: price;
    font-weight: 600;
    white-space: nowrap;
  }
  
  .cart-remove {
    grid-area: remove;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
  }
}

@media (min-width: 769px) {
  .cart-item-mobile-controls {
    display: none;
  }
  
  .cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
  }
  
  .cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
  }
  
  .cart-item-details {
    flex: 1;
    min-width: 0;
  }
  
  .cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  
  .cart-item-price {
    font-weight: 600;
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
  }
  
  .cart-remove {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
  }
}

/* Общие стили для кнопок количества */
.cart-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
  color: #333;
}

.cart-qty-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--panda-accent, #ff6b35);
  color: var(--panda-accent, #ff6b35);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.cart-qty-btn:active:not(:disabled) {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(255, 107, 53, 0.3);
}

.cart-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f0f0f0;
  color: #999;
}

.cart-qty {
  min-width: 45px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s ease;
  padding: 0 8px;
}

.cart-remove {
  background: #ff4444;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.cart-remove:hover {
  background: #ff3333;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.cart-remove:active {
  transform: scale(0.95);
}

/* Режим "Вернуть" для кнопки удаления */
.cart-remove.cart-undo-mode {
  background: var(--panda-accent, #ff6b35);
  color: white;
}

.cart-remove.cart-undo-mode:hover {
  background: #e55a2b;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Стили для кнопки возврата */
.cart-undo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--panda-accent, #ff6b35);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
  animation: fadeInSlide 0.3s ease-out;
}

@media (min-width: 769px) {
  .cart-undo {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-undo:hover {
  background: var(--panda-accent-dark, #e55a2b) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 3px 12px rgba(255, 107, 53, 0.4) !important;
}

/* ===== СТИЛИ ДЛЯ ЧЕКБОКСА СОГЛАСИЯ ===== */
.cart-checkbox-group {
  margin-top: 16px !important;
  transition: all 0.2s ease !important;
}

.cart-checkbox-group.error {
  background: rgba(220, 53, 69, 0.05) !important;
  border: 1px solid #dc3545 !important;
  border-radius: var(--panda-radius-sm) !important;
  padding: 12px !important;
  margin-top: 16px !important;
}

.cart-checkbox-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  position: relative !important;
}

.cart-checkbox-label input[type="checkbox"] {
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  visibility: hidden !important;
}

.cart-checkbox-custom {
  width: 20px !important;
  height: 20px !important;
  border: 1px solid #e0d5c7 !important;
  border-radius: var(--panda-radius-sm) !important;
  background: var(--panda-paper) !important;
  position: relative !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  user-select: none !important;
}

.cart-checkbox-group.error .cart-checkbox-custom {
  border-color: #dc3545 !important;
}

.cart-checkbox-label input[type="checkbox"]:checked + .cart-checkbox-custom {
  background: var(--panda-accent) !important;
  border-color: var(--panda-accent) !important;
}

.cart-checkbox-label input[type="checkbox"]:checked + .cart-checkbox-custom::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
  line-height: 1 !important;
}

.cart-checkbox-text {
  color: var(--panda-text) !important;
  font-weight: 400 !important;
  user-select: none !important;
  cursor: pointer !important;
}

.cart-checkbox-group.error .cart-checkbox-text {
  color: #dc3545 !important;
}

.cart-checkbox-error {
  color: #dc3545 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  display: none !important;
}

.cart-checkbox-group.error .cart-checkbox-error {
  display: block !important;
}

/* Стили для ошибок полей формы */
.cart-form-error {
  color: #dc3545 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  display: none !important;
}

.cart-form-group.error .cart-form-error {
  display: block !important;
}

.cart-form-group.error .cart-form-input {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.cart-form-group.error .cart-form-label {
  color: #dc3545 !important;
}

/* ===== АДАПТАЦИЯ КОРЗИНЫ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА ===== */
@media (max-width: 768px) {
  .cart-popup {
    padding: 0 !important;
  }
  
  .cart-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  .cart-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid #eee !important;
    flex-shrink: 0 !important;
  }
  
  .cart-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    scroll-behavior: auto !important;
  }
  
  .cart-items {
    margin-bottom: 20px !important;
  }
  
  .cart-form {
    flex-shrink: 0 !important;
  }
  
  .cart-form-group {
    margin-bottom: 16px !important;
  }
  
  .cart-checkbox-group {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
    scroll-margin: 20px !important;
  }
  
  /* Дополнительная защита от скролла для чекбокса на мобильном */
  .cart-checkbox-label input[type="checkbox"] {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }
  
  #cart-footer {
    flex-shrink: 0 !important;
    margin-top: 16px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
  }
}

/* ===== СТИЛИ ДЛЯ ИСТОРИИ ЗАКАЗОВ ===== */

/* Основные стили попапа истории заказов - аналогично корзине */
.history-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  font-family: var(--panda-font) !important;
}

.history-popup.active {
  opacity: 1;
  visibility: visible;
}

.history-content {
  background: var(--panda-paper);
  border-radius: var(--panda-radius);
  box-shadow: var(--panda-shadow-strong);
  max-width: 600px;
  max-height: 90vh;
  width: 100%;
  position: relative;
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-popup.active .history-content {
  transform: scale(1) translateY(0);
}

/* История заказов - попап подтверждения очистки */
.history-confirm-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

.history-confirm-popup.active {
  opacity: 1;
  visibility: visible;
}

.history-confirm-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

.history-confirm-popup.active .history-confirm-content {
  transform: scale(1) translateY(0);
}

.history-confirm-header {
  flex-shrink: 0;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0d5c7;
  margin-bottom: 0;
  padding-bottom: 15px;
  background: white;
}

.history-confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
}

.history-confirm-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: white;
}

.history-confirm-text {
  font-size: 16px;
  color: #333;
  margin: 0 0 20px 0;
  line-height: 1.5;
  font-family: 'Montserrat', sans-serif;
}

.history-confirm-footer {
  flex-shrink: 0;
  padding: 0 20px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: white;
}

.history-confirm-btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 87%;
  border: 1px solid transparent;
  font-family: 'Montserrat', sans-serif;
}

.history-confirm-cancel {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #e0d5c7;
}

.history-confirm-cancel:hover {
  background: #e9ecef;
  color: #495057;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-confirm-confirm {
  background: #1F4F2E;
  color: white;
  border-color: #1F4F2E;
}

.history-confirm-confirm:hover {
  background: #155022;
  border-color: #155022;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 79, 46, 0.3);
}

@media (max-width: 768px) {
  .history-confirm-popup {
    padding: 10px;
  }
  
  .history-confirm-content {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .history-confirm-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0d5c7;
    flex-shrink: 0;
  }
  
  .history-confirm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .history-confirm-footer {
    padding: 12px 20px 20px;
    flex-direction: column;
    flex-shrink: 0;
  }
  
  .history-confirm-btn {
    width: 87%;
  }
}

@media (max-width: 768px) {
  .history-confirm-popup {
    padding: 10px;
  }
  
  .history-confirm-content {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .history-confirm-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0d5c7;
    flex-shrink: 0;
  }
  
  .history-confirm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .history-confirm-footer {
    padding: 12px 20px 20px;
    flex-direction: column;
    flex-shrink: 0;
  }
  
  .history-confirm-btn {
    width: 100%;
  }
}

.history-header {
  flex-shrink: 0;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0d5c7;
  margin-bottom: 0;
  padding-bottom: 15px;
}

.history-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--panda-text);
  margin: 0;
}

.history-close {
  width: 32px;
  height: 42px;
  border: none;
  background: var(--panda-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
  font-size: 18px;
  line-height: 1;
}

.history-close:hover {
  background: var(--panda-text);
  transform: scale(1.1);
}

.history-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 0;
}

/* Пустая история */
.history-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--panda-muted);
}

.history-empty-icon {
  margin-bottom: 20px;
  color: var(--panda-muted);
}

.history-empty p {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--panda-text);
}

.history-empty small {
  font-size: 14px;
  color: var(--panda-muted);
}

/* Список заказов */
.history-orders {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-order-item {
  background: white;
  border: 1px solid #e0d5c7;
  border-radius: var(--panda-radius-sm);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.history-order-item:hover {
  border-color: var(--panda-accent);
  box-shadow: var(--panda-shadow);
  transform: translateY(-2px);
}

.history-order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.history-order-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--panda-accent);
  margin: 0;
}

.history-order-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--panda-cta);
  text-align: right;
}

.history-order-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
}

.history-order-date {
  font-size: 14px;
  color: var(--panda-muted);
  line-height: 1.2;
}

.history-order-time {
  font-size: 13px;
  color: var(--panda-muted);
  line-height: 1.2;
}

.history-order-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0d5c7;
  color: var(--panda-muted);
  font-size: 14px;
}

/* Детали заказа */
.history-details {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.history-details-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0d5c7;
}

.history-back {
  background: var(--panda-cta);
  color: var(--panda-cta-text);
  border: none;
  padding: 12px 20px;
  border-radius: var(--panda-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
}

.history-back:hover {
  background: var(--panda-cta-hover);
  transform: translateY(-1px);
}

.history-details-content {
  flex: 1;
  overflow-y: auto;
}

/* Секции деталей заказа */
.history-detail-section {
  margin-bottom: 24px;
  background: var(--panda-bg-alt);
  border-radius: var(--panda-radius-sm);
  padding: 20px;
}

.history-detail-section:last-child {
  margin-bottom: 0;
}

.history-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--panda-accent);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Убираем смайлы и заменяем на иконки */
.history-detail-title::before {
  content: '•';
  font-size: 18px;
  color: var(--panda-cta);
}

.history-detail-title.customer::before {
  content: '•';
}

.history-detail-title.delivery::before {
  content: '•';
}

.history-detail-title.payment::before {
  content: '•';
}

.history-detail-title.comment::before {
  content: '•';
}

.history-detail-title.order-info::before {
  content: '•';
}

/* Состав заказа в истории */
.history-composition-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-composition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0d5c7;
}

.history-composition-item:last-child {
  border-bottom: none;
}

.history-item-info {
  flex: 1;
}

.history-item-name {
  font-weight: 600;
  color: var(--panda-text);
  margin-bottom: 4px;
}

.history-item-composition {
  font-size: 13px;
  color: var(--panda-muted);
  margin-left: 16px;
}

.history-item-quantity {
  font-size: 14px;
  color: var(--panda-muted);
  margin: 0 16px;
  min-width: 60px;
  text-align: center;
}

.history-item-price {
  font-weight: 600;
  color: var(--panda-cta);
  min-width: 80px;
  text-align: right;
}

/* Кнопка очистки истории */
.history-clear-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0d5c7;
  text-align: center;
}

.history-clear-btn {
  background: #f8f9fa;
  color: #1F4F2E;
  border: 1px solid #1F4F2E;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  font-family: 'Montserrat', sans-serif;
}

.history-clear-btn:hover {
  background: #1F4F2E;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 79, 46, 0.2);
}

.history-clear-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(31, 79, 46, 0.2);
}

/* Информационные поля истории */
.history-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
}

.history-info-label {
  font-weight: 600;
  color: var(--panda-muted);
}

.history-info-value {
  color: var(--panda-text);
}

.history-total {
  background: var(--panda-accent);
  color: white;
  padding: 16px 20px;
  border-radius: var(--panda-radius-sm);
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 25px;
}

/* Мобильные стили истории */
@media (max-width: 980px) {
  .history-popup {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .history-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .history-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0d5c7;
    flex-shrink: 0;
  }
  
  .history-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .history-order-item {
    padding: 16px;
  }

  .history-order-header {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .history-order-meta {
    align-items: flex-start;
    text-align: left;
  }

  .history-order-number {
    font-size: 16px;
  }

  .history-order-price {
    font-size: 18px;
    text-align: left;
  }

  .history-detail-section {
    padding: 16px;
    margin-bottom: 20px;
  }

  .history-composition-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0;
  }

  .history-item-quantity {
    margin: 0;
    text-align: left;
  }

  .history-item-price {
    text-align: left;
    min-width: auto;
  }

  .history-info-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .history-info-label {
    font-size: 13px;
  }

  .history-total {
    font-size: 16px;
    padding: 14px 16px;
  }
}

/* Анимации загрузки истории */
.history-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--panda-muted);
}

.history-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--panda-bg-alt);
  border-top: 3px solid var(--panda-accent);
  border-radius: 50%;
  animation: historySpinner 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes historySpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== СТИЛИ ПОПАПА ПОДТВЕРЖДЕНИЯ ЗАКАЗА ===== */

.order-confirmation-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.order-confirmation-popup.active {
  opacity: 1;
  visibility: visible;
}

.order-confirmation-content {
  background: var(--panda-bg, #F4EDE2);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.8) translateY(30px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Скрываем скроллбар, сохраняя возможность прокрутки */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Скрываем скроллбар в WebKit браузерах */
.order-confirmation-content::-webkit-scrollbar {
  display: none;
}

.order-confirmation-popup.active .order-confirmation-content {
  transform: scale(1) translateY(0);
}

.order-confirmation-header {
  text-align: center;
  padding: 40px 32px 24px;
  position: relative;
  border-bottom: 2px solid rgba(31, 79, 46, 0.1);
}

.order-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--panda-cta, #1F4F2E);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.order-number-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--panda-muted, #8e7f75);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.order-confirmation-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--panda-muted, #8e7f75);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.order-confirmation-close:hover {
  background: rgba(31, 79, 46, 0.1);
  color: var(--panda-cta, #1F4F2E);
  transform: scale(1.1);
}

.order-instructions {
  padding: 24px 32px;
  text-align: center;
  border-bottom: 2px solid rgba(31, 79, 46, 0.1);
}

.order-instructions p {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--panda-text, #2f211a);
  margin: 0;
  font-weight: 400;
}

.order-items-section {
  padding: 24px 32px;
  border-bottom: 2px solid rgba(31, 79, 46, 0.1);
}

.order-items-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--panda-text, #2f211a);
  margin: 0 0 16px 0;
}

.order-confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 79, 46, 0.1);
}

.order-confirmation-item:last-child {
  border-bottom: none;
}

.order-item-info {
  flex: 1;
  margin-right: 16px;
}

.order-item-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--panda-text, #2f211a);
  margin-bottom: 4px;
}

.order-item-composition {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: var(--panda-muted, #8e7f75);
  line-height: 1.4;
}

.order-item-qty-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.order-item-qty {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--panda-muted, #8e7f75);
}

.order-item-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--panda-cta, #1F4F2E);
}

.order-total-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--panda-cta, #1F4F2E);
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-total span:first-child {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--panda-text, #2f211a);
}

.order-total span:last-child {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--panda-cta, #1F4F2E);
}

.order-details-section {
  padding: 24px 32px;
}

.order-details-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--panda-text, #2f211a);
  margin: 0 0 16px 0;
}

.order-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--panda-muted, #8e7f75);
}

.detail-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--panda-text, #2f211a);
  text-align: right;
}

/* Адаптивность для попапа подтверждения заказа */
@media (max-width: 480px) {
  .order-confirmation-popup {
    padding: 16px;
  }
  
  .order-confirmation-content {
    border-radius: 20px;
    max-height: 98vh;
  }
  
  .order-confirmation-header {
    padding: 32px 24px 20px;
  }
  
  .order-number {
    font-size: 40px;
  }
  
  .order-instructions,
  .order-items-section,
  .order-details-section {
    padding: 20px 24px;
  }
  
  .order-item-qty-price {
    flex-direction: row;
    gap: 8px;
  }
  
  .order-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-value {
    text-align: left;
  }
}
