/* =========================================================
   ROBOTIMEDZ — Product page styles
   Loaded after main.css and reuses its tokens and components
   (buttons, .qty, .price, accordions, product cards, drawers).
   Mobile-first · single column below 1024px, two columns from 1024px.
   Logical properties only, so dir="rtl" works.
   ========================================================= */

.pdp-page { --pdp-max: 1480px; }
.pdp__container { max-width: var(--pdp-max); }

/* ---------- Layout ---------- */
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* ---------- Gallery ---------- */
.pdp-gallery { min-width: 0; margin-inline: calc(var(--gutter) * -1); }
.pdp-gallery__main { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
/* The small gap hides sub-pixel slivers of the neighbouring image */
.pdp-gallery__track { display: flex; gap: 6px; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pdp-gallery__track::-webkit-scrollbar { display: none; }
.pdp-gallery__track:focus-visible { outline-offset: -3px; }
.pdp-gallery__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.pdp-gallery__slide img, .pdp-gallery__slide video { width: 100%; height: 100%; object-fit: cover; }
.pdp-gallery__slide[data-media="image"] { cursor: zoom-in; }
.pdp-gallery__slide img { -webkit-user-drag: none; }

.pdp-badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.2; pointer-events: none; }
/* plaintext: "-16%" keeps its order in Arabic without flipping the badge's (RTL) position */
.pdp-badge--sale { background: var(--red); color: #fff; unicode-bidi: plaintext; }
.pdp-badge--oos { background: var(--ink); color: #fff; }
.pdp.is-oos .pdp-badge--sale { display: none; }

/* Zoom button, arrows and counter sit over the main image */
.pdp-gallery__zoom { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); transition: transform .25s var(--ease), background-color .2s; }
.pdp-gallery__zoom:hover { transform: scale(1.06); background: #fff; }
.pdp-gallery__zoom .icon { width: 21px; height: 21px; }
.pdp-gallery__arrow { position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); transition: opacity .2s, background-color .2s; }
.pdp-gallery__arrow:hover { background: #fff; }
.pdp-gallery__arrow:disabled { opacity: 0; pointer-events: none; }
.pdp-gallery__arrow .icon { width: 18px; height: 18px; }
.pdp-gallery__arrow--prev { inset-inline-start: 12px; }
.pdp-gallery__arrow--next { inset-inline-end: 12px; }
[dir="rtl"] .pdp-gallery__arrow .icon { transform: scaleX(-1); }
.pdp-gallery__count { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: rgba(17, 17, 17, .62); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }

/* Thumbnails: horizontal row on mobile, vertical column on desktop */
.pdp-gallery__thumbs-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--gutter) 2px; scrollbar-width: none; }
.pdp-gallery__thumbs-list::-webkit-scrollbar { display: none; }
.pdp-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--soft); opacity: .7; transition: opacity .2s; }
.pdp-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb:hover { opacity: 1; }
.pdp-thumb[aria-current="true"] { opacity: 1; }
.pdp-thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--ink); }
.pdp-thumb:focus-visible { outline-offset: -2px; }

/* ---------- Product information ---------- */
.pdp-info { min-width: 0; }
/* Long names (any product, EN/FR/AR) wrap naturally; very long words break instead of overflowing */
.pdp-title { font-size: 23px; font-weight: 700; line-height: 1.22; letter-spacing: -.015em; color: var(--ink); overflow-wrap: break-word; hyphens: auto; text-wrap: pretty; }
:lang(ar) .pdp-title { line-height: 1.45; letter-spacing: 0; }
.pdp-sku { margin-top: 6px; font-size: 13px; color: var(--muted); }

.pdp-price { margin-top: 14px; }
.pdp-price .price { margin-top: 0; align-items: center; column-gap: 10px; row-gap: 4px; }
.pdp-price .price__current { font-size: 24px; }
.pdp-price .price__compare { font-size: 16px; }
/* Not on sale (compare price hidden): keep the normal price colour, not the sale red */
.pdp-price .price__compare[hidden] + .price__current { color: var(--ink); }
.pdp-price__off { padding: 3px 8px; border-radius: 999px; background: #FBEAEA; color: var(--red); font-size: 13px; font-weight: 700; }
.pdp-price__note { margin-top: 4px; font-size: 13px; color: var(--muted); }
/* Keep amounts, "-16%" and "1 / 4" in reading order inside Arabic (RTL) text */
.pdp-price :is(.price__current, .price__compare, .pdp-price__off), .pdp-gallery__count, .lightbox__count { direction: ltr; unicode-bidi: isolate; }

.pdp-stock { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; font-weight: 600; color: #2E7D32; }
.pdp-stock__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(46, 125, 50, .15); }
.pdp-stock.is-low { color: #B26A00; }
.pdp-stock.is-low .pdp-stock__dot { box-shadow: 0 0 0 3px rgba(178, 106, 0, .15); }
.pdp-stock.is-out { color: var(--red); }
.pdp-stock.is-out .pdp-stock__dot { box-shadow: 0 0 0 3px rgba(187, 50, 44, .15); }

.pdp-summary { margin-top: 14px; font-size: 15px; line-height: 1.55; color: #333; }

/* Quick specs: 4 cells (2×2 on narrow phones) + a full-width Assembled Size row.
   The 1px gap over a --line background draws every separator, in any grid shape and in RTL. */
.pdp-facts { margin-top: 16px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--line); }
.pdp-facts__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
.pdp-facts li { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 12px 6px 10px; background: #fff; text-align: center; }
.pdp-facts .icon { width: 22px; height: 22px; margin-bottom: 4px; color: var(--red); }
/* plaintext: each value takes its own direction, so "12 h" / "14+" stay in order on Arabic pages
   while Arabic values (e.g. "متوسط") stay right-to-left */
.pdp-facts b { font-size: 16px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pdp-facts li > span { font-size: 12px; color: var(--muted); }
.pdp-facts__size { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 6px; row-gap: 2px; margin-top: 1px; padding: 11px 12px; background: #fff; font-size: 13.5px; color: var(--muted); text-align: center; }
.pdp-facts__size .icon { width: 20px; height: 20px; margin: 0; }
.pdp-facts__size [data-spec-label]::after { content: ":"; }
.pdp-facts__size b { font-size: 14px; unicode-bidi: isolate; }
.pdp-facts b.is-unknown { color: #9A9A9A; font-weight: 500; }
/* Difficulty: 3-star scale in place of the icon (product.js sets data-level 0–3) */
.pdp-stars { display: inline-flex; align-items: center; gap: 2px; height: 22px; margin-bottom: 4px; }
.pdp-stars svg { width: 18px; height: 18px; fill: #DADADA; }
.pdp-stars[data-level="1"] svg:nth-child(-n+1),
.pdp-stars[data-level="2"] svg:nth-child(-n+2),
.pdp-stars[data-level="3"] svg { fill: var(--red); }
@media (min-width: 480px) { .pdp-facts__row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Purchase controls */
.pdp-buy { margin-top: 20px; }
.pdp-buy__label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.pdp-buy__row { display: flex; gap: 10px; }
.pdp-qty { flex: none; height: 50px; border-radius: 999px; overflow: hidden; }
.pdp-qty button { width: 42px; transition: background-color .2s, opacity .2s; }
.pdp-qty button:hover:not(:disabled) { background: var(--soft-2); }
.pdp-qty button:disabled { opacity: .35; cursor: not-allowed; }
.pdp-qty input { width: 36px; }
.pdp-qty input:disabled { color: var(--muted); background: transparent; }
.pdp-add { flex: 1; min-width: 0; min-height: 50px; padding-inline: 18px; font-size: 16px; font-weight: 600; }
.pdp-add .icon { width: 19px; height: 19px; }
.pdp-add.is-added { background: #2E7D32; }
/* Out of stock: clearly disabled, never looks clickable */
.pdp-add:disabled { background: #E4E4E4; color: #7A7A7A; cursor: not-allowed; transform: none; }
.pdp-add:disabled .icon { display: none; }

.pdp-wish { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 10px; border: 1px solid #D6D6D6; border-radius: 999px; font-size: 15px; font-weight: 500; transition: border-color .2s, color .2s; }
.pdp-wish:hover { border-color: var(--ink); }
.pdp-wish .icon { width: 19px; height: 19px; }
.pdp-wish__on { display: none; }
.pdp-wish[aria-pressed="true"] { color: var(--red); border-color: var(--red); }
.pdp-wish[aria-pressed="true"] path { fill: currentColor; }
.pdp-wish[aria-pressed="true"] .pdp-wish__off { display: none; }
.pdp-wish[aria-pressed="true"] .pdp-wish__on { display: inline; }
.pdp-wish.pop .icon { animation: bump .4s var(--ease); }

/* Delivery / payment reassurance */
.pdp-service { display: grid; gap: 12px; margin-top: 20px; padding: 16px; background: var(--soft); border-radius: 6px; }
.pdp-service li { display: flex; align-items: flex-start; gap: 12px; }
.pdp-service .icon { width: 22px; height: 22px; margin-top: 1px; color: var(--red); }
.pdp-service b { display: block; font-size: 14px; color: var(--ink); }
.pdp-service span { display: block; font-size: 13px; line-height: 1.4; color: #555; }

/* Accordions (behaviour from main.js [data-accordion]) */
.pdp-accs { margin-top: 20px; border-top: 1px solid var(--line); }
.pdp-acc { border-bottom: 1px solid var(--line); }
.pdp-acc__toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px; padding-block: 10px; font-size: 15px; font-weight: 600; text-align: start; color: var(--ink); }
.pdp-acc__body { padding-block-end: 16px; font-size: 14px; line-height: 1.55; color: #333; }
.pdp-acc__body p + p { margin-top: 8px; }
/* Optional assembly-manual button under the "Assembly & Care" text (only when the product has a PDF) */
.pdp-manual { margin-top: 12px; }
.pdp-list { display: grid; gap: 6px; margin-top: 10px; padding-inline-start: 18px; list-style: disc; }
.pdp-specs { display: grid; margin: 0; }
.pdp-specs div { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; border-bottom: 1px dashed var(--line); }
.pdp-specs div:last-child { border-bottom: 0; }
.pdp-specs dt { color: var(--muted); }
.pdp-specs dd { margin: 0; font-weight: 600; text-align: end; }
/* Difficulty in the Specifications table: filled stars red, empty ones grey */
.pdp-specs__stars { color: #DADADA; letter-spacing: 1px; }
.pdp-specs__stars b { color: var(--red); font-weight: inherit; }

/* ---------- Content blocks (future CMS blocks) ---------- */
.pdp-content { margin-top: calc(var(--section-y) + 8px); padding-block: 8px 0; border-top: 1px solid var(--line); }
.pdp-content__inner { max-width: 1200px; }
.block { margin-top: 28px; }
.block__title { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.block--heading { margin-top: 40px; text-align: center; }
.block--heading:first-child { margin-top: 32px; }
.block--heading + .block { margin-top: 18px; }
.block--text { max-width: 76ch; margin-inline: auto; font-size: 15px; line-height: 1.65; color: #333; }
.block--text p + p { margin-top: 12px; }
.block--manual { text-align: center; }
.block--manual .btn { margin-top: 16px; }
.block--image { margin-inline: calc(var(--gutter) * -1); }
.block--image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.block--cards { display: grid; gap: 22px; }
.block-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.block-card h3 { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.block-card p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: #444; }

.block--media-text { display: grid; gap: 16px; align-items: center; }
.block__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.block__body p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: #333; }

.block--features { display: grid; gap: 18px; padding: 22px 18px; background: #FBF6F1; border-radius: 6px; }
.block-feature { display: flex; align-items: flex-start; gap: 14px; }
.block-feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--red); flex: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); }
.block-feature__icon .icon { width: 22px; height: 22px; }
.block-feature h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.block-feature p { margin-top: 3px; font-size: 14px; line-height: 1.45; color: #555; }

.block--gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.block--gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.block--gallery figcaption { margin-top: 8px; font-size: 13px; font-weight: 600; color: #333; }

.block--video video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; }
.block--video figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Description blocks from MySQL (product.js → renderBlocks) ---------- */
.pdp-blocks .block--media-text .block__media img,
.pdp-blocks .block--gallery img { aspect-ratio: 4 / 5; }                       /* product photos are portrait */
.pdp-blocks .block--media-text .block__media.is-natural img,
.pdp-blocks .block--gallery .is-natural img { height: auto; }   /* square/landscape originals: never cropped (ratio set inline by product.js) */
.pdp-blocks .block--gallery.is-contain img { aspect-ratio: auto; height: auto; object-fit: contain; background: #F7F7F7; } /* packaging: never cropped */
.pdp-blocks .block__media figcaption, .pdp-blocks .block--gallery figcaption { margin-top: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.pdp-blocks .block--gallery[data-count="3"] > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* phones: 2 + 1 full width */
.pdp-blocks .block--gallery[data-count="3"] > :last-child:nth-child(odd) img { aspect-ratio: 4 / 3; }
@media (max-width: 767px) {   /* phones: box photos (front/back) stacked full width so the text stays readable */
  .pdp-blocks [data-block="packaging"] .block--gallery:not(.is-contain) { grid-template-columns: 1fr; }
}
/* LK703C: per-image framing (matched by file name, so no other product is affected).
   Infographics / box contents: always shown whole. Tall photos: keep the subject centred. */
img[src$="/lk703c-function-details.webp"],
img[src$="/lk703c-inner-packaging.webp"],
img[src$="/lk703c-typing-steps.webp"] { object-fit: contain; background: #F7F7F7; }
img[src$="/lk703c-desk-lifestyle.webp"] { object-position: 50% 88%; }
img[src$="/lk703c-keyboard.webp"] { object-position: 50% 60%; }
img[src$="/lk703c-carriage-detail.webp"] { object-position: 50% 45%; }
img[src$="/lk703c-side-mechanism.webp"] { object-position: 50% 42%; }
/* MCB02: tall photos keep the ship in frame; feature panels (text inside the image) are shown whole, portrait. */
img[src$="/mcb02-desk-display.webp"] { object-position: 50% 80%; }
img[src$="/mcb02-book-display.webp"] { object-position: 50% 90%; }
img[src$="/mcb02-hull-assembly.webp"],
img[src$="/mcb02-rigging-display.webp"],
img[src$="/mcb02-sails-collage.webp"] { object-position: 50% 100%; }
.pdp-blocks .pdp-block img[src$="/mcb02-feature-sails.webp"] { aspect-ratio: 1242 / 2063; height: auto; }
.pdp-blocks .pdp-block img[src$="/mcb02-feature-cannons.webp"] { aspect-ratio: 1242 / 2192; height: auto; }
.pdp-blocks .pdp-block img[src$="/mcb02-feature-control.webp"] { aspect-ratio: 1242 / 2067; height: auto; }
.pdp-blocks .pdp-block img[src$="/mcb02-feature-details.webp"] { aspect-ratio: 1242 / 2606; height: auto; }
.pdp-blocks .block--specs { max-width: 620px; margin-inline: auto; }
/* Image cards row (blocks with layout "cards") */
.pdp-blocks .block-card figure { margin: 0; }
.pdp-blocks .block-card p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: #444; }
/* Illustrative (AI-generated) images carry a small label so they are never mistaken for product photos */
.pdp-blocks figure.is-illustration { position: relative; }
.media-label { position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(17, 17, 17, .62); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em; pointer-events: none; }
/* YouTube block: full content width (up to the 1200px description column), 16:9 */
.block--video { max-width: none; margin-inline: auto; }
.block--video iframe, .yt-facade { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: #000; }
.yt-facade { position: relative; overflow: hidden; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s; }
.yt-facade__play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-facade__play svg { width: 68px; height: 48px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); transition: transform .2s var(--ease); }
.yt-facade:hover img { opacity: 1; }
.yt-facade:hover .yt-facade__play svg { transform: scale(1.08); }
.yt-facade:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
@media (min-width: 768px) { .yt-facade__play svg { width: 88px; height: 62px; } }

/* ---------- Reviews (minimal) / FAQ / Related ---------- */
.pdp-reviews__box { max-width: 880px; margin-inline: auto; padding: 22px 20px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.pdp-reviews__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.pdp-reviews__box p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.pdp-faq__inner { max-width: 880px; }
.pdp-faq__list { margin-top: 14px; }
.pdp-related__title { margin-bottom: 18px; }

/* ---------- Large phones / small tablets: stop the square image from filling the whole screen ---------- */
/* 767.98px (not 767px) so fractional viewport widths such as 767.2px are still covered */
@media (min-width: 560px) and (max-width: 767.98px) {
  .pdp-gallery { max-width: 560px; margin-inline: auto; }
  .pdp-gallery__main { border-radius: 6px; }
  .pdp-gallery__thumbs-list { padding-inline: 0; }
}

/* ---------- Tablet (single column, centred) ---------- */
@media (min-width: 768px) {
  .pdp__grid { gap: 28px; }
  .pdp-gallery, .pdp-info { width: 100%; max-width: 640px; margin-inline: auto; }
  .pdp-gallery__main { border-radius: 6px; }
  .pdp-gallery__thumbs-list { padding-inline: 0; }
  .pdp-gallery__arrow { display: grid; }
  .pdp-title { font-size: 28px; }
  .pdp-price .price__current { font-size: 26px; }
  .block { margin-top: 36px; }
  .block__title { font-size: 26px; }
  .block--heading { margin-top: 56px; }
  .block--image { margin-inline: 0; }
  .block--image img { aspect-ratio: 16 / 9; border-radius: 6px; }
  .block--cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .block--media-text { grid-template-columns: 1fr 1fr; gap: 36px; }
  .block--reverse .block__media { order: 2; }
  .block--features { grid-template-columns: 1fr 1fr; gap: 22px 28px; padding: 28px; }
  .block--gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .pdp-blocks .block--gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-inline: auto; }
  .pdp-blocks .block--gallery[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
  .pdp-blocks .block--gallery[data-count="3"] > :last-child:nth-child(odd) { grid-column: auto; }
  .pdp-blocks .block--gallery[data-count="3"] > :last-child:nth-child(odd) img { aspect-ratio: 4 / 5; }
}

/* ---------- Desktop (two columns, sticky gallery) ---------- */
@media (min-width: 1024px) {
  .breadcrumb { padding-block: 16px 20px; }
  .pdp__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .pdp-gallery, .pdp-info { max-width: none; margin-inline: 0; }
  /* The gallery stays visible while the info column scrolls.
     top = sticky header height + breathing room, so it never slides under the header. */
  .pdp-gallery { position: sticky; top: calc(var(--header-h) + 20px); display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; }
  .pdp-gallery__main { grid-column: 2; grid-row: 1; width: 100%; max-width: calc(100svh - var(--header-h) - 48px); }
  /* Thumbnail column matches the main image height and scrolls on its own */
  .pdp-gallery__thumbs { grid-column: 1; grid-row: 1; position: relative; align-self: stretch; }
  .pdp-gallery__thumbs-list { position: absolute; inset: 0; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 0; }
  .pdp-thumb { width: 72px; height: 72px; }
  /* Single-image products (no thumbnail column): let the image use the full width */
  .pdp-gallery:has(> .pdp-gallery__thumbs[hidden]) .pdp-gallery__main { grid-column: 1 / -1; }
  .pdp-gallery__count { display: none; }
  .pdp-title { font-size: 30px; }
  .block--features { grid-template-columns: repeat(4, 1fr); }
  .block-feature { flex-direction: column; align-items: center; text-align: center; }
}
@media (min-width: 1200px) {
  .pdp__grid { gap: 64px; }
  .pdp-gallery { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; }
  .pdp-thumb { width: 80px; height: 80px; }
  .pdp-title { font-size: 32px; }
  .block__title { font-size: 30px; }
  .block--cards { gap: 28px; }
  .block-card h3 { font-size: 18px; }
  .block--media-text { gap: 56px; }
  .block__body p { font-size: 16px; }
}
/* Very short desktop windows: sticky would hide part of the gallery, so let it scroll */
@media (min-width: 1024px) and (max-height: 560px) {
  .pdp-gallery { position: static; }
}

/* ---------- Lightbox (zoomable image viewer) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 140; background: #FAFAFA; animation: fadeIn .25s; overscroll-behavior: contain; }
.lightbox__count { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); inset-inline: 0; z-index: 2; text-align: center; font-size: 14px; font-weight: 600; color: #444; font-variant-numeric: tabular-nums; pointer-events: none; }
.lightbox__stage { position: absolute; inset: 52px 0 108px; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; transition: transform .28s var(--ease); cursor: zoom-in; -webkit-user-drag: none; will-change: transform; }
.lightbox.is-zoomed .lightbox__img { cursor: grab; }
.lightbox.is-gesturing .lightbox__img { transition: none; cursor: grabbing; }
.lightbox__bar { position: absolute; inset-inline: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lightbox__btn { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 3px 14px rgba(0, 0, 0, .12); transition: transform .2s var(--ease), opacity .2s; }
.lightbox__btn:hover:not(:disabled) { transform: scale(1.06); }
.lightbox__btn:disabled { opacity: .35; cursor: default; }
.lightbox__btn .icon { width: 22px; height: 22px; }
.lightbox__btn--sm { width: 44px; height: 44px; }
.lightbox__btn--sm .icon { width: 19px; height: 19px; }
.lightbox__btn--close { width: 60px; height: 60px; }
.lightbox__btn--close .icon { width: 26px; height: 26px; }
[dir="rtl"] :is([data-lb-prev], [data-lb-next]) .icon { transform: scaleX(-1); }
@media (min-width: 768px) {
  .lightbox__stage { inset: 60px 24px 116px; }
  .lightbox__bar { gap: 14px; }
}

/* ---------- Loading / not available (product.js, before api/product.php answers) ---------- */
.pdp-status__inner { min-height: 50vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding-block: 48px; text-align: center; }
.pdp-status__loading { font-size: 15px; color: var(--muted); }
.pdp-status__error { display: grid; justify-items: center; gap: 12px; max-width: 46ch; }
.pdp-status__error[hidden] { display: none; }
.pdp-status__title { font-size: 22px; font-weight: 700; color: var(--ink); }
.pdp-status__text { font-size: 15px; line-height: 1.55; color: #444; }
.pdp-status[hidden] { display: none; }

