/* =====================================================================
   STILARA — пакетни цени (inc/bundles.php): панел на продукта, ред в картата,
   чекмедже/количка/каса. Зарежда се навсякъде (картите и чекмеджето са навсякъде).
   ===================================================================== */

/* ---------- Панел на продукта ---------- */
.st-buy__bundle{ margin-top:22px; }
.st-bundle{
  position:relative; isolation:isolate; overflow:hidden;
  padding:16px 14px 14px; border-radius:var(--st-radius);
  border:1px solid rgba(255,106,61,.28);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,106,61,.16), transparent 55%),
    linear-gradient(180deg, var(--st-ink-2), var(--st-ink));
}
.st-bundle__head{ display:grid; gap:4px; }
.st-bundle__eyebrow{ display:inline-flex; align-items:center; gap:8px; margin:0; font-size:var(--st-fs-micro); font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--st-accent); }
.st-bundle__dot{ width:7px; height:7px; border-radius:50%; background:var(--st-accent); box-shadow:0 0 0 0 rgba(255,106,61,.6); animation:st-bdot 2.2s var(--st-ease) infinite; }
@keyframes st-bdot{ 0%{ box-shadow:0 0 0 0 rgba(255,106,61,.55); } 70%,100%{ box-shadow:0 0 0 9px rgba(255,106,61,0); } }
.st-bundle__title{ margin:2px 0 0; font-size:clamp(1.02rem,.4vw + .92rem,1.2rem); font-weight:700; letter-spacing:-.015em; line-height:1.25; }
.st-bundle__title em{ font-family:var(--st-f-serif); font-style:italic; font-weight:600; font-size:1.18em; letter-spacing:0; color:var(--st-accent-2); }
/* приглушен текст в панела: --st-bone-3 (#857E75) пада под 4.5:1 върху плочките/отблясъка → по-светъл тон (като prefers-contrast) */
.st-bundle{ --st-bmuted:#A49C92; }
.st-bundle__sub{ margin:0; font-size:var(--st-fs-xs); color:var(--st-bmuted); line-height:1.5; }

.st-bundle__tiers{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 8px; margin-top:18px; }
@media (min-width:520px){ .st-bundle__tiers{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; } }

.st-tier{
  position:relative; display:grid; align-content:start; gap:2px; min-width:0;
  padding:13px 10px 10px; border-radius:12px; text-align:left; cursor:pointer;
  font:inherit; color:var(--st-bone);
  background:rgba(28,26,24,.85); border:1px solid var(--st-line-2);
  transition:border-color var(--st-d-fast), background var(--st-d), transform .45s var(--st-ease-spring), box-shadow var(--st-d);
  -webkit-tap-highlight-color:transparent;
}
.st-tier:hover{ border-color:rgba(241,236,228,.4); transform:translateY(-2px); }
.st-tier:active{ transform:scale(.97); }
.st-tier:focus-visible{ outline:2px solid var(--st-accent); outline-offset:2px; }
.st-tier__qty{ font-size:var(--st-fs-xs); color:var(--st-bone-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.st-tier__qty b{ font-weight:700; color:var(--st-bone); }
.st-tier__total{ font-family:var(--st-f-display); font-size:clamp(1.15rem,.5vw + 1.05rem,1.4rem); font-weight:700; letter-spacing:-.03em; line-height:1.15; white-space:nowrap; font-variant-numeric:tabular-nums; }
.st-tier__unit{ font-size:var(--st-fs-micro); color:var(--st-bmuted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }

.st-tier.is-best{
  border-color:rgba(255,106,61,.6);
  background:linear-gradient(160deg, rgba(255,106,61,.16), rgba(28,26,24,.92) 60%);
  box-shadow:0 0 0 1px rgba(255,106,61,.22), 0 14px 34px -16px rgba(255,106,61,.75);
}
.st-tier.is-best .st-tier__total{ color:var(--st-accent); }
/* отблясък: отделен слой с overflow:hidden, за да може етикетът да стърчи над рамката */
.st-tier__shine{ position:absolute; inset:0; border-radius:inherit; overflow:hidden; pointer-events:none; }
.st-tier__shine::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(105deg, transparent 35%, rgba(255,255,255,.1) 50%, transparent 65%);
  transform:translateX(-120%); animation:st-bsheen 3.6s var(--st-ease) 1.2s infinite;
}
@keyframes st-bsheen{ 0%{ transform:translateX(-120%); } 45%,100%{ transform:translateX(120%); } }
.st-tier__badge{
  position:absolute; top:-9px; left:50%; transform:translateX(-50%); z-index:1;
  padding:3px 9px; border-radius:var(--st-radius-pill);
  background:var(--st-accent); color:var(--st-accent-ink); box-shadow:0 6px 16px -6px rgba(255,106,61,.8);
  font-size:.58rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; line-height:1.3; white-space:nowrap;
}
.st-tier.is-active{
  border-color:var(--st-accent); background:rgba(255,106,61,.1);
  box-shadow:inset 0 0 0 1px var(--st-accent), 0 14px 34px -18px rgba(255,106,61,.8);
}
.st-tier.is-active .st-tier__qty b{ color:var(--st-accent-2); }
.st-tier.is-pop{ animation:st-bpop .5s var(--st-ease-spring); }
@keyframes st-bpop{ 0%{ transform:scale(.94); } 100%{ transform:none; } }

.st-bundle__note{ margin:12px 0 0; font-size:var(--st-fs-xs); color:var(--st-bmuted); line-height:1.5; }
/* пакет над наличните бройки на избрания вариант (aria-disabled; кликът показва обяснението) */
.st-tier.is-over{ opacity:.45; }
.st-tier.is-over:hover{ transform:none; border-color:var(--st-line-2); }
.st-bundle__warn{
  margin:10px 0 0; padding:8px 12px; border-radius:10px;
  font-size:var(--st-fs-xs); font-weight:600; line-height:1.45; color:var(--st-bone);
  background:rgba(241,236,228,.06); border:1px solid rgba(241,236,228,.22);
}
.st-bundle__warn[hidden]{ display:none; }
.st-bundle__cart{
  margin:10px 0 0; padding:9px 12px; border-radius:10px;
  font-size:var(--st-fs-xs); font-weight:600; line-height:1.45; color:var(--st-bone);
  background:rgba(255,106,61,.1); border:1px solid rgba(255,106,61,.28);
}
.st-bundle__cart[hidden]{ display:none; }

/* ---------- Карта: „5 за 50 €“ ---------- */
.st-card__bundle{ margin:8px 0 0; min-width:0; }
.st-card__bundle span{
  display:inline-flex; align-items:center; gap:5px; max-width:100%;
  padding:3px 9px 3px 7px; border-radius:var(--st-radius-pill);
  font-size:var(--st-fs-micro); font-weight:700; letter-spacing:.03em; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  color:var(--st-accent-2); background:rgba(255,106,61,.1); border:1px solid rgba(255,106,61,.3);
}
.st-card__bundle .st-icon{ flex-shrink:0; }

/* ---------- Чекмедже / страница на количката ---------- */
/* „ср. 11,67 €“ — средна цена за брой, когато пакетът не се дели на цели центове */
.st-li__unit abbr,.st-cosum__each abbr{ text-decoration:none; border:0; cursor:help; }
.st-li__bundle{ display:flex; align-items:center; gap:5px; margin:3px 0 0; font-size:var(--st-fs-micro); font-weight:700; letter-spacing:.03em; color:var(--st-accent-2); }
.st-li__bundle[hidden]{ display:none; }
.st-li__bundle .st-icon{ flex-shrink:0; }
.st-sumrow--bundle{ color:var(--st-accent-2); }
.st-sumrow--bundle .st-sumrow__v{ color:var(--st-accent); }
.st-sumrow--bundle[hidden]{ display:none; }
.st-bhint{
  display:flex; align-items:center; gap:8px; margin:0; padding:9px 12px; border-radius:10px;
  font-size:var(--st-fs-xs); font-weight:600; line-height:1.4; color:var(--st-bone);
  background:linear-gradient(90deg, rgba(255,106,61,.16), rgba(255,106,61,.04));
  border:1px dashed rgba(255,106,61,.45);
}
.st-bhint .st-icon{ flex-shrink:0; color:var(--st-accent); }
.st-bhint[hidden]{ display:none; }
.st-sum__card > .st-bhint{ margin-bottom:14px; }

/* ---------- Каса (обобщение) ---------- */
.st-cosum__bundle{ display:flex; align-items:center; gap:5px; margin-top:3px; font-size:.72rem; font-weight:700; letter-spacing:.03em; color:var(--st-accent-2); }
.st-cosum__bundle .st-icon{ flex-shrink:0; }
.st-co .st-cosum__bsave th,.st-co .st-cosum__bsave td,.st-cosum__bsave th,.st-cosum__bsave td{ color:var(--st-accent-2); }
.st-cosum__bsave .st-icon{ display:inline-block; vertical-align:-2px; }

@media (prefers-reduced-motion:reduce){
  .st-bundle__dot,.st-tier__shine::after,.st-tier.is-pop{ animation:none!important; }
  .st-tier__shine{ display:none; }
  .st-tier,.st-tier:hover,.st-tier:active{ transform:none!important; transition:border-color var(--st-d-fast), background var(--st-d-fast); }
}
