/* V211 — stable hierarchy for the 4 package type cards */
.flex-package-tabs{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}
.flex-package-tab{
  min-height:188px!important;
  padding:18px!important;
  border-radius:26px!important;
  display:grid!important;
  grid-template-rows:auto minmax(48px,auto) 1fr auto!important;
  align-items:start!important;
  gap:12px!important;
  overflow:hidden!important;
}
.flex-package-tab-head{
  display:contents!important;
}
.flex-package-tab-discount{
  position:static!important;
  transform:none!important;
  grid-row:1!important;
  justify-self:center!important;
  align-self:start!important;
  min-width:104px!important;
  padding:10px 18px!important;
  border-radius:999px!important;
  font-size:16px!important;
  font-weight:800!important;
  line-height:1!important;
  background:#eef3ff!important;
  color:#4460df!important;
  box-shadow:inset 0 0 0 1px rgba(79,97,211,.11)!important;
}
.flex-package-tab-head strong{
  grid-row:2!important;
  justify-self:center!important;
  align-self:start!important;
  width:100%!important;
  max-width:100%!important;
  padding:0 4px!important;
  margin:0!important;
  text-align:center!important;
  font-size:18px!important;
  line-height:1.16!important;
  font-weight:750!important;
  letter-spacing:-.02em!important;
  color:#22304a!important;
  white-space:normal!important;
  overflow:visible!important;
  word-break:normal!important;
}
.flex-package-tab-price-block{
  grid-row:4!important;
  align-self:end!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  padding-top:14px!important;
  margin:0!important;
  border-top:1px solid #e7edf6!important;
  text-align:center!important;
}
.flex-package-tab-price-block span{
  font-size:13px!important;
  font-weight:650!important;
  color:#8491a8!important;
}
.flex-package-tab-price-block b{
  font-size:21px!important;
  line-height:1.05!important;
  font-weight:800!important;
  letter-spacing:-.025em!important;
  color:#1f2d4b!important;
  white-space:nowrap!important;
}
.flex-package-tab:hover,.flex-package-tab:focus-visible{
  transform:translateY(-2px)!important;
  border-color:#c5d2eb!important;
  box-shadow:0 14px 28px rgba(28,44,88,.08)!important;
}
html[data-theme=dark] .flex-package-tab-head strong{color:#eef4ff!important}
html[data-theme=dark] .flex-package-tab-price-block{border-color:#2d3b52!important}
html[data-theme=dark] .flex-package-tab-price-block span{color:#9aa9c3!important}
html[data-theme=dark] .flex-package-tab-price-block b{color:#eef4ff!important}

/* Desktop modal: all 16 cards + quantity controls in one natural flow */
@media (min-width:981px){
  .flex-package-modal-dialog{
    width:min(1540px,97vw)!important;
    max-height:96vh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:18px 22px 20px!important;
  }
  .flex-package-modal-list,
  .flex-package-modal-list[data-package-grid]{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px 14px!important;
  }
  .flex-package-modal-item{
    min-height:82px!important;
    height:82px!important;
  }
  .flex-package-custom-choice{
    position:relative!important;
    display:block!important;
    clear:both!important;
    margin-top:14px!important;
    padding-top:12px!important;
  }
}

@media (max-width:1100px){
  .flex-package-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:640px){
  .flex-package-tabs{grid-template-columns:1fr!important;gap:12px!important}
  .flex-package-tab{min-height:156px!important;padding:16px!important;border-radius:22px!important;grid-template-rows:auto minmax(38px,auto) 1fr auto!important}
  .flex-package-tab-discount{min-width:92px!important;padding:8px 14px!important;font-size:14px!important}
  .flex-package-tab-head strong{font-size:16px!important}
  .flex-package-tab-price-block span{font-size:12px!important}
  .flex-package-tab-price-block b{font-size:20px!important}
}
