:root{--orange:#ff6a00;--ink:#171717;--muted:#707070;--soft:#f4f4f4;--line:#e7e7e7}*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;color:var(--ink)}#app{min-height:100vh;display:grid;grid-template-columns:150px 1fr;padding-bottom:92px}aside{position:sticky;top:0;height:100vh;border-right:1px solid var(--line);padding:18px 10px;overflow:auto}.category{width:100%;border:0;background:transparent;padding:13px 8px;border-radius:16px;text-align:left;cursor:pointer}.category:hover{background:#fff0e6}main{padding:18px 26px 40px}header{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:#fff;z-index:2;padding:8px 0 16px}.brand{font-size:28px}.subtitle{font-size:13px;color:var(--muted)}header button{border:0;background:var(--soft);border-radius:18px;padding:12px 18px}#hero{background:linear-gradient(135deg,#fff3ea,#f5f5f5);border-radius:30px;padding:30px;margin-bottom:26px}#hero h1{font-size:42px;margin:8px 0}.categoryBlock{margin-bottom:34px;scroll-margin-top:90px}.categoryBlock h2{font-size:30px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.card{border:1px solid var(--line);border-radius:24px;padding:14px;min-height:300px;display:flex;flex-direction:column}.card img,.ph{width:100%;aspect-ratio:1.2/1;object-fit:contain;border-radius:18px;background:#fafafa}.ph{display:grid;place-items:center;font-size:46px}.card h3{margin:12px 0 6px}.card p{margin:0;color:var(--muted);font-size:13px}.cardBottom{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:12px}.addBtn{border:0;background:var(--soft);border-radius:18px;padding:12px 14px;font-weight:800}.openBtn{border:0;background:transparent;color:var(--muted)}#cartBar{position:fixed;left:150px;right:0;bottom:0;height:82px;background:#fffffff2;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 230px 180px;gap:12px;align-items:center;padding:10px 24px;z-index:5}#cartThumbs{display:flex;gap:8px;overflow:auto}.thumb{width:54px;height:54px;border-radius:14px;background:#f5f5f5;object-fit:cover;border:1px solid var(--line)}#quickCheckout,#cartTotal{height:56px;border:0;border-radius:22px;font-weight:800;font-size:17px}#cartTotal{background:var(--orange);color:#fff}dialog{width:min(900px,90vw);border:0;border-radius:28px;padding:24px}.close{float:right;border:0;background:#f1f1f1;border-radius:50%;width:42px;height:42px;font-size:28px}.dialogGrid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.dialogGrid img{width:100%;max-height:420px;object-fit:contain}.sizeRow{display:flex;gap:8px;flex-wrap:wrap}.pill{border:1px solid var(--line);background:white;padding:10px 14px;border-radius:18px}.pill.active{border-color:var(--orange);background:#fff3ea}.halfPicker{display:grid;grid-template-columns:1fr 1fr;gap:14px}.halfColumn{height:360px;overflow:auto;border:1px solid var(--line);border-radius:20px;padding:8px}.halfOption{padding:12px;border-radius:14px;margin:4px 0}.halfOption.selected{background:#fff0e6;color:#c94f00;font-weight:800}.dialogAdd{width:100%;margin-top:18px;border:0;background:var(--orange);color:#fff;font-size:20px;font-weight:800;padding:17px;border-radius:20px}
/* Левая навигация каталога */

#categories {
  height: 100dvh;
  padding: 10px 8px calc(18px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
  overscroll-behavior-y: contain;
}

#categories::-webkit-scrollbar {
  display: none;
}

#categories .category {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  margin-bottom: 6px;
  padding: 10px 6px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  text-align: center;
  font-family: inherit;
}

#categories .categoryWithImage {
  min-height: 100px;
}

#categories .category:hover {
  background: #faf8f5;
}

#categories .category.isActive {
  background: transparent;
}

#categories .category.isActive::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 28px;
  border-radius: 0 3px 3px 0;
  background: #ff6900;
  transform: translateY(-50%);
}

#categories .category.isActive .categoryImageWrap {
  background: #ffeddf;
}

#categories .category:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

#categories .categorySearch {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 0 6px 0 #fff;
}

.categorySearchIcon {
  font-size: 26px;
  line-height: 1;
}

.categoryImageWrap {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f7f5f2;
  overflow: hidden;
  isolation: isolate;
}

.categoryImageWrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Белый фон исходного фото сливается с подложкой, URL не меняется. */
  mix-blend-mode: multiply;
}

.categoryImageWrap.isEmpty {
  background: #f7f5f2;
}

.categoryImageWrap.isEmpty::before {
  content: '';
  width: 32px;
  height: 32px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20stroke%3D%22%239c8877%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208a20%2020%200%200%201%2020%200L16%2027Z%22%20fill%3D%22%23fffaf5%22%2F%3E%3Cpath%20d%3D%22M8%2012a16%2016%200%200%201%2016%200%22%2F%3E%3Cg%20fill%3D%22%23d39a6b%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%2213%22%20cy%3D%2216%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2215%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2221%22%20r%3D%221.3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

.categoryLabel {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-height: 2.4em;
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  overflow: hidden;
}

/* Основной поиск остаётся закреплённым в левой навигации. */
.mainHeader #searchBtn {
  display: none;
}

/* Нижняя панель каталога всегда остаётся самостоятельным интерактивным слоем. */
#cartBar {
  z-index: 200;
  isolation: isolate;
}

#cartTotal {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

/* Карточки модификаторов */

.modifierGroup .sizeRow {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.modCard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px;
  min-height: 155px;
  background: #fff;
  border: 2px solid #e7e7e7;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}

.modCard:hover {
  transform: translateY(-2px);
}

.modCard.active {
  border-color: #ff6900;
}

.modCard img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  display: block;
  margin-bottom: 6px;
}

.modCardName {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
}

.modCardPrice {
  margin-top: 4px;
  font-size: 13px;
  color: #666;
}

.modCard.active::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff6900;
  color: white;
  font-weight: 800;
}
/* =========================================
   KSO 0.2 — полноэкранная карточка продукта
   ========================================= */

#productDialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: #f4f1ec;
}

#productDialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

#productDialog .close {
  position: fixed;
  top: 22px;
  left: 22px;

  z-index: 50;

  width: 54px;
  height: 54px;

  border: 0;
  border-radius: 50%;

  background: #171717;
  color: #fff;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;
}

#dialogContent {
  width: 100%;
  min-height: 100vh;

  padding: 42px 34px 130px;

  overflow-y: auto;
}

#dialogContent .dialogGrid {
  display: block;
  max-width: 760px;
  margin: 0 auto;
}

/* Большой hero-продукт */

#dialogContent .dialogGrid > div:first-child {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 8px;
}

#dialogContent .dialogGrid > div:first-child img {
  width: min(78vw, 560px);
  height: auto;
  max-height: 42vh;

  object-fit: contain;

  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .12));
}

/* Заголовок */

#dialogContent h2 {
  margin: 6px 0 8px;

  font-size: clamp(32px, 4.5vw, 54px);
  line-height: .98;

  text-align: center;
  font-weight: 900;
}

#dialogContent > .dialogGrid > div:last-child > p {
  max-width: 620px;
  margin: 0 auto 18px;

  text-align: center;

  font-size: 18px;
  line-height: 1.35;

  color: #5f5f5f;
}

/* Размер */

#dialogContent .sizeRow {
  justify-content: center;
}

#dialogContent [data-size] {
  min-width: 140px;

  padding: 12px 18px;

  border-radius: 999px;

  font-size: 16px;
  font-weight: 700;
}

/* Заголовки групп */

.modifierGroup {
  margin-top: 26px;
}

.modifierGroup h3 {
  margin: 0 0 14px;

  font-size: 26px;
  font-weight: 900;
}

/* Карточки ингредиентов */

.modifierGroup .sizeRow {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 12px;
}

.modCard {
  min-height: 165px;

  padding: 10px;

  background: rgba(255, 255, 255, .72);

  border: 2px solid transparent;
  border-radius: 22px;

  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 8px 24px rgba(0,0,0,.04);

  transition:
    transform .12s ease,
    border-color .12s ease,
    background .12s ease;
}

.modCard:active {
  transform: scale(.98);
}

.modCard.active {
  border-color: #ff6900;
  background: #fff;
}

.modCard img {
  height: 92px;

  object-fit: contain;

  margin-bottom: 6px;
}

.modCardName {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;

  text-align: center;
}

.modCardPrice {
  margin-top: 5px;

  font-size: 14px;

  text-align: center;
  color: #6c6c6c;
}

.modCard.active::after {
  top: 8px;
  right: 8px;

  width: 28px;
  height: 28px;

  font-size: 16px;
}

/* Фиксированная нижняя CTA */

#dialogAdd,
#halfAdd {
  position: fixed;

  left: 50%;
  bottom: 24px;

  transform: translateX(-50%);

  width: min(680px, calc(100vw - 48px));
  height: 72px;

  border: 0;
  border-radius: 24px;

  background: #ff6900;
  color: white;

  font-size: 24px;
  font-weight: 900;

  box-shadow:
    0 14px 35px rgba(255, 105, 0, .28);

  z-index: 60;
}

/* Низ экрана не должен прятаться за CTA */

.modifierGroup:last-of-type {
  padding-bottom: 100px;
}

/* Адаптация под узкий вертикальный KSO */

@media (max-width: 760px) {

  #dialogContent {
    padding:
      24px
      16px
      120px;
  }

  #productDialog .close {
    top: 14px;
    left: 14px;

    width: 48px;
    height: 48px;
  }

  #dialogContent .dialogGrid > div:first-child img {
    width: 88vw;
    max-height: 38vh;
  }

  .modifierGroup .sizeRow {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .modCard {
    min-height: 150px;
  }

  .modCard img {
    height: 78px;
  }

  .modCardName {
    font-size: 13px;
  }

  .modCardPrice {
    font-size: 13px;
  }
}
/* =====================================================
   TIGERPIZZA KSO 0.2
   Эталонный вертикальный экран 1080 × 1920 / 9:16
   ===================================================== */

#productDialog {
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.78vw);

  max-width: 1080px;
  max-height: 1920px;

  aspect-ratio: 9 / 16;

  margin: auto;

  padding: 0;
  border: 0;
  border-radius: 0;

  background: #f4f1ec;

  overflow: hidden;
}

#productDialog::backdrop {
  background: #222;
}


/* Основная прокручиваемая область */

#dialogContent {
  box-sizing: border-box;

  width: 100%;
  height: 100%;

  padding:
    3.2%
    5%
    15%;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
}


/* Основная колонка */

#dialogContent .dialogGrid {
  display: block;

  width: 100%;
  max-width: none;

  margin: 0;
}


/* Изображение продукта */

#dialogContent .dialogGrid > div:first-child {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 0 1.5%;
}

#dialogContent .dialogGrid > div:first-child img {
  width: 76%;
  height: auto;

  max-height: 34vh;

  object-fit: contain;

  background: transparent;

  filter:
    drop-shadow(
      0 16px 20px
      rgba(0, 0, 0, .10)
    );
}


/* Название */

#dialogContent h2 {
  max-width: 88%;

  margin:
    0 auto
    1.2%;

  font-size: clamp(
    26px,
    4.1vw,
    48px
  );

  line-height: 1.02;

  text-align: center;

  font-weight: 900;
}


/* Описание */

#dialogContent
.dialogGrid
> div:last-child
> p {

  max-width: 82%;

  margin:
    0 auto
    2.5%;

  font-size: clamp(
    14px,
    1.7vw,
    21px
  );

  line-height: 1.32;

  text-align: center;

  color: #666;
}


/* Размер */

#dialogContent .sizeRow {
  justify-content: center;
}

#dialogContent [data-size] {
  min-width: 0;

  padding:
    10px
    18px;

  font-size: clamp(
    13px,
    1.5vw,
    18px
  );

  border-radius: 999px;
}


/* Заголовок модификаторов */

.modifierGroup {
  width: 100%;

  margin-top: 4%;
}

.modifierGroup h3 {
  margin:
    0
    0
    2%;

  font-size: clamp(
    20px,
    2.5vw,
    30px
  );

  line-height: 1.05;

  font-weight: 900;
}


/* ВАЖНО:
   всегда 4 ингредиента в ряд
   даже при уменьшенном preview */

.modifierGroup .sizeRow {
  display: grid !important;

  grid-template-columns:
    repeat(4, minmax(0, 1fr))
    !important;

  gap: 1.5%;
}


/* Карточка ингредиента */

.modCard {
  min-width: 0;
  min-height: 0;

  aspect-ratio: .82 / 1;

  padding: 7%;

  border:
    2px solid
    rgba(0,0,0,.06);

  border-radius: 18px;

  background: #fff;

  box-shadow:
    0 5px 16px
    rgba(0,0,0,.04);
}

.modCard img {
  width: 100%;

  height: 56%;

  margin: 0 0 5%;

  object-fit: contain;
}

.modCardName {
  font-size: clamp(
    11px,
    1.35vw,
    17px
  );

  line-height: 1.08;

  text-align: center;

  font-weight: 800;
}

.modCardPrice {
  margin-top: 4%;

  font-size: clamp(
    10px,
    1.2vw,
    15px
  );

  text-align: center;

  color: #666;
}


/* Выбранный ингредиент */

.modCard.active {
  border-color: #ff6900;

  box-shadow:
    0 0 0 1px #ff6900;
}

.modCard.active::after {
  width: 26px;
  height: 26px;

  top: 7px;
  right: 7px;

  background: #ff6900;
}


/* Назад */

#productDialog .close {
  position: absolute;

  top: 1.6%;
  left: 3%;

  z-index: 100;

  width: 52px;
  height: 52px;

  border-radius: 50%;

  background: #171717;
  color: #fff;
}


/* Пока оставляем одну CTA.
   Следующим этапом заменим её на:
   НАЗАД | СОСТАВ | + ЦЕНА */

#dialogAdd,
#halfAdd {
  position: absolute;

  left: 50%;
  bottom: 2%;

  transform:
    translateX(-50%);

  width: 72%;
  height: 68px;

  z-index: 100;

  border-radius: 22px;

  font-size: clamp(
    18px,
    2.2vw,
    27px
  );
}


/* Не даём последнему ряду
   скрыться под нижней кнопкой */

.modifierGroup:last-of-type {
  padding-bottom: 18%;
}

/* KSO 0.2.2 — плотность и safe-area */

#dialogContent .dialogGrid > div:first-child img {
  width: 68%;
  max-height: 30vh;
}

#dialogContent h2 {
  max-width: 78%;

  font-size: clamp(
    24px,
    3.2vw,
    38px
  );

  line-height: 1.0;
}

#dialogContent
.dialogGrid
> div:last-child
> p {
  font-size: clamp(
    13px,
    1.45vw,
    18px
  );

  margin-bottom: 1.8%;
}

.modifierGroup {
  margin-top: 3%;
}

.modifierGroup h3 {
  font-size: clamp(
    18px,
    2.1vw,
    26px
  );
}

.modCard {
  aspect-ratio: .88 / 1;
}

.modCard img {
  height: 52%;
}

#dialogContent {
  padding-bottom: 22%;
}

#dialogAdd,
#halfAdd {
  bottom: 2.2%;
  width: 70%;
}

.modifierGroup:last-of-type {
  padding-bottom: 24%;
}

/* KSO 0.2.3 — нижняя панель товара */

.productBottomBar {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  z-index: 120;

  display: grid;
  grid-template-columns: 76px 1fr 1.35fr;
  gap: 12px;

  align-items: center;

  padding:
    14px
    22px
    18px;

  background:
    linear-gradient(
      to top,
      #f4f1ec 78%,
      rgba(244,241,236,.88) 90%,
      rgba(244,241,236,0) 100%
    );
}

.productBottomBar button {
  position: static !important;

  transform: none !important;

  width: 100% !important;
  height: 62px;

  margin: 0;

  border: 0;
  border-radius: 21px;

  font-weight: 900;
}

.bottomBack {
  background: #171717;
  color: #fff;

  font-size: 30px;
}

.bottomComposition {
  background: #171717;
  color: #fff;

  font-size: 18px;
}

.productBottomBar .dialogAdd {
  background: #ff6900;
  color: #fff;

  font-size: 22px;

  box-shadow:
    0 10px 26px
    rgba(255,105,0,.24);
}


/* Контент не должен уходить под панель */

#dialogContent {
  padding-bottom: 150px;
}

.modifierGroup:last-of-type {
  padding-bottom: 70px;
}
/* KSO 0.2.4 — калибровка продуктового экрана */

#productDialog .close {
  display: none;
}

#dialogContent {
  padding-top: 14px;
  padding-bottom: 132px;
}

#dialogContent .dialogGrid > div:first-child img {
  width: 58%;
  max-height: 25vh;
}

#dialogContent h2 {
  max-width: 74%;
  margin-top: -2px;
  margin-bottom: 2px;

  font-size: clamp(
    22px,
    2.75vw,
    34px
  );

  line-height: 1.02;
}

#dialogContent
.dialogGrid
> div:last-child
> p {
  max-width: 78%;

  margin-bottom: 10px;

  font-size: clamp(
    12px,
    1.25vw,
    16px
  );
}

#dialogContent [data-size] {
  padding: 8px 15px;
}

.modifierGroup {
  margin-top: 14px;
}

.modifierGroup h3 {
  margin-bottom: 8px;

  font-size: clamp(
    17px,
    1.8vw,
    23px
  );
}

.modifierGroup .sizeRow {
  gap: 8px;
}

.modCard {
  aspect-ratio: .92 / 1;
  border-radius: 16px;
  padding: 7px;
}

.modCard img {
  height: 50%;
  margin-bottom: 4px;
}

.modCardName {
  font-size: clamp(
    10px,
    1.1vw,
    14px
  );
}

.modCardPrice {
  font-size: clamp(
    9px,
    1vw,
    13px
  );
}

.productBottomBar {
  grid-template-columns: 64px 1fr 1.25fr;

  gap: 9px;

  padding:
    10px
    18px
    12px;
}

.productBottomBar button {
  height: 56px;

  border-radius: 18px;
}

.bottomBack {
  font-size: 26px;
}

.bottomComposition {
  font-size: 16px;
}

.productBottomBar .dialogAdd {
  font-size: 20px;
}

.modifierGroup:last-of-type {
  padding-bottom: 56px;
}

/* KSO 0.3 — корзина */

#productDialog:has(.cartScreen) {
  /* Высота кнопки + отступы панели + безопасная область экрана. */
  --cart-bottom-bar-height: calc(62px + 12px + 18px + env(safe-area-inset-bottom, 0px));
}

#dialogContent:has(.cartScreen) {
  /* Прокрутка заканчивается над панелью: кнопки не уходят под неё. */
  height: calc(100% - var(--cart-bottom-bar-height));
  min-height: 0;
  padding-bottom: 0;
  scroll-padding-bottom: 24px;
}

.cartScreen {
  min-height: 100%;
  padding: 34px 30px 24px;
}

.cartScreen h2 {
  max-width: none !important;
  margin: 0 0 26px !important;

  text-align: left !important;
  font-size: 34px !important;
}

.cartHeaderAmount {
  white-space: nowrap;
}

.cartLines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cartLine {
  position: relative;

  display: grid;
  grid-template-columns:
    110px
    1fr
    auto;

  gap: 14px;

  align-items: center;

  padding: 16px;

  border-radius: 22px;

  background: #fff;
}

.cartLineImage img {
  width: 100px;
  height: 100px;

  object-fit: contain;
}

.cartLineInfo strong {
  display: block;

  margin-bottom: 5px;

  font-size: 18px;
}

.cartLineSize,
.cartLineMods {
  margin-bottom: 4px;

  color: #666;

  font-size: 14px;
}

.cartLinePrice {
  margin-top: 7px;

  font-size: 18px;
  font-weight: 900;
}

.cartQty {
  display: flex;
  align-items: center;
  gap: 12px;

  padding-right: 8px;
}

.cartQty button {
  width: 42px;
  height: 42px;

  border: 0;
  border-radius: 50%;

  background: #f0f0f0;

  font-size: 25px;
}

.cartQty span {
  min-width: 20px;

  text-align: center;

  font-size: 19px;
  font-weight: 800;
}

.cartDelete {
  position: absolute;

  top: 10px;
  right: 10px;

  border: 0;
  background: transparent;

  font-size: 17px;
}

.cartBottomBar {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  height: var(--cart-bottom-bar-height);

  display: grid;
  grid-template-columns: 70px 1fr;

  gap: 12px;

  padding: 12px 22px calc(18px + env(safe-area-inset-bottom, 0px));

  background: #f4f1ec;
}

.cartBack {
  border: 0;
  border-radius: 20px;

  background: #171717;
  color: #fff;

  font-size: 27px;
}

.checkoutBtn {
  height: 62px;

  border: 0;
  border-radius: 20px;

  background: #ff6900;
  color: white;

  font-size: 21px;
  font-weight: 900;
}
/* KSO 0.3.1 — допродажа */

.upsellSection {
  margin-top: 30px;
}

.upsellSection h3 {
  margin: 0 0 14px;

  font-size: 24px;
  font-weight: 900;
}

.upsellCarousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  padding: 4px;

  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
}

.upsellCarousel::-webkit-scrollbar {
  display: none;
}

.upsellCarousel:focus-visible,
.upsellCard:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.upsellCard {
  display: flex;
  flex-direction: column;
  align-items: center;

  flex: 0 0 180px;
  width: 180px;
  min-width: 0;
  scroll-snap-align: start;

  padding: 14px;

  border: 0;
  border-radius: 18px;

  background: #fff;

  cursor: pointer;
}

.upsellCard img {
  width: 100%;
  height: 110px;
  flex-shrink: 0;

  object-fit: contain;
}

.upsellCard strong {
  margin: 8px 0 12px;

  font-size: 16px;
  line-height: 1.25;

  text-align: center;
}

.upsellCard span {
  margin-top: auto;

  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.menuLoadError {
  max-width: 680px;
  padding: 24px 0;
}

.menuLoadError p {
  font-size: 20px;
  line-height: 1.4;
}

.retryMenu {
  min-height: 64px;
  margin-top: 12px;
  padding: 16px 28px;
  border: 0;
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

/* Half & Half: два независимых вертикальных wheel-picker. */

#dialogContent:has(.halfScreen) {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

#productDialog:has(.halfScreen) {
  overflow: hidden;
}

body:has(#productDialog[open] .halfScreen) {
  overflow: hidden;
}

.halfScreen {
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding:
    20px
    clamp(14px, 4vw, 48px)
    calc(94px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

#dialogContent .halfScreen > h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  text-align: center;
}

.halfIntro {
  margin: 8px 0 12px;
  color: #666;
  font-size: clamp(14px, 1.7vw, 19px);
  line-height: 1.3;
  text-align: center;
}

.halfPicker {
  width: min(100%, 900px);
  min-height: 0;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.2vw, 24px);
  align-items: center;
}

.halfWheelPanel {
  min-width: 0;
}

.halfWheelPanel > h3 {
  margin: 0 0 10px;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.halfWheelFrame {
  --half-card-height: clamp(190px, 22dvh, 290px);
  --half-wheel-height: clamp(440px, 56dvh, 710px);
  position: relative;
  height: var(--half-wheel-height);
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, .32);
}

.halfWheelFrame::before,
.halfWheelFrame::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  height: 18%;
  pointer-events: none;
}

.halfWheelFrame::before {
  top: 0;
  background: linear-gradient(to bottom, #f4f1ec, rgba(244, 241, 236, 0));
}

.halfWheelFrame::after {
  bottom: 0;
  background: linear-gradient(to top, #f4f1ec, rgba(244, 241, 236, 0));
}

.halfWheel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding:
    calc((var(--half-wheel-height) - var(--half-card-height)) / 2)
    clamp(5px, 1.2vw, 12px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.halfWheel::-webkit-scrollbar {
  display: none;
}

.halfWheel:focus-visible {
  outline: 3px solid rgba(255, 105, 0, .55);
  outline-offset: -3px;
}

.halfOption {
  position: relative;
  flex: 0 0 var(--half-card-height);
  min-width: 0;
  height: var(--half-card-height);
  margin: 0;
  padding: clamp(10px, 1.8vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 24px;
  background: rgba(255, 255, 255, .68);
  color: var(--ink);
  font-family: inherit;
  opacity: .42;
  transform: scale(.9);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition:
    opacity .18s ease,
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
  cursor: pointer;
  touch-action: manipulation;
}

.halfOption.selected {
  z-index: 1;
  border-color: rgba(255, 105, 0, .72);
  background: #fff;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .09);
}

.halfOption:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -4px;
}

.halfOption img,
.halfOptionFallback {
  width: 100%;
  height: 58%;
  min-height: 0;
  margin-bottom: 6px;
  object-fit: contain;
}

.halfOptionFallback {
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f7f5f2;
  font-size: clamp(38px, 7vw, 64px);
}

.halfOption strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(15px, 2vw, 21px);
  line-height: 1.08;
  text-align: center;
  overflow-wrap: anywhere;
}

.halfOptionPrice {
  margin-top: 6px;
  color: #555;
  font-size: clamp(14px, 1.8vw, 19px);
  font-weight: 800;
  white-space: nowrap;
}

.halfBottomBar {
  grid-template-columns: minmax(106px, .8fr) 1fr 1.35fr;
}

.halfBottomBar .bottomBack {
  font-size: clamp(14px, 1.8vw, 18px);
}

@media (max-width: 600px), (max-height: 1000px) {
  .halfScreen {
    padding-top: 12px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  #dialogContent .halfScreen > h2 {
    font-size: clamp(24px, 5.5vw, 32px);
  }

  .halfIntro {
    margin: 5px 0 8px;
    font-size: 13px;
  }

  .halfPicker {
    gap: 8px;
  }

  .halfWheelPanel > h3 {
    margin-bottom: 6px;
    font-size: 15px;
  }

  .halfWheelFrame {
    --half-card-height: clamp(174px, 22dvh, 220px);
    --half-wheel-height: clamp(390px, 54dvh, 520px);
    border-radius: 20px;
  }

  .halfWheel {
    gap: 10px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .halfOption {
    padding: 9px;
    border-radius: 18px;
  }

  .halfOption strong {
    font-size: clamp(13px, 3.1vw, 17px);
  }

  .halfOptionPrice {
    margin-top: 4px;
    font-size: clamp(12px, 2.8vw, 15px);
  }

  .halfBottomBar {
    grid-template-columns: minmax(88px, .8fr) 1fr 1.25fr;
    gap: 7px;
    padding: 9px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .halfBottomBar button {
    height: 54px;
    font-size: 14px;
  }

  .halfBottomBar .dialogAdd {
    font-size: 16px;
  }
}

/* Canonical pizza PNGs keep their 1024px transparent canvas. Non-square
   catalog/product image boxes contain the full asset; Half & Half applies its
   own square-layer presentation scale below. */
.pizzaImage--canonical:not([data-half-preview-image]):not([data-half-grid-image]),
.pizzaImage--presentation {
  background: transparent !important;
  mix-blend-mode: normal !important;
}

.halfPizzaLayer img.pizzaImage--canonical,
.halfFlavorImage img.pizzaImage--canonical {
  background: transparent;
  mix-blend-mode: normal;
}

/* Half & Half: отдельный конфигуратор с центральной собранной пиццей. */

#productDialog:has(.halfScreen) {
  overflow: hidden;
}

.halfScreen {
  padding-top: 12px;
}

.halfHero {
  flex: 0 0 auto;
  width: min(100%, 760px);
  margin: 0 auto;
}

.halfPizzaComposite {
  position: relative;
  width: clamp(250px, 30dvh, 470px);
  max-width: 74vw;
  aspect-ratio: 1;
  margin: 0 auto;
  isolation: isolate;
}

.halfPizzaArtwork {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: circle(46% at 50% 50%);
}

.halfPizzaLayer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.halfPizzaLayer--left {
  clip-path: inset(0 50% 0 0);
}

.halfPizzaLayer--right {
  clip-path: inset(0 0 0 50%);
}

.halfPizzaLayer img,
.halfPizzaPreviewFallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.halfPizzaPreviewFallback[hidden] {
  display: none;
}

.halfPizzaLayer img {
  z-index: 1;
  inset: auto;
  top: var(--half-image-top, 0%);
  left: var(--half-image-left, 0%);
  width: var(--half-image-size, 100%);
  height: var(--half-image-size, 100%);
  mix-blend-mode: multiply;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .13));
}

.halfPizzaPreviewFallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ece7e0;
  color: #9a8d81;
  font-size: clamp(90px, 16dvh, 220px);
}

.halfPizzaPreviewFallback[hidden] {
  display: none;
}

.halfPizzaSeam {
  position: absolute;
  z-index: 2;
  top: 11%;
  bottom: 11%;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 8px rgba(0, 0, 0, .16);
  transform: translateX(-50%);
  pointer-events: none;
}

.halfRandomizer {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(58px, 5.5dvh, 82px);
  height: clamp(58px, 5.5dvh, 82px);
  padding: 0;
  border: 5px solid #f4f1ec;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 105, 0, .3);
  font: inherit;
  font-size: clamp(29px, 3dvh, 44px);
  line-height: 1;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: manipulation;
}

.halfRandomizer:focus-visible {
  outline: 3px solid #171717;
  outline-offset: 3px;
}

.halfRandomizer.rolling span {
  animation: halfDiceRoll .52s ease;
}

@keyframes halfDiceRoll {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(190deg) scale(.75); }
  100% { transform: rotate(360deg) scale(1); }
}

.halfFlavorLabels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 4vw, 46px);
  margin: -4px auto 8px;
}

.halfFlavorLabels > div {
  min-width: 0;
  text-align: center;
}

.halfFlavorLabels span {
  display: block;
  margin-bottom: 2px;
  color: #80776f;
  font-size: clamp(11px, 1.3vw, 15px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.halfFlavorLabels strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.1em;
  overflow: hidden;
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.halfHeading {
  flex: 0 0 auto;
  text-align: center;
}

#dialogContent .halfHeading h2 {
  max-width: none;
  margin: 0 auto;
  font-size: clamp(27px, 3.5vw, 42px);
  line-height: 1;
  text-align: center;
}

.halfHeading p {
  margin: 3px 0 8px;
  color: #68615b;
  font-size: clamp(15px, 1.8vw, 20px);
  font-weight: 700;
  text-align: center;
}

.halfDough {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 4px;
  border-radius: 18px;
  background: #e6e1db;
}

.halfDoughOption {
  min-height: 46px;
  padding: 9px 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #615a54;
  font: inherit;
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.halfDoughOption.selected {
  background: #fff;
  color: #171717;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.halfDoughOption:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.halfNotice {
  flex: 0 0 22px;
  min-height: 22px;
  margin: 4px 0 2px;
  color: #bd4d00;
  font-size: 14px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  opacity: 0;
  transition: opacity .15s ease;
}

.halfNotice.visible {
  opacity: 1;
}

.halfPicker {
  flex: 0 0 auto;
  width: min(100%, 900px);
  margin: 0 auto;
}

.halfWheelPanel > h3 {
  margin-bottom: 5px;
  font-size: clamp(14px, 1.7vw, 19px);
}

.halfWheelFrame {
  --half-card-height: clamp(130px, 12dvh, 210px);
  --half-wheel-height: clamp(300px, 32dvh, 620px);
  height: var(--half-wheel-height);
  border-radius: 22px;
}

.halfWheel {
  gap: 10px;
}

.halfOption {
  padding: clamp(7px, 1.1vw, 12px);
  border-radius: 19px;
}

.halfOption.selected {
  color: var(--ink);
}

.halfOption img,
.halfOptionFallback {
  height: 54%;
  margin-bottom: 3px;
}

.halfOption strong {
  font-size: clamp(13px, 1.6vw, 17px);
}

.halfOptionPrice {
  margin-top: 3px;
  font-size: clamp(12px, 1.4vw, 15px);
}

@media (max-height: 1350px) {
  .halfPizzaComposite {
    width: clamp(230px, 28dvh, 380px);
  }

  .halfFlavorLabels strong {
    font-size: clamp(14px, 1.8vw, 19px);
  }

  .halfWheelFrame {
    --half-card-height: clamp(106px, 10dvh, 132px);
    --half-wheel-height: clamp(250px, 23dvh, 310px);
  }
}

@media (max-width: 600px), (max-height: 1000px) {
  .halfScreen {
    padding-top: 6px;
  }

  .halfPizzaComposite {
    width: clamp(164px, 20dvh, 195px);
    max-width: 48vw;
  }

  .halfFlavorLabels {
    gap: 10px;
    margin-bottom: 3px;
  }

  .halfFlavorLabels span {
    font-size: 10px;
  }

  .halfFlavorLabels strong {
    min-height: 1.95em;
    font-size: clamp(12px, 2.8vw, 15px);
  }

  #dialogContent .halfHeading h2 {
    font-size: clamp(22px, 5vw, 28px);
  }

  .halfHeading p {
    margin-bottom: 5px;
    font-size: 14px;
  }

  .halfDough {
    width: min(100%, 380px);
    padding: 3px;
    border-radius: 15px;
  }

  .halfDoughOption {
    min-height: 40px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 13px;
  }

  .halfNotice {
    flex-basis: 18px;
    min-height: 18px;
    margin: 2px 0;
    font-size: 11px;
    line-height: 18px;
  }

  .halfWheelPanel > h3 {
    margin-bottom: 3px;
    font-size: 12px;
  }

  .halfWheelFrame {
    --half-card-height: clamp(92px, 10.5dvh, 106px);
    --half-wheel-height: clamp(210px, 24dvh, 235px);
    border-radius: 17px;
  }

  .halfWheel {
    gap: 7px;
  }

  .halfOption {
    padding: 5px;
    border-radius: 14px;
  }

  .halfOption strong {
    font-size: clamp(11px, 2.5vw, 13px);
  }

  .halfOptionPrice {
    margin-top: 1px;
    font-size: 11px;
  }

  .halfRandomizer {
    width: 54px;
    height: 54px;
    border-width: 4px;
    font-size: 28px;
  }
}

/* Half & Half: вкус выбирается свайпом непосредственно по пицце. */

.halfScreen {
  container-name: half-configurator;
  container-type: inline-size;
  padding:
    clamp(28px, 6.5dvh, 124px)
    clamp(18px, 7.4%, 80px)
    calc(160px + env(safe-area-inset-bottom, 0px));
  font-family: Inter, Arial, sans-serif;
}

.halfHero {
  width: min(100%, 900px);
}

.halfPizzaComposite {
  width: clamp(260px, 70cqw, 650px);
  max-width: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .08);
  user-select: none;
  -webkit-user-select: none;
}

.halfSwipeZone {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 50%;
  touch-action: none;
  cursor: grab;
}

.halfSwipeZone--left {
  left: 0;
}

.halfSwipeZone--right {
  right: 0;
}

.halfSwipeZone.isSwiping {
  cursor: grabbing;
}

.halfSwipeHint {
  position: absolute;
  z-index: 4;
  top: 50%;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: .58;
  text-align: center;
  text-shadow: 0 1px 7px rgba(0, 0, 0, .38);
  transform: translateY(-50%);
  pointer-events: none;
  animation: halfSwipeHint 1.15s ease-in-out .55s 2;
}

.halfSwipeHint--left {
  left: 12%;
}

.halfSwipeHint--right {
  right: 12%;
}

@keyframes halfSwipeHint {
  0%, 100% { opacity: .42; transform: translateY(-50%); }
  50% { opacity: .82; transform: translateY(calc(-50% - 8px)); }
}

.halfPizzaLayer.changingUp,
.halfFlavorLabels strong.changingUp {
  animation: halfChangeUp .19s ease-out;
}

.halfPizzaLayer.changingDown,
.halfFlavorLabels strong.changingDown {
  animation: halfChangeDown .19s ease-out;
}

@keyframes halfChangeUp {
  from { opacity: .28; transform: translateY(5%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes halfChangeDown {
  from { opacity: .28; transform: translateY(-5%); }
  to { opacity: 1; transform: translateY(0); }
}

.halfRandomizer {
  z-index: 5;
  width: clamp(68px, 9vw, 96px);
  height: clamp(68px, 9vw, 96px);
  border-width: 7px;
  font-size: clamp(28px, 3vw, 34px);
}

.halfFlavorLabels {
  width: min(100%, 780px);
  gap: clamp(16px, 8cqw, 86px);
  margin: 2px auto 0;
}

.halfFlavorLabels span {
  margin-bottom: 5px;
  font-size: clamp(11px, 2.05cqw, 19px);
  font-weight: 600;
  opacity: .62;
}

.halfFlavorLabels strong {
  min-height: 2.2em;
  font-size: clamp(16px, 3.35cqw, 31px);
  font-weight: 700;
  line-height: 1.1;
}

.halfHeading {
  margin-top: clamp(24px, 2.5dvh, 48px);
}

#dialogContent .halfHeading h2 {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(28px, 7.3cqw, 70px);
  font-weight: 900;
  line-height: 1;
  text-wrap: balance;
}

.halfHeading p {
  margin: clamp(8px, .7dvh, 14px) 0 0;
  color: #746d67;
  font-size: clamp(16px, 3.35cqw, 32px);
  font-weight: 500;
  line-height: 1.1;
}

.halfDough {
  width: clamp(260px, 54cqw, 500px);
  max-width: 100%;
  height: clamp(58px, 4.7dvh, 92px);
  margin-top: clamp(24px, 2dvh, 38px);
  padding: 5px;
  border-radius: 46px;
  background: #e5e1dc;
}

.halfDoughOption {
  min-height: 0;
  height: 100%;
  padding: 0 14px;
  border-radius: 41px;
  font-size: clamp(14px, 2.9cqw, 27px);
  font-weight: 600;
}

.halfBottomBar {
  left: clamp(12px, 7.4%, 80px);
  right: clamp(12px, 7.4%, 80px);
  bottom: calc(clamp(20px, 1.8dvh, 36px) + env(safe-area-inset-bottom, 0px));
  grid-template-columns:
    clamp(140px, 20vw, 220px)
    clamp(170px, 24vw, 270px)
    clamp(190px, 26vw, 290px);
  justify-content: space-between;
  gap: clamp(8px, 2vw, 22px);
  padding: 0;
  background: transparent;
}

.halfBottomBar button,
.halfBottomBar #halfAdd {
  min-width: 0;
  height: clamp(72px, 5.4dvh, 104px);
  padding-right: clamp(5px, 1.5cqw, 14px);
  padding-left: clamp(5px, 1.5cqw, 14px);
  border-radius: 52px;
  white-space: nowrap;
}

.halfBottomBar .bottomBack {
  font-size: clamp(13px, 3.35cqw, 31px);
  font-weight: 700;
}

.halfBottomBar .bottomComposition {
  font-size: clamp(12px, 3.15cqw, 29px);
  font-weight: 600;
}

.halfBottomBar .dialogAdd,
.halfBottomBar #halfAdd {
  font-size: clamp(16px, 4.8cqw, 44px);
  font-weight: 800;
}

@media (max-width: 700px) {
  .halfScreen {
    padding-right: clamp(18px, 7vw, 50px);
    padding-left: clamp(18px, 7vw, 50px);
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  #dialogContent .halfHeading h2 {
    white-space: normal;
  }

  .halfBottomBar {
    left: 12px;
    right: 12px;
    grid-template-columns: .9fr 1fr 1.15fr;
  }

  .halfBottomBar button,
  .halfBottomBar #halfAdd {
    height: clamp(66px, 7.5dvh, 76px);
  }
}

@container half-configurator (max-width: 600px) {
  #dialogContent .halfHeading h2 {
    white-space: normal;
  }

  .halfBottomBar {
    grid-template-columns:
      minmax(0, .9fr)
      minmax(0, 1fr)
      minmax(0, 1.15fr);
    gap: clamp(6px, 1.8cqw, 10px);
  }

  .halfBottomBar button,
  .halfBottomBar #halfAdd {
    height: clamp(62px, 16cqw, 76px);
  }
}

/* =====================================================
   Half & Half: HERO / FLAVOR SELECTOR, 1080 × 1920 master
   ===================================================== */

#dialogContent:has(.halfScreen) {
  height: 100%;
  padding: 0;
  overflow: hidden;
}

#productDialog:has(.halfScreen) {
  background: transparent;
  overflow: hidden;
}

.halfScreen {
  position: relative;
  container-name: half-configurator;
  container-type: inline-size;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  color: var(--half-content-color);
  font-family: Inter, Arial, sans-serif;
}

.halfBackground {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-color: var(--half-background-color);
  background-image: var(--half-background-image);
  background-position: var(--half-background-position);
  background-size: var(--half-background-size);
  background-repeat: var(--half-background-repeat);
  opacity: var(--half-background-opacity);
  pointer-events: none;
}

.halfBackground::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--half-background-overlay);
}

.halfContent {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding:
    clamp(72px, 6.8dvh, 130px)
    clamp(30px, 4.6cqw, 50px)
    calc(clamp(142px, 8.6dvh, 166px) + env(safe-area-inset-bottom, 0px));
}

.halfHero {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
}

.halfHeroStage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: min(900px, 83.4cqw);
  margin: 0 auto;
}

.halfPizzaComposite {
  position: relative;
  z-index: 2;
  width: min(900px, 83.4cqw);
  max-width: none;
  aspect-ratio: 1;
  margin: 0;
  overflow: visible;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

.halfPizzaArtwork {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  clip-path: circle(46% at 50% 50%);
  filter: drop-shadow(0 22px 25px rgba(49, 34, 20, .15));
}

.halfPizzaLayer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.halfPizzaLayer--left {
  clip-path: inset(0 50% 0 0);
}

.halfPizzaLayer--right {
  clip-path: inset(0 0 0 50%);
}

.halfPizzaLayer img,
.halfPizzaPreviewFallback {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.halfPizzaLayer img {
  z-index: 1;
  top: var(--half-image-top, 0%);
  left: var(--half-image-left, 0%);
  width: var(--half-image-size, 100%);
  height: var(--half-image-size, 100%);
  mix-blend-mode: multiply;
  filter: none;
}

.halfPizzaPreviewFallback {
  display: grid;
  place-items: center;
  inset: 0;
  border-radius: 50%;
  background: #e7e1da;
  color: #96887a;
  font-size: min(180px, 18cqw);
}

.halfPizzaPreviewFallback[hidden] {
  display: none;
}

.halfPizzaSeam {
  position: absolute;
  z-index: 3;
  top: 7%;
  bottom: 7%;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 7px rgba(50, 35, 20, .2);
  transform: translateX(-50%);
  pointer-events: none;
}

.halfSwipeZone {
  position: absolute;
  z-index: 4;
  top: 5%;
  bottom: 5%;
  width: 45%;
  touch-action: none;
  cursor: grab;
}

.halfSwipeZone--left { left: 5%; }
.halfSwipeZone--right { right: 5%; }
.halfSwipeZone.isSwiping { cursor: grabbing; }

.halfRandomizer {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: min(68px, 6.3cqw);
  height: min(68px, 6.3cqw);
  padding: 0;
  border: min(6px, .56cqw) solid var(--half-background-color);
  border-radius: 50%;
  background: #ef8c00;
  color: #fff;
  box-shadow: 0 10px 24px rgba(92, 53, 0, .22);
  font: inherit;
  font-size: min(27px, 2.5cqw);
  line-height: 1;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: manipulation;
}

.halfRandomizer::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
}

.halfRandomizer:focus-visible,
.halfChooseFlavors:focus-visible,
.halfSideTab:focus-visible,
.halfFlavorCard:focus-visible,
.halfDoughOption:focus-visible {
  outline: 4px solid #ff6a00;
  outline-offset: 3px;
}

.halfRunner {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(940px, 87cqw);
  height: min(940px, 87cqw);
  color: var(--half-runner-color);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.halfRunner--left,
.halfRunner--right {
  right: auto;
}

.halfRunner svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.halfRunner path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 5;
}

.halfRunnerTrack {
  stroke: currentColor;
  opacity: .52;
}

.halfRunnerProgress {
  stroke: currentColor;
  stroke-dasharray: var(--runner-progress) 1;
}

.halfRunnerDot {
  fill: currentColor;
  stroke: var(--half-background-color);
  stroke-width: 6;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .2));
}

.halfFlavorLabel {
  position: absolute;
  z-index: 7;
  top: auto;
  bottom: min(4px, .37cqw);
  width: 25%;
  color: var(--half-content-color);
}

.halfFlavorLabel--left {
  left: 1.5%;
  text-align: left;
}

.halfFlavorLabel--right {
  right: 1.5%;
  text-align: right;
}

.halfFlavorLabel > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: min(20px, 1.86cqw);
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.productBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.halfFlavorLabel--right .productBadges {
  justify-content: flex-end;
}

.productBadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--half-control-background) 82%, transparent);
  color: var(--half-control-color);
  font-size: min(15px, 1.4cqw);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.productBadge--spicy {
  background: #433a36;
  color: #fff;
}

.halfChooseFlavors {
  position: relative;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: min(14px, 1.3cqw);
  min-width: min(310px, 28.7cqw);
  min-height: min(66px, 6.1cqw);
  margin: max(-70px, -6.5cqw) auto 0;
  padding: 0 min(28px, 2.6cqw);
  border: 0;
  border-radius: 999px;
  background: var(--half-control-background);
  color: var(--half-control-color);
  box-shadow: 0 8px 22px rgba(48, 36, 25, .1);
  font: inherit;
  font-size: min(22px, 2.05cqw);
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}

.halfHeading {
  flex: 0 0 auto;
  width: 100%;
  margin-top: min(76px, 3.96dvh);
  text-align: center;
}

#dialogContent .halfHeading h2 {
  width: min(570px, 53cqw);
  max-width: 100%;
  margin: 0 auto;
  color: var(--half-content-color);
  font-size: min(72px, 6.7cqw);
  font-weight: 900;
  line-height: .92;
  text-align: center;
  text-wrap: balance;
}

.halfHeading p {
  margin: min(14px, .73dvh) 0 0;
  color: var(--half-secondary-color);
  font-size: min(25px, 2.32cqw);
  font-weight: 500;
  line-height: 1.1;
}

.halfDough {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(480px, 44.5cqw);
  max-width: 100%;
  height: min(78px, 4.1dvh);
  margin: min(36px, 1.88dvh) auto 0;
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--half-content-color) 12%, transparent);
}

.halfDoughOption {
  min-height: 0;
  height: 100%;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--half-secondary-color);
  font: inherit;
  font-size: min(21px, 1.95cqw);
  font-weight: 650;
  cursor: pointer;
}

.halfDoughOption.selected {
  background: var(--half-control-background);
  color: var(--half-control-color);
  box-shadow: 0 5px 14px rgba(45, 33, 22, .1);
}

.halfScreen--selector .halfContent {
  display: block;
  padding-top: 0;
  padding-right: min(38px, 3.5cqw);
  padding-left: min(38px, 3.5cqw);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.halfScreen--selector .halfContent::-webkit-scrollbar {
  display: none;
}

.halfScreen--selector .halfHero {
  position: relative;
  height: min(445px, 41.2cqw);
  overflow: hidden;
}

.halfScreen--selector .halfHeroStage {
  min-height: min(900px, 83.4cqw);
  transform: translateY(-50%);
}

.halfScreen--selector .halfPizzaComposite {
  width: min(900px, 83.4cqw);
}

.halfScreen--selector .halfFlavorLabel {
  top: auto;
  bottom: 0;
}

.halfScreen--selector .halfRunner {
  top: 50%;
}

.halfSelector {
  width: 100%;
  padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
}

.halfSideTabs {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(520px, 48.2cqw);
  height: min(78px, 7.25cqw);
  margin: max(-78px, -7.25cqw) auto min(32px, 3cqw);
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--half-content-color) 12%, var(--half-background-color));
  box-shadow: 0 8px 20px rgba(48, 36, 25, .08);
}

.halfSideTab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--half-secondary-color);
  font: inherit;
  font-size: min(23px, 2.15cqw);
  font-weight: 750;
  cursor: pointer;
}

.halfSideTab.selected {
  background: var(--half-control-background);
  color: var(--half-control-color);
}

.halfFlavorGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: min(18px, 1.7cqw);
  width: 100%;
}

.halfFlavorCard {
  display: grid;
  grid-template-rows: auto minmax(2.25em, auto) auto 1.3em;
  align-content: start;
  min-width: 0;
  min-height: min(400px, 37cqw);
  padding: min(12px, 1.12cqw);
  border: 3px solid transparent;
  border-radius: min(32px, 3cqw);
  background: color-mix(in srgb, var(--half-control-background) 62%, transparent);
  color: var(--half-control-color);
  box-shadow: 0 7px 18px rgba(49, 36, 24, .07);
  font: inherit;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  overflow: hidden;
}

.halfFlavorCard.selected {
  border-color: #ff6a00;
  background: var(--half-control-background);
}

.halfFlavorCard:disabled {
  cursor: default;
  filter: none;
  opacity: .78;
}

.halfFlavorImage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  clip-path: circle(46% at 50% 50%);
}

.halfFlavorImage img {
  position: absolute;
  top: var(--half-image-top, 0%);
  left: var(--half-image-left, 0%);
  width: var(--half-image-size, 100%);
  height: var(--half-image-size, 100%);
  object-fit: contain;
  mix-blend-mode: multiply;
}

.halfFlavorImageFallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #e7e1da;
  font-size: min(70px, 7cqw);
}

.halfFlavorCard > strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: min(10px, .93cqw);
  font-size: min(23px, 2.15cqw);
  font-weight: 850;
  line-height: 1.12;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.halfCardBadges {
  align-content: start;
  justify-content: center;
  min-height: 22px;
  margin-top: 5px;
  overflow: hidden;
}

.halfCardBadges .productBadge {
  padding: 3px 6px;
  font-size: min(13px, 1.2cqw);
}

.halfFlavorPrice {
  align-self: end;
  margin-top: 4px;
  color: var(--half-secondary-color);
  font-size: min(21px, 1.95cqw);
  font-weight: 800;
}

/* Shared TIGERPIZZA KSO surface system. Values are supplied from the same
   configurable theme object that drives the approved Half & Half screen. */
:root {
  --kso-page-background-color: #f2f1ee;
  --kso-page-background-image: url('/assets/half-pizza-background.png');
  --kso-page-background-position: center;
  --kso-page-background-size: cover;
  --kso-page-background-repeat: no-repeat;
  --kso-page-background-opacity: 1;
  --kso-page-background-overlay: transparent;
  --kso-surface-background: color-mix(
    in srgb,
    var(--kso-page-background-color) 92%,
    #8f7d6d
  );
}

body,
#app,
#productDialog:has(.productConfigurator) {
  background-color: var(--kso-page-background-color);
  background-image: var(--kso-page-background-image);
  background-position: var(--kso-page-background-position);
  background-size: var(--kso-page-background-size);
  background-repeat: var(--kso-page-background-repeat);
}

body,
#app {
  background-attachment: fixed;
}

#app > aside,
#catalog {
  background-color: transparent;
}

.mainHeader,
#categories .categorySearch {
  background-color: var(--kso-page-background-color);
}

#categories .categorySearch {
  box-shadow: 0 6px 0 var(--kso-page-background-color);
}

.productConfigurator .modCard,
.halfFlavorCard {
  background: var(--kso-surface-background);
}

.productConfigurator .modCard.active,
.halfFlavorCard.selected {
  border-color: var(--orange);
  background: var(--half-control-background, #fff);
}

#productDialog:has(.productConfigurator) .productBottomBar {
  background: linear-gradient(
    to top,
    var(--kso-page-background-color) 78%,
    color-mix(in srgb, var(--kso-page-background-color) 88%, transparent) 90%,
    transparent 100%
  );
}

.halfPizzaLayer.changingUp,
.halfFlavorLabel.changingUp {
  animation: halfChangeUp .19s ease-out;
}

.halfPizzaLayer.changingDown,
.halfFlavorLabel.changingDown {
  animation: halfChangeDown .19s ease-out;
}

.halfRandomizer.rolling span {
  animation: halfDiceRoll .52s ease;
}

.halfBottomBar {
  position: absolute;
  z-index: 20;
  left: min(50px, 4.6cqw);
  right: min(50px, 4.6cqw);
  bottom: calc(min(34px, 1.8dvh) + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: min(90px, 8.35cqw) min(255px, 23.7cqw) min(290px, 27cqw);
  justify-content: space-between;
  gap: min(20px, 1.85cqw);
  padding: 0;
  background: transparent;
}

.halfBottomBar::before {
  display: none;
}

.halfBottomBar button,
.halfBottomBar #halfAdd {
  position: static !important;
  width: 100% !important;
  height: min(90px, 8.35cqw);
  min-width: 0;
  padding: 0 min(18px, 1.7cqw);
  border: 0;
  border-radius: 999px;
  transform: none !important;
  white-space: nowrap;
}

.halfBottomBar .bottomBack,
.halfBottomBar .bottomComposition {
  background: #2b211d;
  color: #fff;
}

.halfBottomBar .bottomBack {
  font-size: min(37px, 3.45cqw);
}

.halfBottomBar .bottomComposition {
  font-size: min(23px, 2.15cqw);
}

.halfBottomBar .dialogAdd,
.halfBottomBar #halfAdd {
  background: #ff6a00;
  color: #fff;
  font-size: min(33px, 3.05cqw);
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(255, 106, 0, .28);
}

@media (max-height: 1400px) {
  .halfContent {
    padding-top: clamp(58px, 6.6dvh, 85px);
  }

  .halfHeroStage {
    min-height: min(650px, 83.4cqw);
  }

  .halfPizzaComposite {
    width: min(650px, 83.4cqw);
  }

  .halfHeading {
    margin-top: 70px;
  }

  .halfDough {
    margin-top: 24px;
  }

  .halfScreen--selector .halfHero {
    height: min(445px, 41.2cqw);
  }

  .halfScreen--selector .halfHeroStage {
    min-height: min(650px, 83.4cqw);
    transform: translateY(-50%);
  }

  .halfScreen--selector .halfPizzaComposite {
    width: min(650px, 83.4cqw);
  }
}

@media (max-width: 600px), (max-height: 1000px) {
  .halfContent {
    padding-top: 52px;
    padding-right: 16px;
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    padding-left: 16px;
  }

  .halfHeroStage {
    min-height: min(450px, 83.4cqw);
  }

  .halfPizzaComposite {
    width: min(450px, 83.4cqw);
  }

  .halfFlavorLabel > strong {
    font-size: min(16px, 3cqw);
  }

  .halfHeading {
    margin-top: 48px;
  }

  .halfDough {
    margin-top: 18px;
  }

  .halfScreen--selector .halfContent {
    padding-right: 10px;
    padding-left: 10px;
  }

  .halfScreen--selector .halfHero {
    height: min(445px, 41.2cqw);
  }

  .halfScreen--selector .halfHeroStage {
    min-height: min(450px, 83.4cqw);
    transform: translateY(-50%);
  }

  .halfScreen--selector .halfPizzaComposite {
    width: min(450px, 83.4cqw);
  }

  .halfFlavorGrid {
    gap: 7px;
  }

  .halfFlavorCard {
    min-height: min(230px, 42cqw);
    padding: 6px;
    border-width: 2px;
  }

  .halfBottomBar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: 60px 1fr 1.2fr;
    gap: 7px;
  }

  .halfBottomBar button,
  .halfBottomBar #halfAdd {
    height: 60px;
  }
}
