/* AKNO kiosk — адаптация макетов из Designs/Screens.txt.
   Целевой дисплей: портрет 1080×1920. */

html {
  font-size: 100%;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

/* Оболочка заказа — вписываемся в 1080×1920 */
.order-layout.kiosk-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--kiosk-w);
  height: 100vh;
  height: 100dvh;
  max-height: var(--kiosk-h);
  margin: 0 auto;
  min-height: 0;
}

.order-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--text-primary);
  padding: var(--space-screen) 24px;
  font-size: var(--size-header);
  line-height: var(--line-header);
  font-weight: var(--font-heading-screen);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(163, 112, 94, 0.08);
}

.order-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 16px;
  max-width: var(--kiosk-w);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.order-main--standby-full {
  padding: 0;
}

/* /menu: без order-header, контент на всю ширину стейджа */
.order-main--menu {
  padding: var(--menu-stage-vpad-y) 0;
  box-sizing: border-box;
  /* Совпадает с .catalog-page: иначе поля padding просвечивают body (--bg) серым сверху/снизу. */
  background: #ffffff;
}

/* Prod KSO: «Экран корзины» / оплата (node 1089:2376) — без шапки Etlon, контент edge-to-edge */
.order-layout.kiosk-stage:has(.kiosk-terminal-page) .order-header {
  display: none;
}

.order-layout.kiosk-stage:has(.kiosk-terminal-page) .order-main {
  padding: 0;
  overflow: hidden;
}

.order-layout.kiosk-stage:has(.confirmation-page.kiosk-terminal-page) .order-main {
  padding: 0;
  overflow: hidden;
}

.order-layout.kiosk-stage:has(.kiosk-bonus-flow) .order-header {
  display: none;
}

.order-layout.kiosk-stage:has(.kiosk-bonus-flow) .order-main {
  padding: 0;
  overflow: hidden;
}

/* Не задавать position дочерним элементам — иначе ломается position:fixed у модалок */

/* Меню: левая колонка каталог — Figma Etlon Design Ecosystem, frame Cells (node 1032-2789). */
.catalog-page {
  --menu-accent: var(--etlon-fill-primary);
  --menu-gray: var(--etlon-border-default);
  --menu-text: var(--etlon-text-primary);
  /* Неактивные пункты сайдбара — Text/Secondary в UIKIT (#666) */
  --menu-category-idle: var(--etlon-text-secondary);
  --menu-text-tab: var(--etlon-text-secondary);
  /* Корзина в колонке 240px (Figma group 76); глобальной нижней полосы нет */
  /* Высота ряда — под внешние поля стейджа (--menu-stage-vpad-y); без доп. нижнего «воздуха» строки */
  --menu-content-pad-bottom: 0px;

  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.checkout-page,
.payment-page,
.confirmation-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.menu-content-row {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--kiosk-w);
  margin: 0 auto;
  padding: 0 calc((var(--kiosk-w) - var(--kiosk-category-col) - var(--kiosk-menu-gap) - var(--kiosk-products-col)) / 2) 0;
  padding-bottom: var(--menu-content-pad-bottom);
  box-sizing: border-box;
}

.category-list {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--kiosk-w);
  gap: var(--kiosk-menu-gap);
  align-items: stretch;
}

.category-list > p {
  padding: var(--space-screen);
}

/* Категории слева — 240px; тень отделяет колонку от каталога; низ в колонке скруглён вместе с корзиной */
.categories-panel {
  width: var(--kiosk-category-col);
  min-width: var(--kiosk-category-col);
  max-width: var(--kiosk-category-col);
  flex: 0 0 var(--kiosk-category-col);
  align-self: stretch;
  max-height: 100%;
  min-height: 0;
  background: #ffffff;
  border: none;
  border-radius: 60px;
  box-shadow: var(--etlon-shadow-sidebar);
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 10px 10px 0;
  gap: 10px; /* между Frame 36 / 28 / 31 … в JSON шаг 10px */
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.categories-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px 8px;
  box-sizing: border-box;
}

/* Намёк «ниже ещё категории» — только при overflow (логика в sidebar-category-scroll-hint.js) */
.categories-panel__scroll-hint {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  background: #ffffff;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
}

.categories-panel__scroll-hint img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* 30px между категориями, линия 160px #E8E8E8 по центру */
.categories-panel__divider {
  flex-shrink: 0;
  width: 100%;
  max-width: 220px;
  height: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
}

.categories-panel__divider::after {
  content: "";
  display: block;
  width: 160px;
  height: 0;
  border: none;
  border-top: 3px solid #e8e8e8;
}

.categories-sidebar__brand {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 2px;
}

/* Rectangle 14: 220×220, stroke 3 #E8E8E8, radius 50 */
.categories-sidebar__logo-box {
  width: 220px;
  max-width: 100%;
  height: 220px;
  box-sizing: border-box;
  border: 3px solid var(--menu-gray);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.categories-sidebar__logo-img {
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Categories panel items: visuals owned by EtlonCategoryTab. */

/* Правая колонка: 760px; без тени/блюра (перебиваем app.css) */
.products-panel {
  flex: 0 0 var(--kiosk-products-col);
  width: var(--kiosk-products-col);
  min-width: var(--kiosk-products-col);
  max-width: var(--kiosk-products-col);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

/* Временно: дублирующая панель категорий-табов сверху не показываем */
.catalog-page .products-panel__chrome {
  display: none;
}

/* Белая шапка 760×144 в макете — скругление снизу как в предыдущем экспорте CSS */
.products-panel__chrome {
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 0 0 60px 60px;
  padding: 40px 20px 32px;
  box-sizing: border-box;
}

.products-panel__tab-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px; /* 563 − 320 − 233 */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.products-panel__tab-bar::-webkit-scrollbar {
  display: none;
}

/* Frame 42/43: height 64, stroke 3 #E8E8E8, radius 50; текст #535051 24px */
.products-panel__tab {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 20px 24px;
  box-sizing: border-box;
  border: 3px solid var(--menu-gray);
  border-radius: 50px;
  background: transparent;
  color: var(--menu-text-tab);
  font-size: var(--etlon-type-paragraph-size);
  line-height: var(--etlon-type-paragraph-size);
  font-weight: 400;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.products-panel__tab:hover {
  border-color: #dedede;
}

.products-panel__tab--active:hover {
  border-color: var(--menu-accent);
  background: var(--menu-accent);
  color: #ffffff;
}

/* Frame 41: как активная категория слева (.category-item.active) — та же сила заливки */
.products-panel__tab--active {
  background: var(--menu-accent);
  color: #ffffff;
  border-color: var(--menu-accent);
  border-radius: 40px;
  font-weight: 400;
  box-shadow: inset 0 -10px 20px rgba(255, 255, 255, 0.5);
}

.products-panel__tab:focus-visible {
  outline: 3px solid rgba(233, 99, 33, 0.35);
  outline-offset: 2px;
}

.products-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 24px;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Полоса тегов КСО (Menu.txt: Tags container / pill) */
.products-panel__tag-strip {
  flex-shrink: 0;
  background: #ffffff;
  padding: 40px 20px 8px;
  box-sizing: border-box;
}

.products-panel__tag-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.products-panel__tag-row::-webkit-scrollbar {
  display: none;
}

/* Tag chips: visuals owned by EtlonTagChip. */

.products-panel__subsection-heading {
  margin: 24px 0 16px;
  padding: 0 20px;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.15;
  font-weight: 500;
  color: var(--menu-text);
  letter-spacing: 0;
}

.products-panel__subsection-heading:first-of-type {
  margin-top: 16px;
}

.products-panel__body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Heading 2/Medium 48px #424242 leading 100%, letterSpacing 0 (KSO Prod 1087:801);
   зазор до первой карточки 40 (Figma 148 − 108). */
.products-panel__heading {
  margin: 0 0 40px;
  padding: 0 20px;
  font-size: var(--etlon-type-heading2-size);
  line-height: 1;
  font-weight: 500;
  color: var(--menu-text);
  letter-spacing: 0;
}

.products-panel__heading--with-promo {
  margin-bottom: 0;
}

.products-panel__subsection-heading--with-promo {
  margin-bottom: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 350px));
  column-gap: 20px; /* 690 − 320 − 350 */
  row-gap: 20px;    /* 668 − 148 − 500 */
  margin-left: 20px;
  margin-right: 20px;
  padding: 4px 0 12px;
  justify-content: start;
  box-sizing: border-box;
}

/* Product cards: visuals owned by EtlonProductCard (see
   SelfService.App.Shared/Components/Etlon/Organisms/EtlonProductCard). */

/* Корзина: блок с бордером 60px, по ширине колонки 240 */
.menu-sidebar-cart {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.menu-sidebar-cart__bordered {
  width: calc(100% + 20px);
  max-width: none;
  box-sizing: border-box;
  margin: 0 -10px 0;
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  background: #ffffff;
  border: 3px solid #e8e8e8;
  border-radius: 60px;
  overflow: visible;
}

.menu-sidebar-cart--empty .menu-sidebar-cart__frame {
  min-height: 120px;
}

/* Полоса шеврона перенесена в .categories-panel__scroll-hint (подсказка скролла категорий) */

.menu-sidebar-cart__frame {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 200px;
  margin: 0;
  padding: 18px 4px 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.menu-sidebar-cart__deck-wrap {
  position: relative;
  width: 100%;
  max-width: 156px;
  margin: 0 auto;
  min-height: 0;
  flex-shrink: 0;
  overflow: visible;
}

/* Sidebar deck quantity badge: visuals owned by EtlonSidebarQuantityChip. */

.menu-sidebar-cart__deck {
  position: relative;
  width: 140px;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible;
  transform: translateZ(0);
}

/* Высоты зоны: карты 139px; сдвиг вверх 45px на слой; верх 1..3 карт = 139 + (n-1)*45 */
.menu-sidebar-cart__deck--count-0,
.menu-sidebar-cart__deck--empty {
  min-height: 100px;
}

.menu-sidebar-cart__deck--count-1 {
  min-height: 139px;
}

.menu-sidebar-cart__deck--count-2 {
  min-height: 184px;
}

.menu-sidebar-cart__deck--count-3 {
  min-height: 229px;
}

/* Все карты 140×139; колода: каждая предыдущая на 45px выше, новая лежит снизу (лицо к зрителю) */
.menu-sidebar-cart__card {
  position: absolute;
  left: 50%;
  width: 140px;
  height: 139px;
  border-radius: 40px;
  background: #E8E8E8;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  box-shadow: 0 -2px 4px 0 #00000026;
}

/* idx 0 = старая (выше), последний idx = новая (bottom:0, сверху по z) */
.menu-sidebar-cart__deck--count-1 .menu-sidebar-cart__card--pos-0 {
  bottom: 0;
  z-index: 1;
}

.menu-sidebar-cart__deck--count-2 .menu-sidebar-cart__card--pos-0 {
  bottom: 45px;
  z-index: 1;
}

.menu-sidebar-cart__deck--count-2 .menu-sidebar-cart__card--pos-1 {
  bottom: 0;
  z-index: 2;
}

.menu-sidebar-cart__deck--count-3 .menu-sidebar-cart__card--pos-0 {
  bottom: 90px;
  z-index: 1;
}

.menu-sidebar-cart__deck--count-3 .menu-sidebar-cart__card--pos-1 {
  bottom: 45px;
  z-index: 2;
}

.menu-sidebar-cart__deck--count-3 .menu-sidebar-cart__card--pos-2 {
  bottom: 0;
  z-index: 3;
}

.menu-sidebar-cart__card--placeholder {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 44px;
  height: 56px;
  border-radius: 16px;
  border: 2px dashed rgba(0, 0, 0, 0.1);
  background: linear-gradient(180deg, #f5f5f5 0%, #ebebeb 100%);
  opacity: 0.65;
  box-sizing: border-box;
}

.menu-sidebar-cart__card-qty {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(66, 66, 66, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Тамбнейл: заполняет слот 140×139 (cover), обрезка по overflow карты */
.menu-sidebar-cart__card-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
}

.menu-sidebar-cart__card-ph {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  transform: translate(-50%, -50%);
  font-size: 48px;
  line-height: 1;
  opacity: 0.45;
  margin: 0;
  pointer-events: none;
}

/* Меню / корзина в колонке — Figma Cells 1032:2789 (Sidebar / Cart button).
   Кнопка чекаута — EtlonCheckoutButton Compact; здесь только позиционирование
   внутри колонки (центр + margin-top, чтобы прижать к нижней границе блока). */
.menu-sidebar-cart__cta {
  align-self: center;
  margin: 6px 0 0;
}

/* Панели и чекаут */
.panel {
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius-screen);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.checkout-page,
.payment-page:not(.kiosk-terminal-page) {
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius-screen);
  padding: var(--space-screen);
  box-shadow: var(--shadow);
  /* Перекрываем grid из app.css: один столбец по центру, без растягивания кнопок на высоту строки */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: center;
  width: 100%;
  max-width: min(520px, 100%);
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: unset;
}

/* Prod KSO — оплата (1089:2376): заголовок, плейсхолдер терминала, нижняя панель ~313px */
.payment-page.kiosk-terminal-page {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: var(--kiosk-w);
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Wait-screen variant of the payment page — white surface that hosts
   the PaymentProgress component (title + spinner + illustration are
   owned by that component's scoped CSS now). */
.payment-page.payment-page--terminal-wait {
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-width: min(1080px, 100%);
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(28px, 5vh, 56px) clamp(20px, 4vw, 48px) clamp(20px, 4vh, 40px);
}


.flow-step__alert {
  margin: 0 0 12px;
  font-size: var(--size-body);
  line-height: var(--line-body);
}

/* Полный текст ошибки (HTTP / исключения), перенос строк */
.flow-error-full {
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  font-family: ui-monospace, Consolas, monospace;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.45;
  max-height: min(50vh, 480px);
  overflow-y: auto;
  margin: 12px 0;
  padding: 12px 14px;
  background: rgba(180, 40, 40, 0.08);
  border-radius: var(--card-radius-screen);
  border: 1px solid rgba(180, 40, 40, 0.25);
}



/* Модалка — только поверх вьюпорта (не в потоке order-main) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Карточка товара: выше панели каталога; стоп-уведомление внутри стека — ещё выше */
.modal-overlay.modal-overlay--product-detail {
  z-index: 2500;
  align-items: flex-end;
  justify-content: stretch;
  padding: 0;
  /* Согласовано с app.css: непрозрачный фон, меню не видно */
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.07) 0%, transparent 42%),
    linear-gradient(0deg, #0c0a10 0%, #1c1a22 55%, #14121a 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-content.modal-content--product-detail {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: var(--card-radius-screen) var(--card-radius-screen) 0 0;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0);
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
}

.product-detail-modal-stack .etlon-confirm-dialog.stop-notice-overlay--over-product {
  z-index: 2600;
}

/* КБЖУ поверх карточки товара (2500), стоп-диалог остаётся выше (2600). */
.product-detail-modal-stack .modal-overlay.kbju-nutrition-overlay {
  z-index: 2550;
}

.modal-content {
  border-radius: var(--card-radius-screen);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--border-subtle);
  max-width: min(920px, calc(100vw - 32px));
  width: 100%;
  max-height: min(88vh, calc(100dvh - 48px));
}

.confirmation-page {
  padding: var(--space-screen);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  /* Было 520px — крупный номер заказа (hero) не помещался, последние цифры уезжали/обрезались. */
  max-width: min(var(--kiosk-w, 1080px), 100%);
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  text-align: center;
  box-sizing: border-box;
}

/* Prod KSO — «Номер заказа» (1089:2381): полноэкранный арт без карточки */
.confirmation-page.kiosk-terminal-page {
  padding: 0;
  max-width: var(--kiosk-w);
  margin: 0;
  align-self: stretch;
  overflow: hidden;
}

/* Полноэкранные сообщения: стендбай / недоступен */
.kiosk-screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 24px 20px 32px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--sheet-radius-top) var(--sheet-radius-top) var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow);
  text-align: left;
  box-sizing: border-box;
}

.kiosk-screen--standby {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  justify-content: stretch;
  align-items: stretch;
  text-align: center;
  cursor: pointer;
  /* Фон задаёт страница стендбая (слой kiosk-standby__backdrop из Standby.razor.css). */
}

.kiosk-screen--standby.kiosk-standby {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  background-image: none;
  background-color: transparent;
}

.kiosk-screen--standby:focus-visible {
  outline: 3px solid rgba(255, 210, 160, 0.85);
  outline-offset: -3px;
}


/* Экран корзины — см. Designs/cart-screen-states-RU.txt (Frame «Экран корзины», 1080×1920) */
/* Корзина открыта: горизонтальный жест не уходит в историю браузера / overscroll «назад». */
html:has(.cart-screen-backdrop),
body:has(.cart-screen-backdrop) {
  overscroll-behavior-x: none;
}

.cart-screen-backdrop {
  --menu-accent: var(--etlon-fill-primary);
  --menu-gray: var(--etlon-border-default);
  --menu-text: var(--etlon-text-primary);
  --menu-category-idle: var(--etlon-text-secondary);
  /* Локально для поддерева; на маленьком вьюпорте см. блок @media внизу */
  --c-p-x: var(--cart-screen-pad-x);
  --c-line-r: var(--cart-line-card-r);
  --c-thumb: var(--cart-line-thumb);
  --c-thumb-r: var(--cart-line-thumb-r);
  --c-gap-row: var(--cart-item-gap-y);
  --c-pay-h: var(--cart-pay-bar-h);

  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: #ffffff;
  box-sizing: border-box;
  overscroll-behavior-x: none;
}

.cart-screen {
  width: 100%;
  max-width: var(--kiosk-w);
  height: 100%;
  max-height: var(--kiosk-h);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ffffff;
  box-sizing: border-box;
  overscroll-behavior-x: none;
}

.cart-screen__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  /* Пиксели 1080: верх/низ как в комментариях к прежнему clamp(max) */
  padding: 40px var(--c-p-x, 40px) 16px;
  box-sizing: border-box;
}

/* Toolbar back/clear capsules now owned by EtlonBackButton / EtlonClearCartButton. */

.cart-screen__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  /* Горизонтальный инсет = тулбар (--c-p-x). Верх: 60px от низа тулбара до первой строки (Figma 3162:30393). */
  padding: 44px var(--c-p-x, 40px) 40px;
  box-sizing: border-box;
}

.cart-screen__empty {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  font-size: var(--etlon-type-title1-size);
  line-height: 1.3;
  font-weight: var(--font-heading-screen);
  color: var(--etlon-text-secondary);
}

/* Свайп-удаление: красный слой + карточка поверх */
.cart-screen__swipe {
  position: relative;
  margin-bottom: var(--c-gap-row, 28px);
  overflow: hidden;
  border-radius: var(--c-line-r, 48px);
  overscroll-behavior-x: contain;
}

.cart-screen__delete-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0 40px 0 12px;
  background: var(--etlon-fill-danger, #ff5555);
  border-radius: inherit;
  pointer-events: none;
}

.cart-screen__delete-hit {
  pointer-events: none;
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 166px;
  padding: 8px 10px;
  color: #ffffff;
  font: inherit;
  font-size: var(--etlon-type-paragraph-size, 24px);
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
  line-height: 1.15;
}

.cart-screen__delete-ico {
  width: 48px;
  height: 48px;
  opacity: 1;
  filter: brightness(0) invert(1);
}

.cart-screen__delete-label {
  max-width: 7em;
}

.cart-screen__line-pan {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  background: #ffffff;
  border-radius: inherit;
  will-change: transform;
  touch-action: pan-y;
}

.cart-screen__swipe--peek .cart-screen__line-pan[data-cart-line-pan] {
  animation: cart-swipe-peek 1.35s cubic-bezier(0.33, 1, 0.68, 1) both;
}

@keyframes cart-swipe-peek {
  0% {
    transform: translateX(0);
  }
  28% {
    transform: translateX(-120px);
  }
  65% {
    transform: translateX(-72px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Cart product card visuals owned by EtlonCartLine (Organisms/EtlonCartLine). */

.cart-screen__notes {
  margin: 20px 0 16px;
}

.cart-screen__note {
  font-size: 14px;
  line-height: 1.35;
  color: rgba(83, 80, 81, 0.92);
  margin: 4px 0;
}

.cart-screen__note--combo {
  font-style: italic;
}

/* Prod KSO Cart cross-sell section 1032:2679: штриховой Vector10 (#e8e8e8) сверху и снизу секции.
 * Заголовок «К этому отлично подойдет» лежит между верхней штриховкой и рядом карточек. */
.cart-screen__divider {
  margin: 40px 0 60px;
  height: 3px;
  border: none;
  background: repeating-linear-gradient(
    to right,
    #e8e8e8 0 40px,
    transparent 40px 50px
  );
}

.cart-screen__divider--after-upsells {
  margin-top: 60px;
  margin-bottom: 24px;
}

.cart-screen__upsell-heading {
  margin: 0 0 60px;
  font-size: var(--etlon-type-heading2-size);
  line-height: 1;
  font-weight: 500;
  color: var(--etlon-text-primary);
}

/* Prod KSO Cart cross-sell section: ряд 3 карточек по 320×454 с шагом 20 (3*320+2*20=1000). */
.cart-screen__upsell-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

/* Upsell tile visuals owned by EtlonUpsellTile (Organisms/EtlonUpsellTile). */

/* Prod KSO: нижняя белая шапка + одна кнопка Checkout на 1000px (узел Корзина) */
.cart-screen__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Figma 3162:30398 — footer 178px, CTA bottom 40px, height 98px → top pad 40px. */
  padding: 40px var(--c-p-x, 40px) calc(40px + env(safe-area-inset-bottom));
  background: #ffffff;
  box-sizing: border-box;
  border-top: none;
  border-radius: 80px 80px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.06);
}

.cart-screen__footer-inner {
  width: 100%;
  max-width: 1000px;
}

/* Pay CTA visuals owned by EtlonCheckoutButton Wide
   (Atoms/EtlonCheckoutButton). Cart-screen only owns the footer wrap. */
.cart-screen__pay-cta {
  width: 100%;
  min-height: var(--c-pay-h, 98px);
}

.cart-screen__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 719px), (max-height: 719px) {
  .cart-screen-backdrop {
    --c-p-x: min(28px, 6vw);
    --c-line-r: 34px;
    --c-thumb: 104px;
    --c-thumb-r: 24px;
    --c-gap-row: 20px;
    --c-pay-h: 58px;
  }

  .cart-screen__toolbar {
    padding-top: 28px;
  }

  .cart-screen__upsell-heading {
    font-size: clamp(26px, 6vw, 32px);
  }
}

/* Диагностика bootstrap (SelfService:Bootstrap:Trace или ?kioskTrace=1) */
.akno-bootstrap-trace {
  position: fixed;
  z-index: 99999;
  left: 8px;
  bottom: 8px;
  max-width: min(96vw, 42rem);
  max-height: min(42vh, 320px);
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  color: #b8f5c6;
  background: rgba(12, 18, 14, 0.92);
  border: 1px solid rgba(80, 200, 120, 0.45);
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  text-align: left;
  pointer-events: auto;
}

.akno-bootstrap-trace__title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(180, 240, 200, 0.85);
}

.akno-bootstrap-trace__line {
  margin: 0;
  padding: 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
