/* ==========================================================================
   MASOUN — Product page (single product)
   WP: single-product.php / woocommerce/content-single-product.php
   ========================================================================== */

/* ------------------------------------------------------------ Buy box ---- */
.pdp { padding-bottom: clamp(64px, 9vw, 120px); }
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.pdp__grid > * { min-width: 0; }
@media (min-width: 1000px) {
  .pdp__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(48px, 5vw, 88px); align-items: start; }
  .pdp__gallery { position: sticky; top: calc(var(--header-h) + 46px + 20px); }
}

/* Gallery */
.gallery { position: relative; }
.gallery__stage { position: relative; margin-inline: calc(var(--gutter) * -1); }
@media (min-width: 1000px) { .gallery__stage { margin-inline: 0; } }
.gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track { transition: opacity .3s var(--ease); }
.gallery__track.is-fading { opacity: 0; }
.gallery__slide {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #F3F4F1;
  cursor: zoom-in;
}
@media (min-width: 1000px) {
  .gallery__slide { aspect-ratio: 1 / 1; max-height: calc(100svh - var(--header-h) - 46px - 150px); width: 100%; }
}
.gallery__slide > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out), opacity .6s var(--ease);
  transform-origin: var(--zx, 50%) var(--zy, 50%);
}
.gallery__slide--studio > img { object-fit: contain; }
.gallery__slide.is-zooming > img { transform: scale(1.9); }
.gallery__slide.is-fading > img { opacity: 0; }


.gallery__slide--film {
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 20%, #3A2618 0%, #1A1714 60%, #0E0C0A 100%);
  color: var(--c-ivory);
  cursor: pointer;
}
.gallery__slide--film > img { opacity: .55; }
.gallery__play {
  position: relative; z-index: 2;
  display: grid; justify-items: center; gap: 14px;
  font-size: 13px;
}
.gallery__play span:first-child {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border: 1px solid rgba(243, 236, 223, .6);
  border-radius: 50%;
  background: rgba(14, 12, 10, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .8s var(--ease-out);
}
.gallery__slide--film:hover .gallery__play span:first-child { transform: scale(1.08); }

.gallery__hud {
  position: absolute; inset-inline: 16px; bottom: 16px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.gallery__count {
  font-family: var(--f-ui-la); font-size: 11px; letter-spacing: .2em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(14, 12, 10, .55); color: var(--c-ivory);
  direction: ltr;
}
.gallery__zoom {
  pointer-events: auto;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(14, 12, 10, .55); color: var(--c-ivory);
}
.gallery__arrows { display: none; }
@media (min-width: 1000px) {
  .gallery__arrows {
    position: absolute; inset-inline: 16px; top: 50%; z-index: 3;
    display: flex; justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0; transition: opacity .5s var(--ease);
  }
  .gallery__stage:hover .gallery__arrows { opacity: 1; }
  .gallery__arrows .rail-btn { pointer-events: auto; background: rgba(243, 236, 223, .85); border-color: transparent; color: var(--c-onyx); }
}
.gallery__thumbs {
  display: flex; gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
  position: relative;
  flex: 0 0 64px; height: 64px;
  overflow: hidden;
  background: #F3F4F1;
  opacity: .55;
  transition: opacity .4s var(--ease);
}
.gallery__thumb::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.gallery__thumb[aria-current="true"] { opacity: 1; }
.gallery__thumb[aria-current="true"]::after { border-color: var(--c-onyx); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb--dark { background: var(--c-coal); display: grid; place-items: center; color: var(--c-ivory); font-size: 10px; }
@media (min-width: 1000px) { .gallery__thumb { flex-basis: 76px; height: 76px; } }

/* Info column */
.pdp-info .eyebrow { margin-bottom: 14px; }
.pdp-title { font-size: clamp(36px, 5vw, 58px); line-height: 1.2; }
html[lang="en"] .pdp-title { line-height: 1.05; }
.pdp-rating { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--c-text-mute); }
.pdp-rating:hover { color: var(--c-text); }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; }
.pdp-price .price { font-size: 30px; }
.pdp-price__note { font-size: 12.5px; color: var(--c-text-mute); }
.pdp-lead { margin-top: 22px; color: var(--c-text-soft); max-width: 52ch; }

.pdp-opt { padding-block: 22px; border-top: 1px solid var(--line-light); }
.pdp-opt:first-of-type { margin-top: 28px; }
.pdp-opt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: 14px; }
.pdp-opt__head span { color: var(--c-text-mute); font-size: 13px; }
.pdp-opt .swatch { width: 34px; height: 34px; }

/* Quick order (cash on delivery) */
.order {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 28px);
  background: rgba(255, 255, 255, .45);
  border: 1px solid var(--line-light);
  display: grid; gap: 16px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.order__title { font-size: clamp(24px, 2.6vw, 30px); }
.order__sub { font-size: 13.5px; color: var(--c-text-mute); margin-top: 4px; }
.order__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.order__total { display: grid; justify-items: end; line-height: 1.4; font-size: 12.5px; color: var(--c-text-mute); }
.order__total .price { font-size: 22px; color: var(--c-text); }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; color: var(--c-text-soft); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: var(--c-ivory);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--c-onyx);
  outline: none;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.field__input:focus { border-color: var(--c-cognac); box-shadow: 0 0 0 3px rgba(107, 68, 41, .12); }
.field__input[aria-invalid="true"] { border-color: #A3412E; }
.field__input[dir="ltr"] { text-align: left; }
html[dir="rtl"] .field__input[dir="ltr"]::placeholder { text-align: right; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; inset-inline-start: -9999px; }
.field__error { min-height: 0; font-size: 13px; color: #A3412E; }
.field__error:empty { display: none; }
.order .btn--dark { min-height: 56px; }
.order__note { font-size: 12.5px; color: var(--c-text-mute); text-align: center; }
.pdp-wa .i { color: #2F8F5B; }

.order-done {
  margin-top: 28px;
  padding: clamp(24px, 3vw, 34px);
  background: var(--c-ivory-2);
  display: grid; gap: 16px;
  text-align: center;
  outline: none;
  animation: dialog-in .9s var(--ease-out);
}
.order-done__icon {
  width: 56px; height: 56px; margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-onyx); color: var(--c-ivory);
}
.order-done__icon .i { stroke-width: 2; }
.order-done__title { font-size: clamp(24px, 2.6vw, 30px); }
.order-done__list { margin: 0; border-top: 1px solid var(--line-light); text-align: start; }
.order-done__list div { display: flex; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line-light); font-size: 14px; }
.order-done__list dt { color: var(--c-text-mute); }
.order-done__list dd { margin: 0; }
.order-done__text { font-size: 14px; color: var(--c-text-soft); }
.order-done__again { justify-self: center; }
.order-done__preview { font-size: 11.5px; color: var(--c-text-mute); }

.assure { margin-top: 26px; }

/* ------------------------------------------------------------- Film ---- */
.pdp-film__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) { .pdp-film__grid { grid-template-columns: 1fr 1.4fr; gap: 80px; } }
.pdp-film__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; cursor: pointer; }
@media (min-width: 1000px) { .pdp-film__media { aspect-ratio: 16 / 10; } }
.pdp-film__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 2s var(--ease-out); }
.pdp-film__media:hover img { transform: scale(1.04); }
.pdp-film__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 9, 8, .6), transparent 50%); }
.pdp-film__media .gallery__play { position: absolute; inset: 0; place-content: center; color: var(--c-ivory); }
.pdp-film__media .la { position: absolute; inset-inline-start: 24px; bottom: 22px; z-index: 2; color: rgba(243, 236, 223, .7); }

/* --------------------------------------------------------- Anatomy ---- */
.anatomy { background: var(--c-coal); }
.anatomy__grid { display: grid; gap: 40px; }
@media (min-width: 1000px) { .anatomy__grid { grid-template-columns: 1.4fr 1fr; gap: 72px; align-items: center; } }
.anatomy__figure { position: relative; }
.anatomy__figure .media { --ratio: 1 / 1; background: #F3F4F1; }
.anatomy__figure .media img { object-fit: contain; }
.hotspot {
  position: absolute; z-index: 3;
  top: var(--y); left: var(--x);
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(14, 12, 10, .82);
  color: var(--c-ivory);
  font-family: var(--f-ui-la); font-size: 11px;
  transition: background-color .4s var(--ease), transform .5s var(--ease-out);
}
.hotspot::before {
  content: ""; position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(14, 12, 10, .5);
  animation: pulse 2.6s var(--ease-out) infinite;
}
@keyframes pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.hotspot.is-active, .hotspot:hover { background: var(--c-gold); color: var(--c-onyx); transform: translate(-50%, -50%) scale(1.12); }
.anatomy__list li {
  display: grid; grid-template-columns: 40px 1fr; gap: 2px 14px;
  padding-block: 20px;
  border-top: 1px solid var(--line-light);
  cursor: pointer;
  opacity: .55;
  transition: opacity .5s var(--ease);
}
.anatomy__list li:last-child { border-bottom: 1px solid var(--line-light); }
.anatomy__list li.is-active, .anatomy__list li:hover { opacity: 1; }
.anatomy__list .num { grid-row: span 2; padding-top: 4px; }
.anatomy__list h3 { font-size: 21px; }
.anatomy__list p { font-size: 14px; color: var(--c-text-soft); }

/* ----------------------------------------------------------- Specs ---- */
.specs__grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .specs__grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.spec-table { border-top: 1px solid var(--line-light); }
.spec-table div { display: flex; justify-content: space-between; gap: 20px; padding-block: 16px; border-bottom: 1px solid var(--line-light); font-size: 14.5px; }
.spec-table dt { color: var(--c-text-mute); }
.spec-table dd { margin: 0; text-align: end; }
.inbox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inbox li { padding: 20px; border: 1px solid var(--line-light); display: grid; gap: 8px; font-size: 14px; }
.inbox .i { color: var(--c-cognac); }
.specs h3 { font-family: var(--f-ui-la); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--c-sand-dark); margin-bottom: 18px; }

/* --------------------------------------------------------- Reviews ---- */
.pdp-reviews__grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .pdp-reviews__grid { grid-template-columns: 320px 1fr; gap: 72px; align-items: start; } }
.rv-summary b { font-family: var(--f-display-la); font-weight: 300; font-size: 84px; line-height: 1; display: block; direction: ltr; text-align: start; }
html[dir="rtl"] .rv-summary b { text-align: right; }
.rv-summary small { display: block; color: var(--c-text-mute); font-size: 13px; margin-top: 8px; }
.rv-bars { margin-top: 28px; display: grid; gap: 10px; }
.rv-bar { display: grid; grid-template-columns: 22px 1fr 34px; align-items: center; gap: 12px; font-family: var(--f-ui-la); font-size: 12px; color: var(--c-text-mute); }
.rv-bar__track { height: 2px; background: var(--line-light); position: relative; }
.rv-bar__track span { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); background: var(--c-gold); }
.rv-list { display: grid; gap: 14px; }
@media (min-width: 700px) { .rv-list { grid-template-columns: 1fr 1fr; } }
.rv-list .review[hidden] { display: none; }
.rv-more { margin-top: 28px; }

/* ------------------------------------------------- Sticky mobile bar ---- */
.pdp-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(14, 12, 10, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(243, 236, 223, .12);
  color: var(--c-ivory);
  transform: translateY(110%);
  transition: transform .7s var(--ease-out);
}
.pdp-bar.is-on { transform: none; }
.pdp-bar__thumb { width: 44px; height: 44px; flex: none; background: #F3F4F1; }
.pdp-bar__thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-bar__info { flex: 1; min-width: 0; line-height: 1.4; }
.pdp-bar__info strong { display: block; font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-bar__info .price { font-size: 13px; color: rgba(243, 236, 223, .7); }
.pdp-bar .btn { min-height: 46px; padding: 0 20px; }
@media (min-width: 1000px) { .pdp-bar { display: none; } }

/* ------------------------------------------------ WhatsApp floating ---- */
.wa-float {
  position: fixed; z-index: 45;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 16px;
  border-radius: 26px;
  background: var(--c-onyx);
  color: var(--c-ivory);
  border: 1px solid rgba(243, 236, 223, .18);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6);
  font-size: 13.5px;
  transition: bottom .7s var(--ease-out), transform .6s var(--ease-out);
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float .i { color: #4CC27E; }
.wa-float__dot { width: 7px; height: 7px; border-radius: 50%; background: #4CC27E; box-shadow: 0 0 0 3px rgba(76, 194, 126, .2); }
body.has-bar .wa-float { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (max-width: 767px) {
  .wa-float { width: 52px; padding: 0; justify-content: center; }
  .wa-float__text, .wa-float__dot { display: none; }
}

/* --------------------------------------------------------- Lightbox ---- */
.lightbox {
  width: 100vw; height: 100svh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #F3F4F1;
  color: var(--c-onyx);
}
.lightbox::backdrop { background: #F3F4F1; }
.lightbox[open] { animation: dialog-in .7s var(--ease-out); }
.lightbox__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide { position: relative; scroll-snap-align: start; overflow: hidden; cursor: zoom-in; }
.lightbox__slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .6s var(--ease-out);
  transform-origin: var(--zx, 50%) var(--zy, 50%);
}
.lightbox__slide.is-zoomed { cursor: zoom-out; }
.lightbox__slide.is-zoomed img { transform: scale(2.4); }
.lightbox__close { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 5; background: var(--c-onyx); color: var(--c-ivory); }
.lightbox__count { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 5; }
.lightbox__hint { position: fixed; top: 28px; inset-inline-start: 24px; z-index: 5; font-size: 12px; color: rgba(14, 12, 10, .5); }
