/* =====================================================================
   PAGEN Outlet — wspólne style (tokeny marki zgodne z pagen.pl)
   ===================================================================== */

:root {
  /* kolory marki — wartości zmierzone na pagen.pl */
  --red: #c92121;            /* przyciski główne („Zobacz więcej”) */
  --red-hover: #a81a1a;
  --red-accent: #e8313a;     /* kreski pod nagłówkami, „Promocje” */
  --brand: #c81617;          /* sygnet PAGEN */
  --ink: #000;
  --text: #212121;
  --text-soft: #444;
  --muted: #6b6b6b;
  --muted-light: #9a9a9a;
  --line: #e0e2e3;
  --line-strong: #ced4da;
  --soft: #f7f7f8;           /* tło kafelków */
  --soft-2: #f1f1f2;
  --dark: #292929;           /* stopka */
  --dark-2: #1e1e1c;
  --white: #fff;

  --ok-bg: #e8f5e9;
  --ok: #1b5e20;
  --warn-bg: #fff3e0;
  --warn: #8a4b00;
  --info-bg: #eef1fb;
  --info: #263a8a;
  --danger-bg: #fdecec;
  --danger: #a31515;
  --internal-bg: #fbf0f0;    /* pola wewnętrzne (tylko dla pracowników) */
  --internal: #7d1515;

  --font: 'Open Sans Variable', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --container: 1400px;
  --gutter: 16px;
  --focus: 0 0 0 3px rgba(232, 49, 58, 0.35);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

*, *::before, *::after { box-sizing: border-box; }

/* atrybut hidden zawsze wygrywa z klasami ustawiającymi display */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(24px, 3.2vw, 30px); font-weight: 800; }
h2 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--red-accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--dark); color: #fff; padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { top: 8px; color: #fff; }

/* Nagłówek z czerwoną kreską (jak na pagen.pl) */
.title-line { position: relative; padding-bottom: 14px; margin-bottom: 24px; }
.title-line::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 40px; height: 2px;
  background: var(--red-accent);
}
.title-line--center { text-align: center; }
.title-line--center::after { left: 50%; transform: translateX(-50%); }

/* ------------------------------------------------------------- przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 32px;
  border: 1px solid var(--red);
  border-radius: 0;
  background: var(--red);
  color: var(--white);
  font: inherit; font-size: 14.4px; font-weight: 800; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--red-hover); border-color: var(--red-hover); color: var(--white); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn--dark { background: var(--ink); border-color: var(--ink); }
.btn--dark:hover { background: #333; border-color: #333; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: var(--soft-2); color: var(--ink); border-color: var(--soft-2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text); padding-left: 12px; padding-right: 12px; }
.btn--ghost:hover { background: var(--soft-2); border-color: var(--soft-2); color: var(--ink); }
.btn--danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn--sm { padding: 8px 14px; font-size: 13px; font-weight: 700; }
.btn--block { width: 100%; }
.btn .arrow { font-weight: 400; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* „— zobacz więcej” */
.more-link {
  position: relative; display: inline-block;
  padding-left: 22px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  text-decoration: none;
}
.more-link::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 15px; height: 3px; margin-top: -1.5px;
  background: var(--red-accent);
  transition: width .15s ease;
}
.more-link:hover { color: var(--red); }
.more-link:hover::before { width: 18px; }

/* ------------------------------------------------------------- formularze */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label {
  font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-soft);
}
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--white);
  color: var(--text);
  font: inherit; font-size: 15px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23212121' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red-accent); box-shadow: var(--focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.help { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.error-text { font-size: 13px; color: var(--danger); font-weight: 600; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.4; }
.field > label.check { font-size: 14.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); flex: none; }

/* ------------------------------------------------------------- odznaki */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
  letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
  background: var(--soft-2); color: var(--text-soft);
}
.badge--available { background: var(--ok-bg); color: var(--ok); }
.badge--reserved { background: var(--warn-bg); color: var(--warn); }
.badge--sold { background: #e9e9e9; color: #4a4a4a; }
.badge--draft { background: var(--info-bg); color: var(--info); }
.badge--internal { background: var(--internal-bg); color: var(--internal); }
.badge--special { background: var(--red); color: var(--white); }

/* ------------------------------------------------------------- komunikaty */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; margin: 0 0 16px;
  border-left: 3px solid currentColor;
  font-size: 14.5px;
}
.alert--success { background: var(--ok-bg); color: var(--ok); }
.alert--error { background: var(--danger-bg); color: var(--danger); }
.alert--info { background: var(--info-bg); color: var(--info); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }
.alert p:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--red-accent);
  background: var(--soft);
  padding: 12px 16px;
  font-size: 14px; font-weight: 400; color: var(--text);
}

/* ------------------------------------------------------------- zaślepki grafik
   Miejsca na grafiki przygotowywane przez grafików — widać rozmiar i opis. */
.ph {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 16px;
  text-align: center;
  color: #555;
  background:
    repeating-linear-gradient(-45deg, rgba(0,0,0,.025) 0 14px, transparent 14px 28px),
    #eeeff0;
  border: 2px dashed #bfc3c6;
  /* bez overflow:hidden — przy długim opisie pole rośnie, zamiast ucinać treść */
}
.ph__icon { width: 34px; height: 34px; color: #9da2a6; }
.ph__label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.ph__size { font-size: 15px; font-weight: 800; color: #333; }
.ph__hint { font-size: 13px; line-height: 1.45; max-width: 46ch; color: #5e5e5e; }
.ph--tile { aspect-ratio: 16 / 9; }
/* wersja dla klientów: bez opisu dla grafika, tylko subtelny znak PAGEN */
.ph--neutral { border: 0; background: var(--soft-2); }
/* !important: kafelki i sekcja kontakt mają reguły „img { width: 100% … }” dla prawdziwych grafik */
.ph--neutral .ph__mark { width: 56px !important; height: 56px !important; aspect-ratio: auto !important; object-fit: contain !important; opacity: .14; }
.ph--wide { aspect-ratio: 4 / 3; }
.ph--photo { aspect-ratio: 4 / 3; border-style: solid; border-width: 1px; border-color: var(--line); background: var(--soft); }
.ph--compact { padding: 8px; gap: 2px; }
.ph--compact .ph__icon { width: 24px; height: 24px; }
.ph--compact .ph__label { font-size: 10px; letter-spacing: .04em; color: var(--muted); }

@media (max-width: 640px) {
  .ph__hint { font-size: 12px; }
}

/* ------------------------------------------------------------- tabela-lista: wspólne */
.price { font-weight: 800; font-size: 17px; white-space: nowrap; color: var(--ink); }
.price small { font-weight: 400; font-size: 12px; color: var(--muted); }
.price--ask { font-weight: 600; font-size: 14px; color: var(--text-soft); white-space: normal; }

.lock { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 32px 0 8px; padding: 0; list-style: none; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong);
  font-weight: 700; font-size: 14px; text-decoration: none;
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pagination .is-gap { border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
