/* ==========================================================================
   Product page (option 4 of the review): square photo with the thumbnails in a column
   beside it, the buying info, "take the whole corner", the story, similar products.
   ========================================================================== */

.pv4 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-11); align-items: start; }

/* ---- Gallery: thumbnails in a column + the big photo (crossfade) ---- */
.pv4-gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--space-3); }
.pv4-gallery:not(:has(.pv4-thumbs)) { grid-template-columns: minmax(0, 1fr); }
.pdp__stage .media { --ratio: 1; }
/* height 0 + min-height 100%: the column is exactly as tall as the photo and scrolls the rest */
.pv4-thumbs { display: grid; gap: var(--space-2); align-content: start; height: 0; min-height: 100%; overflow-y: auto; scrollbar-width: none; }
.pv4-thumbs::-webkit-scrollbar { display: none; }
.pdp__arrows {
  position: absolute;
  inset-inline: var(--space-4);
  top: 50%;
  z-index: var(--z-raised);
  display: flex;
  justify-content: space-between;
  translate: 0 -50%;
  pointer-events: none;   /* only the buttons catch clicks, not the strip between them */
}
.pdp__arrows .icon-btn { pointer-events: auto; }
.thumb { position: relative; border-radius: var(--radius-sm); opacity: .7; transition: opacity var(--duration-fast) var(--ease-out); }
.thumb::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; transition: border-color var(--duration-fast) var(--ease-out); }
.thumb:hover,
.thumb[aria-current="true"] { opacity: 1; }
.thumb[aria-current="true"]::after { border-color: var(--color-brown); }

/* ---- Info column ---- */
.pdp__info { display: grid; gap: var(--space-5); }
.pdp__cat { justify-self: start; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-accent); }
.pdp__title { margin-top: calc(-1 * var(--space-3)); font: var(--fw-black) var(--fs-2xl) / var(--lh-heading) var(--font-family); }
.pdp__lead { color: var(--color-text-muted); }
.pdp__price .price { font-size: var(--fs-xl); }
.pdp__vat { font-size: var(--fs-xs); color: var(--color-text-subtle); }

.pdp__stock { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-green); }
.pdp__stock::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: currentColor; }
.pdp__stock.is-out { color: var(--color-red); }

.pdp__buy { display: flex; gap: var(--space-3); }
.pdp__buy .btn { flex: 1; padding-inline: var(--space-3); }   /* the row is tight on phones: the label gets the room */
.pdp__buy .btn:disabled { opacity: .5; cursor: not-allowed; }

/* What you get with this order */
.pdp__perks { display: grid; gap: var(--space-3); font-size: var(--fs-sm); color: var(--color-text-muted); }
.pdp__perks li { display: flex; align-items: center; gap: var(--space-3); }
.pdp__perks .icon { flex-shrink: 0; color: var(--color-accent); }
.pdp__perks strong { color: var(--color-text); }
.pdp__sku { font-size: var(--fs-xs); color: var(--color-text-subtle); }

/* ---- Take the whole corner: pieces you tick, the total and one button ---- */
.pv4-bundle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.pv4-bundle__items { display: flex; align-items: center; gap: var(--space-4); }
.pv4-plus { font-size: var(--fs-2xl); font-weight: var(--fw-regular); color: var(--color-text-subtle); }
.pv4-item { position: relative; display: grid; flex: 1; align-content: start; gap: var(--space-2); max-width: 240px; cursor: pointer; transition: opacity var(--duration-fast) var(--ease-out); }
.pv4-item:has(input:not(:checked)) { opacity: .45; }
.pv4-item input { position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); z-index: var(--z-raised); width: 22px; height: 22px; margin: 0; accent-color: var(--color-brown); }
.pv4-item .product-card__meta { margin-top: var(--space-1); }
.pv4-item strong,
.pv4-item__name { font-weight: var(--fw-bold); }
.pv4-item__name:hover { color: var(--color-accent); }
.pv4-sum { display: grid; gap: var(--space-3); padding-inline-start: var(--space-8); border-inline-start: 1px solid var(--color-line); }
.pv4-sum__label { font-size: var(--fs-sm); color: var(--color-text-subtle); }
.pv4-sum .price { font-size: var(--fs-2xl); }
.pv4-sum__tamara { font-size: var(--fs-sm); color: var(--color-text-muted); }

/* ---- About the product: tabs (about, specifications, care, delivery), the made-to-order card beside them ---- */
.pdp-tabs { display: flex; gap: var(--space-8); border-bottom: 1px solid var(--color-line); overflow-x: auto; scrollbar-width: none; }
.pdp-tabs::-webkit-scrollbar { display: none; }
.pdp-tabs button {
  position: relative;
  padding-block: var(--space-4);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-text-subtle);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out);
}
.pdp-tabs button::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: transparent; transition: background var(--duration-fast) var(--ease-out); }
.pdp-tabs button:hover,
.pdp-tabs [aria-selected="true"] { color: var(--color-text); }
.pdp-tabs [aria-selected="true"]::after { background: var(--color-brown); }
.pdp-about__body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-11); align-items: start; padding-top: var(--space-8); }
.pdp-about__body:not(:has(.pdp__mto)) { grid-template-columns: minmax(0, 1fr); }
.pdp-tab { display: grid; gap: var(--space-4); }
.pdp-tab[hidden] { display: none; }
.pdp-tab__lead { font-size: var(--fs-md); line-height: 1.9; color: var(--color-text-muted); }
.pdp-tab .ck-content img { height: auto; border-radius: var(--radius-md); }

/* Features: a short list with check marks */
.pdp-checks { display: grid; gap: var(--space-3); margin-top: var(--space-1); }
.pdp-checks li { display: flex; align-items: center; gap: var(--space-3); font-weight: var(--fw-bold); }
.pdp-checks .icon { flex-shrink: 0; width: 26px; height: 26px; padding: 5px; border-radius: var(--radius-pill); background: var(--color-sand-soft); color: var(--color-accent); }

.pdp__mto { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); padding: var(--space-5); border-radius: var(--radius-md); background: var(--color-sand-soft); }
.pdp__mto .icon { --icon-size: 30px; grid-row: span 3; color: var(--color-accent); }
.pdp__mto h2 { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.pdp__mto p { font-size: var(--fs-sm); color: var(--color-text-muted); }
.pdp__mto .link { justify-self: start; margin-top: var(--space-2); font-size: var(--fs-sm); }

/* Specifications: name and value on one line each; two columns in the tab */
.specs { display: grid; font-size: var(--fs-sm); color: var(--color-text-muted); }
.specs div { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); border-bottom: 1px solid var(--color-line); }
.specs div:last-child { border-bottom: 0; }
.specs--2col { grid-template-columns: 1fr 1fr; column-gap: var(--space-8); }
.specs--2col div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.specs dd { max-width: 60%; font-weight: var(--fw-bold); color: var(--color-text); text-align: end; }

/* ---- Similar products ---- */
.related .rail { --rail-cols: 4; }

/* ---- Tablets: one column; the thumbnails go under the photo as a row ---- */
@media (max-width: 1024px) {
  .pv4,
  .pdp-about__body { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .pv4-gallery { grid-template-columns: minmax(0, 1fr); }
  .pv4-thumbs { order: 1; grid-auto-flow: column; grid-auto-columns: 64px; height: auto; min-height: 0; overflow-x: auto; }
  .pv4-bundle { grid-template-columns: minmax(0, 1fr); }
  .pv4-sum { padding-inline-start: 0; padding-top: var(--space-6); border-inline-start: 0; border-top: 1px solid var(--color-line); }
  .related .rail { --rail-cols: 2.5; }
}

/* ---- Phones: the pieces scroll sideways ---- */
@media (max-width: 640px) {
  .pdp__title { font-size: var(--fs-xl); }
  .pdp__arrows { display: none; }   /* the thumbnails do the job */
  .pdp-tabs { gap: var(--space-5); }
  .specs--2col { grid-template-columns: 1fr; }
  .specs--2col div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--color-line); }
  .pv4-bundle { padding: var(--space-5); }
  .pv4-bundle__items { overflow-x: auto; gap: var(--space-3); scrollbar-width: none; }
  .pv4-item { flex: 0 0 150px; }
  .pv4-plus { font-size: var(--fs-lg); }
  .related .rail { --rail-cols: 1.6; --rail-gap: var(--space-4); }
}

/* Small phones: the quantity, the add-to-cart label and the heart share one row, so the
   stepper narrows and the button drops its bag icon rather than spill past the screen */
@media (max-width: 420px) {
  .pdp__buy { gap: var(--space-2); }
  .pdp__buy .qty button { width: 34px; }
  .pdp__buy .btn .icon { display: none; }
}
