/* Karta produktu — przeniesione z Layout V3, poprawki na dole pliku */
/* —— PDP-specific —— */
    .breadcrumb {
      padding: 22px var(--pad-x) 0;
      display: flex; align-items: center; gap: 14px;
      font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase;
      color: var(--mute);
    }
    .breadcrumb a { color: var(--mute); transition: color 0.3s; }
    .breadcrumb a:hover { color: var(--ink); }
    .breadcrumb .sep { color: var(--line); }

    .pdp {
      display: grid;
      grid-template-columns: 1fr minmax(420px, 520px);
      gap: clamp(40px, 5vw, 96px);
      padding: 36px var(--pad-x) clamp(80px, 9vw, 140px);
      align-items: start;
    }

    /* Gallery */
    .gallery { display: grid; gap: 8px; }
    .gallery__main {
      position: relative;
      background: var(--paper-warm);
      aspect-ratio: 4 / 5;
      overflow: hidden;
    }
    .gallery__main img { width: 100%; height: 100%; object-fit: cover; }
    .gallery__no {
      position: absolute; top: 28px; left: 28px;
      font-size: 10.5px; letter-spacing: 0.32em; text-transform: uppercase;
      color: var(--ink); background: rgba(255,255,255,0.85);
      padding: 8px 12px;
    }
    .gallery__chip {
      position: absolute; top: 28px; right: 28px;
      font-family: var(--serif); font-style: italic;
      font-size: 13px; color: var(--ink);
      background: rgba(255,255,255,0.85); padding: 7px 12px;
    }
    .gallery__pager {
      position: absolute; bottom: 28px; right: 28px;
      display: flex; align-items: center; gap: 14px;
      font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase;
      color: var(--ink); background: rgba(255,255,255,0.85);
      padding: 9px 14px;
    }
    .gallery__pager .btn-icon {
      width: 22px; height: 22px;
      border: 1px solid var(--line); display: inline-flex;
      align-items: center; justify-content: center; cursor: pointer;
      transition: background 0.3s, color 0.3s;
    }
    .gallery__pager .btn-icon:hover { background: var(--ink); color: var(--paper); }
    .gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
    .gallery__thumb {
      aspect-ratio: 1 / 1;
      background: var(--paper-warm);
      overflow: hidden; cursor: pointer; position: relative;
      border: 1px solid transparent;
      transition: border-color 0.3s;
    }
    .gallery__thumb.is-active { border-color: var(--ink); }
    .gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

    /* Info column */
    .info { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
    .info__head .eyebrow { display: block; margin-bottom: 14px; }
    .info__title {
      font-family: var(--sans); font-weight: 200;
      font-size: clamp(32px, 3vw, 46px);
      line-height: 1.04; letter-spacing: 0.06em; text-transform: uppercase;
      margin: 0;
    }
    .info__italic {
      font-family: var(--serif); font-style: italic; font-weight: 400;
      font-size: clamp(20px, 1.9vw, 26px);
      color: var(--ink-soft); margin: 10px 0 0;
    }

    .price-row {
      display: flex; align-items: baseline; justify-content: space-between;
      gap: 16px; padding: 22px 0;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }
    .price { font-family: var(--sans); font-weight: 300; font-size: 30px; letter-spacing: 0.04em; }
    .price small { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--mute); margin-left: 10px; }
    .stock { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mute); }
    .stock .dot { width: 6px; height: 6px; background: #4f9d6c; border-radius: 50%; }

    .desc { color: var(--ink-soft); font-size: 15px; line-height: 1.7; max-width: 46ch; }

    /* Dedykacja */
    .opt-block { display: grid; gap: 14px; padding-top: 8px; }
    .opt-label {
      display: flex; justify-content: space-between; align-items: baseline;
      font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase;
      color: var(--ink);
    }
    .opt-label .val { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--mute); letter-spacing: 0; }
    .dedication {
      display: grid; gap: 12px; padding: 22px;
      background: var(--paper); border: 1px solid var(--line);
    }
    .dedication textarea {
      width: 100%; min-height: 96px;
      border: none; background: transparent;
      font-family: var(--serif); font-style: italic;
      font-size: 16px; line-height: 1.5; color: var(--ink);
      resize: vertical;
    }
    .dedication textarea:focus { outline: none; }
    .dedication textarea::placeholder { color: var(--mute); }
    .dedication__foot {
      display: flex; justify-content: space-between; align-items: center;
      font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
      color: var(--mute); padding-top: 10px; border-top: 1px solid var(--line);
    }

    /* CTA */
    .cta-row { display: flex; gap: 12px; align-items: stretch; }
    .qty { display: inline-flex; align-items: stretch; border: 1px solid var(--ink); }
    .qty button { width: 48px; background: transparent; border: none; font-size: 16px; cursor: pointer; color: var(--ink); }
    .qty input { width: 44px; text-align: center; border: none; font-family: var(--sans); font-size: 14px; }
    .qty input:focus { outline: none; }
    .qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .add-cart {
      flex: 1;
      background: var(--ink); color: var(--paper);
      border: 1px solid var(--ink);
      font-family: var(--sans); font-weight: 400;
      font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
      cursor: pointer; transition: background 0.3s ease;
      display: inline-flex; align-items: center; justify-content: center; gap: 16px;
    }
    .add-cart .price-pill { padding-left: 16px; border-left: 1px solid rgba(250,248,244,0.3); }
    .add-cart:hover { background: var(--gold); border-color: var(--gold); }
    .icon-btn {
      width: 56px; border: 1px solid var(--ink);
      background: transparent; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
      transition: background 0.3s, color 0.3s;
    }
    .icon-btn:hover { background: var(--ink); color: var(--paper); }

    .service-notes { display: grid; gap: 14px; padding: 22px 0 0; }
    .service-notes li {
      list-style: none; display: flex; gap: 14px; align-items: flex-start;
      font-size: 13px; color: var(--ink-soft);
    }
    .service-notes li svg { flex-shrink: 0; margin-top: 4px; color: var(--gold); }

    /* Composition */
    .compo { padding: clamp(60px, 7vw, 100px) var(--pad-x); background: var(--paper); }
    .compo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
    .compo .h2 { max-width: 14ch; }
    .compo__lede { max-width: 36ch; }
    .compo-items { display: grid; gap: 0; }
    .compo-item {
      display: grid; grid-template-columns: 60px 110px 1fr auto;
      gap: 24px; align-items: center; padding: 22px 0;
      border-top: 1px solid var(--line);
    }
    .compo-item:last-child { border-bottom: 1px solid var(--line); }
    .compo-item__no { font-size: 10.5px; letter-spacing: 0.32em; color: var(--gold); }
    .compo-item__media { aspect-ratio: 1 / 1; background: var(--pure); overflow: hidden; }
    .compo-item__media img { width: 100%; height: 100%; object-fit: cover; }
    .compo-item__name { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
    .compo-item__desc { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
    .compo-item__qty {
      font-family: var(--sans); font-weight: 300;
      font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
    }

    /* Specs */
    .specs { padding: clamp(60px, 7vw, 100px) var(--pad-x); }
    .specs-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(48px, 7vw, 100px); align-items: start; }
    .specs-aside { display: grid; gap: 16px; }
    .specs-aside .eyebrow { display: inline-flex; align-items: center; gap: 14px; }
    .specs-aside .num {
      font-family: var(--serif); font-style: italic; font-weight: 400;
      font-size: clamp(48px, 5vw, 76px); line-height: 1; color: var(--gold); margin: 10px 0 0;
    }
    .specs-aside h2 {
      font-family: var(--sans); font-weight: 200;
      font-size: clamp(26px, 2.6vw, 38px);
      line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase;
      margin: 8px 0 0; max-width: 14ch;
    }
    .specs-aside p { margin: 0; font-size: 13.5px; color: var(--mute); line-height: 1.6; max-width: 30ch; }
    .specs dl { margin: 0; display: grid; gap: 0; }
    .specs dl > div {
      display: grid; grid-template-columns: 200px 1fr;
      gap: 32px; padding: 18px 0;
      border-top: 1px solid var(--line);
      font-size: 14px;
    }
    .specs dl > div:last-child { border-bottom: 1px solid var(--line); }
    .specs dt { font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mute); }
    .specs dd { margin: 0; color: var(--ink-soft); }

    /* Related */
    .related-head {
      padding: 0 var(--pad-x);
      display: flex; justify-content: space-between; align-items: end;
      margin-bottom: 56px;
    }
    .related-grid {
      padding: 0 var(--pad-x);
      display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 48px);
    }
    .related-grid .p-card__media { aspect-ratio: 4 / 5; }

    @media (max-width: 1024px) {
      .pdp { grid-template-columns: 1fr; }
      .info { position: static; }
      .compo-grid, .specs-grid { grid-template-columns: 1fr; gap: 32px; }
      .compo-item { grid-template-columns: 40px 80px 1fr auto; gap: 16px; }
      .specs dl > div { grid-template-columns: 1fr; gap: 6px; }
      .related-grid { grid-template-columns: 1fr; }
      .related-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    }

/* ————————————————— Poprawki motywu ————————————————— */
.gallery__main { cursor: zoom-in; }
.gallery__main > img { position: absolute; inset: 0; transition: opacity .6s var(--ease), transform 2s var(--ease-out); }
.gallery__main > img.is-swapping { opacity: 0; }
.gallery__no, .gallery__chip, .gallery__pager { z-index: 2; }
.gallery__pager .btn-icon { background: transparent; font: inherit; color: inherit; padding: 0; }
.gallery__thumbs { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.gallery__thumb { padding: 0; }
.gallery__thumb img { transition: transform .8s var(--ease), opacity .4s; opacity: .7; }
.gallery__thumb:hover img, .gallery__thumb.is-active img { opacity: 1; }
.gallery__thumb:hover img { transform: scale(1.06); }

.info__title { overflow-wrap: anywhere; max-width: 12ch; }
.desc p { margin: 0 0 .8em; }
.desc p:last-child { margin: 0; }
.stock.is-out .dot { background: var(--danger); }
.stock.is-low .dot { background: var(--gold); }
.pp-buy { display: grid; gap: 28px; }
.opt-label label { cursor: pointer; }
.dedication { transition: border-color .4s ease, box-shadow .4s ease; }
.dedication:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(173,138,74,.1); }
.dedication__count.is-near { color: var(--gold); }
.dedication__count.is-full { color: var(--danger); }
.qty button { display: inline-flex; align-items: center; justify-content: center; transition: background .3s, color .3s; }
.qty button:hover { background: var(--ink); color: var(--paper); }
.qty input { -moz-appearance: textfield; background: transparent; color: var(--ink); }
.add-cart { position: relative; min-height: 50px; padding: 0 18px; overflow: hidden; }
.add-cart__label { transition: opacity .3s; }
.add-cart.is-loading { pointer-events: none; }
.add-cart.is-loading .add-cart__label { opacity: .35; }
.add-cart.is-loading::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 40%; background: var(--gold-soft); animation: pp-load 1s ease-in-out infinite; }
@keyframes pp-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.add-cart.is-added { background: var(--gold); border-color: var(--gold); }
.add-cart[disabled] { background: var(--mute); border-color: var(--mute); cursor: not-allowed; }
.service-notes { margin: 0; padding-left: 0; }
.pp-buy--native .quantity input { width: 70px; }

.compo-item__name a { border-bottom: 1px solid var(--gold-soft); transition: color .3s; }
.compo-item__name a:hover { color: var(--gold); }
.compo-item__media { cursor: zoom-in; }
.compo-item__media img { transition: transform 1.2s var(--ease); }
.compo-item:hover .compo-item__media img { transform: scale(1.08); }
.compo .h2 { max-width: 16ch; }
.compo .eyebrow { display: inline-flex; align-items: center; }

.specs--story { padding-bottom: 0; }
.specs--story .prose__inner { margin: 0; }
.related { padding: clamp(60px,6vw,100px) 0 clamp(80px,9vw,140px); background: var(--paper); }

/* Mapa wkładki */
.insert-map { margin: 44px 0 0; display: grid; gap: 14px; max-width: 340px; }
.insert-map__box { position: relative; aspect-ratio: 1; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(13,12,10,.45); }
.insert-map__grid { position: absolute; inset: 8%; display: grid; gap: 5%; }
.insert-map__slot { background: #1d1b18; box-shadow: inset 0 2px 8px rgba(0,0,0,.7); position: relative; overflow: hidden; }
.insert-map__slot img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .4s, transform 1s var(--ease); }
.insert-map__slot:hover img { opacity: 1; transform: scale(1.06); }
.insert-map__slot span { position: absolute; left: 6px; top: 5px; font-size: 9px; letter-spacing: .2em; color: var(--gold-pale); text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.insert-map__cap { font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--mute); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 190; background: rgba(13,12,10,.94); display: grid; place-items: center; opacity: 0; transition: opacity .5s var(--ease); }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; transform: scale(.96); transition: transform .8s var(--ease-out), opacity .4s; }
.lightbox.is-open img { transform: none; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--paper); cursor: pointer; padding: 18px; font-size: 30px; font-weight: 200; line-height: 1; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }

/* Pasek zakupu na telefonie */
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: none; grid-template-columns: 1fr auto; gap: 16px; align-items: center; transform: translateY(110%); transition: transform .6s var(--ease-out); }
.sticky-buy.is-on { transform: none; }
.sticky-buy__name { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
.sticky-buy__price { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--mute); }
.sticky-buy .btn { padding: 14px 20px; }

@media (max-width: 1024px) {
  .sticky-buy { display: grid; }
  .pdp { padding-top: 20px; }
  .info__title { max-width: none; }
  .insert-map { max-width: 300px; }
}
@media (max-width: 560px) {
  .cta-row { flex-wrap: wrap; }
  .add-cart { flex: 1 1 100%; min-height: 54px; }
  .qty { flex: 1; justify-content: space-between; height: 50px; }
  .compo-item { grid-template-columns: 72px 1fr auto; gap: 16px; }
  .compo-item__no { display: none; }
  .gallery__no { top: 16px; left: 16px; font-size: 9px; }
  .gallery__chip { top: 16px; right: 16px; }
  .gallery__pager { bottom: 16px; right: 16px; }
  .specs dl > div { gap: 4px; }
}

/* ————————————————— Układ 50/50: zdjęcie zawsze w oknie ————————————————— */
@media (min-width: 1025px) {
  .pdp {
    --thumbs-h: 96px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 110px);
    align-items: start;
  }
  /* Kwadratowe zdjęcie: bok = mniejsze z (szerokość kolumny, wysokość okna − nagłówek − miniatury). */
  .gallery {
    position: sticky; top: calc(var(--nav-h) + 16px);
    width: min(100%, calc(100svh - var(--nav-h) - var(--thumbs-h) - 120px));
    justify-self: end;
  }
  .gallery__main { aspect-ratio: 1 / 1; }
  .gallery__thumbs { grid-template-columns: repeat(6, 1fr); }
  .info { max-width: 640px; top: calc(var(--nav-h) + 16px); }
}
.gallery__main { --mask-bg: var(--pure); }
/* Zdjęcie główne pojawia się szybko — bez długiej kurtyny, tylko krótkie przenikanie. */
html.js .gallery__main[data-reveal="mask"]::after { transition-duration: .7s; }
html.js .gallery__main[data-reveal="mask"] > img { --ms: 1.04; transition-duration: 1s; }
