/* sklep.filipkowarski.pl — storefront + koszyk (faza 3, concern STOREFRONT+KOSZYK).
 *
 * Osobny arkusz: NIE nadpisuje shop.css — dopisuje warstwy storefrontu (siatka
 * kategorii premium, strona produktu z badge dostępności, stepper biletów,
 * side-cart wysuwany). Tokeny (#c8a258, --radius, --shadow, light/dark przez
 * data-theme) pochodzą z shop.css; tu tylko nowe komponenty.
 *
 * Mobile-first (od 375px). Wszystkie polskie ogonki w komentarzach zachowane.
 */

/* ── HERO storefront ─────────────────────────────────────────────────── */
.hero {
  margin: 4px 0 28px;
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-light), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: clamp(26px, 7vw, 40px);
  line-height: 1.05;
  margin: 0 0 10px;
  color: var(--text-primary);
}
.hero__lead {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 56ch;
  margin: 0;
}
@media (min-width: 760px) {
  .hero { padding: 44px 40px; }
}

/* ── Badge dostępności (pkt 19) ──────────────────────────────────────── */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.4;
}
.avail-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.avail-badge--low      { background: var(--warning-bg); color: var(--warning); }
.avail-badge--soldout  { background: var(--danger-bg);  color: var(--danger); }
.avail-badge--off      { background: var(--bg-hover);    color: var(--text-muted); }
.avail-badge--ok       { background: var(--success-bg); color: var(--success); }

/* Badge nakładany na media karty (lewy-górny róg) */
.product-card__media { position: relative; }
.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

/* ── Stepper ilości biletów (strona produktu) ────────────────────────── */
.ticket-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.ticket-qty button {
  width: 44px;
  height: 46px;
  border: 0;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.ticket-qty button:hover:not(:disabled) { color: var(--accent); }
.ticket-qty button:disabled { opacity: .4; cursor: not-allowed; }
.ticket-qty input {
  width: 56px;
  height: 46px;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  -moz-appearance: textfield;
}
.ticket-qty input::-webkit-outer-spin-button,
.ticket-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.product-buy { margin-top: 18px; }
.product-buy__qty-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.product-buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
@media (min-width: 520px) {
  .product-buy__row .btn { flex: 1; min-width: 220px; }
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  font-size: 13.5px;
  color: var(--text-secondary);
}
.event-meta b { color: var(--text-primary); font-weight: 600; }

/* ── Strona produktu / wydarzenia: HERO + opis (redesign #4) ──────────────
 * Nadpisuje bazowy .product-detail z shop.css (storefront.css ładowany później).
 * Lewo: oprawione zdjęcie z badge. Prawo: karta z najważniejszym. Stack na mobile.
 * Opis wyniesiony do pełnoszerokiej sekcji .product-desc poniżej. */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 36px;
  align-items: start;
}
@media (min-width: 860px) {
  .product-detail {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }
}

/* Oprawione zdjęcie z badge nałożonym na róg */
.product-detail__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-light), transparent 55%),
    var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__media .product-card__media-placeholder {
  font-size: 56px; color: var(--accent); opacity: .55;
}

/* Wspólny placeholder obrazka (partials/image-placeholder.php): gradient marki + nazwa produktu.
   Wypełnia media-box (product-card__media / product-detail__media — oba position:relative). */
.img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; padding: 18px; text-align: center;
  background: linear-gradient(135deg, var(--accent, #b8893f) 0%, var(--text-primary, #1f1b16) 118%);
}
.img-placeholder__label {
  font-family: var(--font-display, "Fraunces", Georgia, "Times New Roman", serif);
  font-weight: 600; font-size: clamp(15px, 3.6vw, 26px); line-height: 1.18;
  letter-spacing: .01em; color: #fffdf8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
}
.product-detail__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 12px;
  padding: 5px 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

/* Karta z najważniejszym (prawa kolumna) */
.product-detail__info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 26px 24px;
}
@media (min-width: 860px) {
  .product-detail__info {
    padding: 32px 30px;
    position: sticky;
    top: calc(var(--header-height, 64px) + 16px);
  }
}
.product-detail__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.product-detail__title {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: clamp(24px, 4.4vw, 34px);
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.product-detail__price {
  font-size: clamp(28px, 5vw, 34px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 18px;
}
.product-detail__price-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}
.product-detail__notice { margin-top: 18px; }

/* Blok faktów wydarzenia jako definition list (termin / miejsce / wolne miejsca) */
.event-facts { gap: 0; padding: 4px 16px; }
.event-facts__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.event-facts__row:last-child { border-bottom: 0; }
.event-facts dt { color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.event-facts dd { margin: 0; text-align: right; }

.product-buy__hint { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.product-buy__trust {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Pełnoszeroka sekcja opisu z premium typografią ──────────────────────── */
.product-desc {
  margin: 0 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}
.product-desc__heading {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.01em;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.product-desc__body {
  max-width: 65ch;
  color: var(--text-secondary);
  font-size: 16.5px;
  line-height: 1.8;
}
.product-desc__body b, .product-desc__body strong { color: var(--text-primary); }

/* Komunikat o kodach rabatowych (uwaga właściciela) */
.discount-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--accent-light);
  border: 1px dashed var(--accent);
  color: var(--text-secondary);
  font-size: 13px;
}
.discount-hint svg { color: var(--accent); flex: none; }

/* ── SIDE-CART wysuwany (pkt 9) ──────────────────────────────────────── */
.sidecart-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.sidecart-overlay.is-open { opacity: 1; visibility: visible; }

.sidecart {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 61;
  height: 100dvh;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--transition);
}
.sidecart.is-open { transform: translateX(0); }

.sidecart__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.sidecart__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  margin: 0;
  color: var(--text-primary);
}
.sidecart__close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}
.sidecart__close:hover { border-color: var(--accent); color: var(--accent); }

.sidecart__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}
.sidecart__empty {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
}

.sc-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-light);
}
.sc-item:last-child { border-bottom: 0; }
.sc-item__media {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--text-secondary), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
}
.sc-item__media img { width: 100%; height: 100%; object-fit: cover; }
.sc-item__info { flex: 1; min-width: 0; }
.sc-item__name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.sc-item__meta { font-size: 12.5px; color: var(--text-muted); }
.sc-item__line { font-weight: 700; font-size: 14px; color: var(--text-primary); white-space: nowrap; }

.sidecart__ft {
  flex: none;
  border-top: 1px solid var(--border);
  padding: 16px 18px;
  background: var(--bg-card);
}
.sidecart__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.sidecart__total b {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  color: var(--text-primary);
}
.sidecart__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* Toast potwierdzenia dodania */
.sc-toast {
  position: fixed;
  top: calc(var(--header-height, 64px) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 70;
  background: var(--text-primary);
  color: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.sc-toast.is-open { opacity: 1; transform: translateX(-50%) translateY(0); }

body.sidecart-lock { overflow: hidden; }

/* ── Koszyk: dwukolumnowy układ od ≥860 ──────────────────────────────── */
@media (min-width: 860px) {
  .cart-layout {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 24px;
    align-items: start;
  }
  .cart-layout__summary { position: sticky; top: calc(var(--header-height, 64px) + 16px); }
}
.cart-aside .summary { margin-top: 0; }

/* ── Link "Kategorie" w headerze → przeniesiony do header.css (współdzielony). ── */
