/**
 * Quick-view / options modal ("Výber možností").
 *
 * Shared component: the same modal opens from every product loop — homepage,
 * shop, product category and related products. Markup is loaded via AJAX
 * (inc/quickview.php) and driven by assets/js/quickview.js.
 */

.vm-overlay {
  position: fixed; inset: 0; background: rgba(10, 32, 30, .55); z-index: 140;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.vm-overlay.open { opacity: 1; visibility: visible; }
.vm {
  position: fixed; z-index: 150; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: min(540px, calc(100vw - 24px)); max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
}
.vm.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.vm-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: none;
  border-radius: 9px; background: var(--teal-50); color: var(--teal); cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.vm-close:hover { background: #dfeae8; }
.vm-close svg { width: 18px; height: 18px; }
.vm-top { display: flex; align-items: center; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.vm-thumb {
  width: 64px; height: 64px; border-radius: 11px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--panel);
}
.vm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.vm-name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.3; padding-right: 30px; }
.vm-code { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.vm-body { padding: 18px 22px 6px; }
.vm-group { margin-bottom: 18px; }
.vm-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.vm-tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.vm-tier {
  display: flex; flex-direction: column; gap: 3px; border: 1.5px solid var(--line);
  border-radius: 11px; padding: 11px 12px; cursor: pointer; text-align: left;
  background: #fff; font-family: inherit;
}
.vm-tier:hover { border-color: #c7d3d1; }
.vm-tier.on { border-color: var(--teal); background: var(--teal-50); }
.vm-tier .t-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.vm-tier .t-note { font-size: 11px; color: var(--muted); }
.vm-tier .t-price { font-size: 12.5px; color: var(--teal); font-weight: 700; margin-top: 1px; }
.vm-tier .t-price .amount { font-weight: 700; }
/* Per-piece price under the package price — the same pair the packaging cards on
   the product page show, so a tier can never be mistaken for a unit price. */
.vm-tier .t-unit { font-size: 11px; color: var(--muted); }
.vm-tier .t-unit .amount { font-weight: 600; }
/* Sale — the original price stacks above the current one; the wrapper itself
   comes from base/price.css, only the type scale is set here. */
.vm-tier .t-price del { font-size: 11.5px; }
.vm-tier .t-price del .amount { font-weight: 400; }
.vm-price-now .now del { font-size: 13px; }
.vm-price-now .now del .amount { font-weight: 400; }
/* wholesale banner */
.vm-whole { display: flex; align-items: center; gap: 12px; border-radius: 11px; padding: 12px 14px; font-size: 13px; margin-top: 4px; }
.vm-whole .w-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; }
.vm-whole .w-ico svg { width: 18px; height: 18px; }
.vm-whole .w-txt { flex: 1; line-height: 1.35; }
.vm-whole .w-txt b { font-weight: 700; }
.vm-whole.guest { background: var(--teal-50); color: var(--teal-600); }
.vm-whole.guest .w-ico { background: #fff; color: var(--teal); }
.vm-whole.auth { background: #e4f3ea; color: #1c7c4a; }
.vm-whole.auth .w-ico { background: #fff; color: #1c7c4a; }
/* Teal, not green: green is reserved for the add-to-cart path (.vm-add below),
   so the wholesale login CTA must not read as the buy button. */
.vm-wbtn {
  flex: none; background: var(--teal); color: #fff; border: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 13px;
  border-radius: 8px; text-decoration: none; white-space: nowrap;
}
.vm-wbtn:hover { background: var(--teal-600); color: #fff; text-decoration: none; }
/* footer: price + qty + add */
.vm-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 22px 20px; border-top: 1px solid var(--line-soft);
  position: sticky; bottom: 0; background: #fff;
}
.vm-price { flex: 1; min-width: 120px; }
.vm-price-now { display: flex; align-items: baseline; gap: 8px; flex-direction: column;}
.vm-price-now .now { font-size: 22px; font-weight: 800; color: var(--teal); letter-spacing: -.01em; }
.vm-price-now .now .amount { font-weight: 800; }
.vm-price-now .vm-price-unit { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.vm-price-now .vm-price-unit .amount { font-weight: 600; color: inherit; }
.vm-price-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.vm-qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; }
.vm-step { width: 38px; height: 42px; border: none; background: #fff; color: var(--teal); font-size: 20px; cursor: pointer; font-family: inherit; }
.vm-step:hover { background: var(--teal-50); }
.vm-qty-val { min-width: 34px; text-align: center; font-size: 15px; font-weight: 700; }
/* Add-to-cart green, shared with the card button and the product page. */
.vm-add {
  flex: none; display: flex; align-items: center; gap: 9px; background: var(--green);
  color: #fff; border: none; cursor: pointer; font-family: inherit; font-size: 14px;
  font-weight: 700; padding: 0 20px; height: 44px; border-radius: 9px;
}
.vm-add:hover { background: var(--green-600); }
.vm-add svg { width: 18px; height: 18px; }
body.vm-lock { overflow: hidden; }

@media (max-width: 520px) {
  .vm-tiers { grid-template-columns: 1fr; }
  .vm-foot { gap: 10px; }
  .vm-add { flex: 1; justify-content: center; }
}
