/* ════════════════════════════════════════════════════════════
   «ВЫБОР ВАРИАНТА» — вид группы модификаторов (AddonLinks.style = 'variant')
   10.11.2026. Плитки с фото под описанием товара: значок группы, значок,
   название и вес варианта, кружок выбора; без предвыбора. Пока в обязательной
   группе ничего не выбрано, кнопка «В корзину» приглушена и просит выбрать.
   Разметка: cart.js (телефон, .additive-group--variant) и
   desktop/js/restar-desktop.js (ПК, #restar-modal-variants).
   Опции группы: .vc-fade — «Тень снизу» (фото уходит в тёмную подложку).
   Здесь же: вторая строка кнопки «В корзину» — расшифровка цены (.popup-btn-unit).
   ════════════════════════════════════════════════════════════ */

.additive-group--variant {
  position: relative;
  margin: 12px 0 8px;
  padding: 11px 9px 9px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, .08);
  background: rgba(17, 24, 39, .025);
  transition: box-shadow .3s ease;
}
body.dark .additive-group--variant {
  border-color: rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .025) 100%);
}
.additive-group--variant.vc-pulse {
  animation: vc-pulse 1.2s ease;
}
@keyframes vc-pulse {
  0%, 100% { box-shadow: none; }
  25%, 70% { box-shadow: 0 0 0 2px rgba(var(--theme-color, 255, 141, 47), .9), 0 0 18px -2px rgba(var(--theme-color, 255, 141, 47), .6); }
}

.additive-group--variant .vc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 2px 9px 3px;
}
.additive-group--variant .vc-tl { display: flex; align-items: center; gap: 7px; min-width: 0; }
.additive-group--variant .vc-title {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2;
  color: #16181d;
}
body.dark .additive-group--variant .vc-title { color: #f5f5f6; }
.additive-group--variant .vc-gico { flex: none; width: 20px; height: 20px; font-size: 19px; line-height: 20px; color: rgb(var(--theme-color, 255, 141, 47)); }
.additive-group--variant .vc-req {
  flex: none; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; line-height: 1.25;
  background: rgba(var(--theme-color, 255, 141, 47), .14); color: rgb(var(--theme-color, 255, 141, 47));
  transition: background-color .2s ease, color .2s ease;
}
body.dark .additive-group--variant .vc-req { background: rgba(130, 66, 18, .5); color: #ff9d45; }
.additive-group--variant.is-done .vc-req { background: rgba(17, 24, 39, .06); color: rgba(17, 24, 39, .45); }
body.dark .additive-group--variant.is-done .vc-req { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .45); }

.additive-group--variant .vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.additive-group--variant .vc-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 104px; padding: 0; margin: 0; overflow: hidden; cursor: pointer; text-align: left;
  border-radius: 11px; border: 1.5px solid rgba(17, 24, 39, .1); background: #e9eaee;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, box-shadow .2s ease, transform .14s ease, background-color .2s ease;
}
body.dark .additive-group--variant .vc-tile { border-color: rgba(255, 255, 255, .17); background: #17181b; }
.additive-group--variant .vc-tile:active { transform: scale(.97); }
.additive-group--variant .vc-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%; border-radius: 0; max-width: none;
}
/* без «Тени снизу»: фото целиком, снизу лёгкое затемнение под текст */
.additive-group--variant:not(.vc-fade) .vc-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .62) 100%);
}
/* «Тень снизу»: фото растворяется в тёмной подложке плитки */
.additive-group--variant.vc-fade .vc-tile { background: #17181b; }
.additive-group--variant.vc-fade .vc-tile.selected { background: #3d2512; }
.additive-group--variant.vc-fade .vc-img {
  -webkit-mask-image: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, .28) 78%, rgba(0, 0, 0, .18) 100%);
          mask-image: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, .28) 78%, rgba(0, 0, 0, .18) 100%);
}
.additive-group--variant .vc-tile.selected {
  border-color: rgb(var(--theme-color, 255, 141, 47));
  box-shadow: 0 0 0 1px rgba(var(--theme-color, 255, 141, 47), .28), 0 0 14px -3px rgba(var(--theme-color, 255, 141, 47), .6);
}
@media (hover: hover) {
  .additive-group--variant .vc-tile:not(.selected):hover { border-color: rgba(var(--theme-color, 255, 141, 47), .6); }
}

.additive-group--variant .vc-check {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .95); background: rgba(0, 0, 0, .2);
  transition: background-color .2s ease, border-color .2s ease;
}
.additive-group--variant .vc-tile.selected .vc-check {
  border-color: transparent; box-shadow: 0 2px 8px rgba(var(--theme-color, 255, 141, 47), .55);
  background: rgb(var(--theme-color, 255, 141, 47)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.additive-group--variant .vc-price {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.additive-group--variant .vc-foot {
  position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 7px;
  padding: 0 6px 8px 8px; color: #fff;
}
.additive-group--variant .vc-ico { flex: none; width: 23px; height: 22px; font-size: 21px; line-height: 22px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.additive-group--variant .vc-name {
  display: block; font-size: 13.5px; font-weight: 700; line-height: 1.15; color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
.additive-group--variant .vc-w { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .75); }

/* Значки: «огонёк» с градиентом и своя картинка (белый силуэт маской) */
.rs-ico-flame {
  display: inline-block;
  background: linear-gradient(180deg, #ffb24d 0%, #ff6a1a 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 23a7.5 7.5 0 0 1-5.138-12.963C8.204 8.774 11.5 6.5 11 1.5c6 4 9 8 3 14 1 0 2.5 0 5-2.47.27.773.5 1.604.5 2.47A7.5 7.5 0 0 1 12 23z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 23a7.5 7.5 0 0 1-5.138-12.963C8.204 8.774 11.5 6.5 11 1.5c6 4 9 8 3 14 1 0 2.5 0 5-2.47.27.773.5 1.604.5 2.47A7.5 7.5 0 0 1 12 23z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vc-ico.rs-ico-flame { background: #fff; }
.rs-ico-img {
  display: inline-block; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
}

/* ── Кнопка «В корзину», пока вариант не выбран ── */
#popup-add-btn.vc-wait {
  background: rgba(17, 24, 39, .08) !important; border-color: transparent !important;
  box-shadow: none !important; color: rgba(17, 24, 39, .55) !important;
}
body.dark #popup-add-btn.vc-wait { background: rgba(255, 255, 255, .1) !important; color: rgba(255, 255, 255, .7) !important; }
#popup-add-btn.vc-wait > * { display: none !important; }
#popup-add-btn.vc-wait::after { content: attr(data-wait); }

/* ── Вторая строка кнопки: расшифровка цены «2 × (350 + 80 ₽ добавки)» ── */
#popup-add-btn { flex-wrap: wrap; row-gap: 0 !important; }
#popup-add-btn .popup-btn-unit {
  flex-basis: 100%; text-align: center;
  font-size: 11.5px; font-weight: 500; line-height: 1.2; opacity: .8; margin-top: -1px;
}
#popup-add-btn .popup-btn-unit[hidden] { display: none; }

/* ── ПК: окно товара ── */
.restar-variants:empty { display: none; }
.restar-variants .additive-group--variant { margin: 14px 0 6px; padding: 12px 10px 10px; }
.restar-variants .additive-group--variant .vc-title { font-size: 16px; }
.restar-variants .additive-group--variant .vc-grid { gap: 10px; }
.restar-variants .additive-group--variant .vc-tile { min-height: 118px; border-radius: 12px; font: inherit; }
.restar-variants .additive-group--variant .vc-name { font-size: 14px; }
.restar-add-cart.vc-wait {
  background: rgba(17, 24, 39, .08) !important; color: rgba(17, 24, 39, .55) !important;
  box-shadow: none !important; border-color: transparent !important;
}
