/* ===========================================================================
   Blokada sprzedaży — CTA "Zapytaj o dostępność", pasek informacyjny i modal.
   Ładowane razem z resztą warstwy v2 (patrz intebo_scripts w functions.php).
   ======================================================================== */

/* --- CTA zamiast "Dodaj do koszyka" ------------------------------------- */
.lock-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid var(--ember);
  background: var(--ember);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.lock-cta:hover { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.lock-cta i { font-size: 0.9em; }

/* Karta produktu na listingu: CTA wchodzi w miejsce .product-card__add,
   czyli paska wysuwanego od dołu kafla — dziedziczy jego geometrię. */
.product-card__add.lock-cta {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
}

/* Karta produktu (PDP): przycisk na pełną szerokość kolumny zakupu. */
.pdp-buy__main.lock-cta { flex: 1; padding: 1rem 1.5rem; font-size: 0.95rem; }

/* --- Dopisek przy cenie -------------------------------------------------- */
.lock-price-note {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}
.lock-price-hidden { font-weight: 600; color: var(--ember); }

/* .product-card__price i .pdp-price__row to kontenery flex — dopisek musi
   złamać wiersz, inaczej wciskałby się obok kwoty. Sam `flex-basis: 100%`
   nie wystarczy: bez `flex-wrap` element nie ma gdzie się przenieść. */
.product-card__price { flex-wrap: wrap; }
.product-card__price .lock-price-note,
.pdp-price__row .lock-price-note { flex: 1 0 100%; }
.pdp-price .lock-price-note { margin-top: -0.35rem; font-size: 0.78rem; }

/* --- Etykieta "Ostatnia znana cena" -------------------------------------- */
/* Ceny z importu bywają nieaktualne, ale dla klienta są punktem odniesienia,
   więc zamiast je chować, podpisujemy je: skąd pochodzą i co potwierdzamy. */
.lock-price-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}
.product-card__price .lock-price-label { flex: 1 0 100%; margin-bottom: 0.1rem; }
/* .pdp-price to kolumna flex z odstępem --s-3 (0.75rem) — bez ściągnięcia
   etykieta odkleiłaby się od kwoty, którą podpisuje. */
.pdp-price .lock-price-label { margin-bottom: -0.55rem; font-size: 0.68rem; }

/* --- Pasek informacyjny -------------------------------------------------- */
.lock-bar {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(203, 74, 41, 0.07);
  border-left: 3px solid var(--ember);
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-900);
  margin-bottom: var(--s-4);
}
.lock-bar i { color: var(--ember); margin-top: 0.15rem; flex-shrink: 0; }

/* --- Modal --------------------------------------------------------------- */
.lock-modal { position: fixed; inset: 0; z-index: 3000; }
.lock-modal[hidden] { display: none; }
.lock-modal__backdrop { position: absolute; inset: 0; background: rgba(12, 10, 9, 0.62); }
.lock-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin: 1rem auto;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}
@media (max-width: 560px) { .lock-modal__panel { padding: 1.5rem 1.15rem 1.25rem; } }

.lock-modal__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 1.05rem;
}
.lock-modal__close:hover { color: var(--ink-900); }

.lock-modal__eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--ember);
}
.lock-modal__title { font-size: 1.35rem; font-weight: 600; line-height: 1.25; margin: 0.6rem 0 0.5rem; }
.lock-modal__lead { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 1rem; }

.lock-modal__product {
  background: var(--bg-alt);
  border-left: 3px solid var(--ember);
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.lock-modal__product[hidden] { display: none; }

.lock-modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 560px) { .lock-modal__grid { grid-template-columns: 1fr; } }
.lock-modal__full { grid-column: 1 / -1; }
.lock-modal__grid label { display: block; }
.lock-modal__grid label > span {
  display: block; font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 0.3rem;
}
.lock-modal__grid input,
.lock-modal__grid textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-100);
  background: #fff;
  color: var(--ink-900);
}
.lock-modal__grid input:focus,
.lock-modal__grid textarea:focus { outline: 2px solid var(--ember); outline-offset: -1px; }

/* Honeypot: poza ekranem, ale nie display:none — boty czytają styl. */
.lock-modal__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lock-modal__terms {
  display: flex; gap: 0.55rem; align-items: flex-start;
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
  margin: 0.9rem 0 1.1rem;
}
.lock-modal__terms input { margin-top: 0.2rem; flex-shrink: 0; }

.lock-modal__actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.lock-modal__phone {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-900); text-decoration: none;
}
.lock-modal__phone i { color: var(--ember); }
.lock-modal__phone:hover { text-decoration: underline; }

.lock-modal__feedback { font-size: 0.85rem; line-height: 1.5; margin: 0.9rem 0 0; }
.lock-modal__feedback:empty { display: none; }
.lock-modal__feedback.is-ok { color: #1a7f37; }
.lock-modal__feedback.is-error { color: #b32d2e; }

.lock-modal.is-busy .lock-modal__panel { opacity: 0.75; pointer-events: none; }

body.lock-modal-open { overflow: hidden; }
