/* =========================================================
   Ukryty Portfel – style
   ========================================================= */

:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #eeeae3;
  --ink: #111111;
  --ink-2: #4a4744;
  --ink-3: #75706a;
  --line: #e2ddd5;
  --accent: #111111;
  --accent-ink: #ffffff;
  --todo-bg: #fff3c4;
  --todo-ink: #6b5200;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 32px rgba(17, 17, 17, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-word;
}
.link:hover { text-decoration-thickness: 2px; }

/* Oznaczenie treści do uzupełnienia – widoczne, żeby nic nie umknęło przed startem */
.todo {
  display: inline-block;
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 1px 8px;
  border-radius: 6px;
  font-size: .92em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 239, .86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo-img { height: 36px; width: auto; }
.site-footer .logo-img { height: 40px; filter: invert(1) brightness(1.1); }
@media (max-width: 900px) { .site-header .logo-img { height: 30px; } }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

/* ---------- Produkt ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding-top: 24px;
  padding-bottom: clamp(64px, 9vw, 120px);
  align-items: start;
}

/* Galeria */
.gallery { min-width: 0; }

.gallery-viewport {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -4px; border-radius: var(--radius); }

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  aspect-ratio: 1 / 1;
  background: var(--bg);
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* zachowuje proporcje – napisy na zdjęciach zawsze w całości */
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.gallery-arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-viewport:hover .gallery-arrow,
.gallery-arrow:focus-visible { opacity: 1; }
.gallery-arrow:hover { transform: scale(1.06); }
.gallery-arrow[disabled] { opacity: 0 !important; pointer-events: none; }

.gallery-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: rgba(17, 17, 17, .78);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 96px));
  gap: 12px;
  margin-top: 14px;
}
.thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 1 / 1;
  opacity: .55;
  transition: opacity .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb:hover { opacity: .85; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--ink); }

/* Panel zakupu */
.buybox { min-width: 0; }
.buybox-sticky {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding-top: 8px;
}

.buybox h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  letter-spacing: -.035em;
  margin-bottom: 14px;
}

.lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 46ch;
}

.benefits {
  margin: 22px 0 22px;
  display: grid;
  gap: 12px;
}
.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
}
.benefits svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ink);
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 1px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.price-note { font-size: 14px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }

.buy-form { margin-top: 18px; display: grid; gap: 14px; }

.qty-row,
.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.qty-label { font-size: 15px; font-weight: 600; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.qty-btn {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  transition: background-color .2s var(--ease);
}
.qty-btn:hover { background: var(--surface-2); }
.qty-btn:disabled { opacity: .3; cursor: not-allowed; background: transparent; }
.qty-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.qty-btn:focus-visible { outline-offset: -3px; border-radius: 999px; }

.qty input {
  width: 52px;
  height: 48px;
  border: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus-visible { outline-offset: -3px; }

.total-row { font-size: 15px; color: var(--ink-2); }

.variant { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.variant strong { color: var(--ink); font-weight: 600; }

.summary {
  margin: 0;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-2);
}
.summary-row dt { margin: 0; }
.summary-row dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.summary-note { font-size: 13px; color: var(--ink-3); }
.summary-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}
.total {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.total.bump { animation: bump .35s var(--ease); }
@keyframes bump {
  40% { transform: scale(1.06); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #2a2a2a; box-shadow: 0 10px 24px rgba(17, 17, 17, .18); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }

.checkout-notice {
  font-size: 14px;
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  animation: fadeUp .35s var(--ease);
}

.fine-print { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.fine-print + .fine-print { margin-top: 4px; }

/* ---------- Sekcje opisowe ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--line);
}
.feature-reverse .feature-media { order: 2; }

.feature-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-text h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.feature-text > p { color: var(--ink-2); font-size: 17px; max-width: 48ch; }

.detail-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.detail-list span { color: var(--ink-2); text-align: right; }

.spec-title { font-size: 18px; margin: 36px 0 12px; letter-spacing: -.01em; }
.spec { margin: 0; display: grid; gap: 0; }
.spec > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.spec dt { color: var(--ink-2); }
.spec dd { margin: 0; text-align: right; }

.icon-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.icon-grid li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.icon-grid li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.icon-grid svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.note { margin-top: 20px; font-size: 14px !important; color: var(--ink-3) !important; }

.steps { margin-top: 28px; display: grid; gap: 22px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.steps h3 { font-size: 18px; margin: 6px 0 4px; letter-spacing: -.01em; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq,
.shipping {
  padding-block: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--line);
}
.faq > h2,
.shipping > h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -.03em;
  margin-bottom: 36px;
}
.faq-list { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq-body { padding: 0 4px 24px; color: var(--ink-2); max-width: 70ch; }
.faq details[open] .faq-body { animation: fadeUp .35s var(--ease); }

/* ---------- Dostawa ---------- */
.shipping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.card svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.card h3 { font-size: 20px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card strong { color: var(--ink); font-weight: 600; }

.card-wide { margin-top: 16px; gap: 18px; }
.card-wide h4 { font-size: 15px; margin: 0 0 8px; letter-spacing: -.005em; }
.return-steps {
  list-style: decimal;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 15px;
}
.return-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.return-grid > div {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.return-grid address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}
.return-help { font-size: 14px !important; color: var(--ink-3) !important; }

.spec-note { margin-top: 14px; font-size: 13px !important; color: var(--ink-3) !important; }
.footer-phone { margin-top: 6px; }
.footer-legal p + p { margin-top: 8px; }

/* ---------- Stopka ---------- */
.site-footer {
  background: var(--ink);
  color: #d9d5cf;
  padding-top: 64px;
  font-size: 15px;
}
.site-footer .logo { color: #fff; }
.site-footer .link { color: #fff; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-domain { margin-top: 8px; color: #8f8a83; font-size: 14px; }
.footer-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8f8a83;
  margin-bottom: 14px;
}
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #d9d5cf; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-block: 22px;
  font-size: 13px;
  color: #8f8a83;
}

/* ---------- Dolny pasek (mobile) ---------- */
.mobile-bar { display: none; }

/* ---------- Animacje ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.product .gallery,
.product .buybox { animation: fadeUp .7s var(--ease) both; }
.product .buybox { animation-delay: .08s; }

/* ---------- Responsywność ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 56px; }

  .main-nav { display: none; }

  .product {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 0;
  }
  /* Galeria od krawędzi do krawędzi, przesuwana palcem */
  .gallery { margin-inline: calc(var(--gutter) * -1); }
  .gallery-viewport { border-radius: 0; box-shadow: none; }
  .gallery-arrow { display: none; }
  .gallery-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
  }
  /* Na telefonie miniatury zamieniają się w kropki */
  .thumb {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: var(--ink);
    opacity: .2;
    aspect-ratio: auto;
    transition: width .3s var(--ease), opacity .3s var(--ease);
    position: relative;
  }
  /* większy obszar dotyku */
  .thumb::before { content: ""; position: absolute; inset: -10px -6px; }
  .thumb img { display: none; }
  .thumb[aria-current="true"] { width: 24px; opacity: 1; }

  .buybox-sticky { position: static; padding-top: 0; }

  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature-reverse .feature-media { order: 0; }

  .shipping-grid { grid-template-columns: 1fr; }
  .return-grid { grid-template-columns: 1fr; }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(17, 17, 17, .06);
  }
  .mobile-bar-info { display: grid; line-height: 1.25; }
  .mobile-bar-qty { font-size: 12px; color: var(--ink-3); }
  .mobile-bar-total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .mobile-bar .btn { min-height: 50px; padding: 0 26px; flex: 0 0 auto; }

  /* miejsce na dolny pasek */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .icon-grid li { padding: 14px; gap: 10px; }
  .lead, .feature-text > p { font-size: 16px; }
  .price { font-size: 28px; }
  .card { padding: 22px; }
}

@media (hover: none) {
  .gallery-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html, .gallery-track { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
