/* ═══════════════════════════════════════════════════════════
   ZIMA — Product Detail page (extends style.css tokens)
   ═══════════════════════════════════════════════════════════ */

/* product cards are links now */
.pcard { display: block; }

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .55rem;
  padding-top: 1.6rem; font-size: .84rem; color: var(--muted);
}
.breadcrumb a { transition: color .3s ease; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb i { color: var(--gold); font-style: normal; font-size: .8rem; }
.breadcrumb span { color: var(--text); }

/* ── Top grid ──────────────────────────────────────────── */
.pd-top { padding-top: clamp(28px, 4vw, 48px); }
.pd-grid {
  display: grid; grid-template-columns: .95fr 1.05fr;
  gap: clamp(2rem, 4.5vw, 3.6rem); align-items: start;
}

/* gallery */
.pd-gallery { position: sticky; top: 110px; }
.pd-main {
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 10 / 8.8; border-radius: calc(var(--radius) + 6px);
  background: var(--stage); border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.pd-main img {
  width: 62%; mix-blend-mode: multiply;
  transition: transform .7s var(--ease);
}
.pd-main[data-zoom="cap"] img   { transform: scale(2) translateY(-38%); }
.pd-main[data-zoom="label"] img { transform: scale(2.15) translateY(-14%); }
.pd-main .pcard__off { inset-inline-start: 1.2rem; top: 1.2rem; }

.pd-thumbs { display: flex; gap: .8rem; margin-top: 1rem; }
.pd-thumb {
  width: 86px; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: var(--stage); border: 1px solid var(--line);
  display: grid; place-items: center; opacity: .75;
  transition: border-color .3s ease, opacity .3s ease, transform .3s var(--ease);
}
.pd-thumb:hover { opacity: 1; transform: translateY(-3px); }
.pd-thumb.is-active { border-color: var(--gold); opacity: 1; }
.pd-thumb img { width: 62%; mix-blend-mode: multiply; pointer-events: none; }

/* gallery lightbox opener + fullscreen viewer */
.pd-gallery-open {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%; margin-top: .9rem; padding: .7rem 1rem;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--card-hover); color: var(--gold-soft);
  font-size: .85rem;
  transition: border-color .3s ease, transform .3s var(--ease), color .3s ease;
}
.pd-gallery-open:hover {
  border-color: var(--gold); color: var(--gold); transform: translateY(-2px);
}
.pd-gallery-open svg { width: 18px; height: 18px; flex: none; }
.pd-gallery-open__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5rem; height: 1.5rem; padding-inline: .3rem;
  border-radius: 999px; background: var(--line-strong);
  color: var(--gold-soft); font-size: .7rem; font-weight: 700;
}

body.pd-lightbox-open { overflow: hidden; }
.pd-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility 0s .3s;
}
.pd-lightbox.open {
  opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s;
}
.pd-lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 7, 4, .8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.pd-lightbox__inner {
  position: relative; z-index: 1;
  width: min(1180px, calc(100% - 32px));
  height: min(860px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 1rem;
  color: #fff;
}
.pd-lightbox__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.pd-lightbox__title {
  font-size: .95rem; font-weight: 600; letter-spacing: .06em;
  color: var(--gold-soft);
}
.pd-lightbox__counter {
  font-size: .85rem; color: rgba(255, 255, 255, .65);
  font-variant-numeric: tabular-nums;
}
.pd-lightbox__close,
.pd-lightbox__nav {
  display: grid; place-items: center; flex: none;
  border-radius: 50%; color: var(--gold-soft);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .22);
  transition: background .3s ease, border-color .3s ease, transform .3s var(--ease);
}
.pd-lightbox__close:hover,
.pd-lightbox__nav:hover {
  background: rgba(200, 162, 94, .18);
  border-color: var(--gold); transform: translateY(-2px);
}
.pd-lightbox__close { width: 42px; height: 42px; }
.pd-lightbox__close svg { width: 18px; height: 18px; }
.pd-lightbox__stage {
  position: relative; flex: 1; min-height: 0;
  display: grid; place-items: center; touch-action: pan-y;
}
.pd-lightbox__track { position: absolute; inset: 0; }
.pd-lightbox__slide {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: scale(.96);
  transition: opacity .35s ease, transform .45s var(--ease), visibility 0s .35s;
}
.pd-lightbox.open .pd-lightbox__slide.is-active {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.pd-lightbox__slide img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; padding: 1rem; border-radius: 18px;
  background: rgba(255, 255, 255, .06);
}
.pd-lightbox__slide[data-zoom="cap"] img { transform: scale(1.7) translateY(-12%); }
.pd-lightbox__slide[data-zoom="label"] img { transform: scale(1.75) translateY(-8%); }
.pd-lightbox__nav {
  position: absolute; top: 50%; z-index: 2;
  width: 46px; height: 46px; transform: translateY(-50%);
}
.pd-lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.pd-lightbox__nav svg { width: 20px; height: 20px; }
.pd-lightbox__prev { inset-inline-start: 0; }
.pd-lightbox__next { inset-inline-end: 0; }
.pd-lightbox__thumbs {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  overflow-x: auto; padding: .3rem .2rem;
  scrollbar-width: none;
}
.pd-lightbox__thumbs::-webkit-scrollbar { display: none; }
.pd-lightbox__thumb {
  width: 58px; aspect-ratio: 1; flex: none; padding: .25rem;
  border-radius: 12px; opacity: .55;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: opacity .3s ease, border-color .3s ease, transform .3s var(--ease);
}
.pd-lightbox__thumb:hover { opacity: 1; transform: translateY(-2px); }
.pd-lightbox__thumb.is-active { opacity: 1; border-color: var(--gold); }
.pd-lightbox__thumb img { width: 100%; height: 100%; object-fit: contain; }

/* info column */
.pd-title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 600; line-height: 1.5; margin-bottom: .9rem;
}
.pd-en-title {
  display: flex; align-items: center; gap: .7rem;
  margin: -.35rem 0 1rem;
  font-family: var(--font-en); font-size: .82rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft); direction: ltr; unicode-bidi: isolate;
}
.pd-en-title::before {
  content: ""; width: 28px; height: 1px; flex: none;
  background: var(--gold-grad);
}
.pd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; font-size: .86rem; color: var(--muted); }
.pd-meta i { width: 1px; height: 16px; background: var(--line-strong); margin-inline: .3rem; }
.pd-stars { color: var(--gold); letter-spacing: .18em; font-size: .82rem; }
.pd-score { font-weight: 700; color: var(--gold-soft); }
.pd-reviews-link { color: var(--muted); transition: color .3s ease; }
.pd-reviews-link:hover { color: var(--gold); }
.pd-sku .en { font-size: .8rem; }

.pd-pricebox {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 1.4rem;
  padding: 1.2rem 1.4rem; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
}
.pd-price { display: flex; align-items: baseline; gap: .5rem; }
.pd-price strong { font-size: 1.75rem; font-weight: 700; color: var(--gold-soft); }
.pd-price span { font-size: .88rem; color: var(--muted); }
.pd-stock { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.pd-stock i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(200,162,94,.15); }

.pd-desc { color: var(--muted); font-size: 1rem; margin-top: 1.4rem; max-width: 36rem; }

.pd-divider {
  height: 1px; margin-block: 1.5rem;
  background: linear-gradient(90deg, var(--line-strong), var(--line), transparent);
}

.pd-option { margin-bottom: 1.4rem; }
.pd-option__label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .55rem; }
.pd-chips { display: flex; gap: .6rem; flex-wrap: wrap; }
.pd-chip {
  padding: .55rem 1.2rem; border-radius: 999px;
  font-size: .88rem; color: var(--muted);
  border: 1px solid var(--line); background: var(--card);
  transition: all .3s ease;
}
.pd-chip:hover { border-color: var(--line-strong); color: var(--text); }
.pd-chip.is-active {
  background: var(--gold-grad); color: #241a08; font-weight: 600;
  border-color: transparent; box-shadow: 0 10px 24px -12px rgba(180,140,70,.6);
}

/* actions */
.pd-actions { display: flex; align-items: stretch; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pd-add { flex: 1; min-width: 220px; justify-content: center; }
.pd-add.added { filter: saturate(1.15); }
.pd-qty {
  display: flex; align-items: center; border-radius: 999px;
  border: 1px solid var(--line-strong); overflow: hidden;
  background: var(--card);
}
.pd-qty__btn {
  width: 46px; align-self: stretch; font-size: 1.15rem; color: var(--gold-soft);
  transition: background .3s ease;
}
.pd-qty__btn:hover { background: var(--card-hover); }
.pd-qty__val {
  min-width: 34px; text-align: center; font-weight: 700; color: var(--text);
  border-inline: 1px solid var(--line); padding-block: .55rem;
}
.pd-wish { align-self: center; border: 1px solid var(--line-strong); }
.pd-wish:hover { color: #c0563a; }

.pd-trust { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.pd-trust li { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.pd-trust svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

/* ── Tabs ──────────────────────────────────────────────── */
.pd-tabsec { padding-top: clamp(40px, 6vw, 70px); scroll-margin-top: 84px; }
.pd-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 2.2rem;
}
.pd-tab {
  position: relative; padding: .9rem 1.4rem;
  font-size: .95rem; color: var(--muted);
  transition: color .3s ease;
}
.pd-tab::after {
  content: ""; position: absolute; inset-inline: 1rem; bottom: -1px; height: 2px;
  background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transition: transform .4s var(--ease);
}
.pd-tab:hover { color: var(--text); }
.pd-tab.is-active { color: var(--gold-soft); font-weight: 600; }
.pd-tab.is-active::after { transform: scaleX(1); }
.pd-tab__count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  margin-inline-start: .3rem; padding-inline: 5px; border-radius: 11px;
  background: var(--gold-grad); color: #241a08; font-size: .7rem; font-weight: 700;
}

.pd-panels {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.6rem);
}
.pd-panel p { color: var(--muted); margin-bottom: 1rem; }

.pd-benefits-title {
  display: flex; align-items: center; gap: .55rem;
  margin: 1.5rem 0 .2rem;
  font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.pd-benefits-title::before {
  content: "✦"; color: var(--gold); font-size: .85rem; line-height: 1;
}
.pd-benefits-subtitle {
  margin: 1.2rem 0 .2rem;
  font-size: .9rem; font-weight: 600; color: var(--gold-soft);
}
.pd-benefits {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 2rem; margin-top: .7rem; padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.pd-benefits li {
  position: relative; padding-inline-start: 1.3rem;
  font-size: .94rem; color: var(--text);
}
.pd-benefits li::before {
  content: "✦"; position: absolute; inset-inline-start: 0;
  color: var(--gold); font-size: .8rem;
}

.pd-specs { display: flex; flex-direction: column; }
.pd-specs > div {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding-block: .85rem; border-bottom: 1px dashed var(--line);
}
.pd-specs > div:last-child { border-bottom: 0; }
.pd-specs dt { color: var(--muted); font-size: .92rem; flex: none; }
.pd-specs dd { color: var(--text); font-size: .94rem; text-align: start; }

.pd-usage { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.4rem; }
.pd-usage li {
  position: relative; padding-inline-start: 2.6rem;
  color: var(--muted); list-style: none;
}
.pd-usage li::before {
  content: counter(pd-counter, persian);
  counter-increment: pd-counter;
  position: absolute; inset-inline-start: 0; top: .2rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-grad); color: #241a08; font-weight: 700; font-size: .85rem;
}
.pd-usage { counter-reset: pd-counter; }
.pd-usage__note {
  display: flex; align-items: center; gap: .55rem;
  font-size: .84rem; color: var(--faint);
  padding-top: 1.2rem; border-top: 1px dashed var(--line);
}
.pd-usage__note svg { width: 17px; height: 17px; color: var(--gold); flex: none; }

/* reviews */
.pd-rating {
  display: flex; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding-bottom: 1.6rem; margin-bottom: 1.8rem;
  border-bottom: 1px dashed var(--line); flex-wrap: wrap;
}
.pd-rating__score { text-align: center; }
.pd-rating__score strong {
  display: block; font-size: 2.6rem; font-weight: 700; color: var(--gold-soft); line-height: 1.2;
}
.pd-rating__score span { display: block; font-size: .78rem; color: var(--muted); }
.pd-rating__score .pd-stars { display: block; margin-block: .25rem; }
.pd-rating__bars { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: .5rem; }
.pd-bar { display: flex; align-items: center; gap: .8rem; font-size: .78rem; color: var(--muted); }
.pd-bar__label { flex: none; width: 2.2rem; }
.pd-bar__track {
  flex: 1; height: 7px; border-radius: 4px; background: var(--line);
  overflow: hidden;
}
.pd-bar__track i {
  display: block; height: 100%; border-radius: 4px;
  background: var(--gold-grad);
}
.pd-bar__val { flex: none; width: 3rem; text-align: start; }

.pd-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.pd-review {
  padding: 1.5rem 1.6rem; border-radius: 18px;
  background: var(--card-hover); border: 1px solid var(--line);
}
.pd-review header {
  display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem;
}
.pd-review__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-grad); color: #241a08; font-weight: 700;
}
.pd-review header div { flex: 1; display: flex; flex-direction: column; }
.pd-review header strong { font-size: .95rem; }
.pd-review__date { font-size: .72rem; color: var(--faint); }
.pd-review__stars { flex: none; font-size: .78rem; }
.pd-review__stars i { color: var(--faint); font-style: normal; }
.pd-review p { font-size: .92rem; margin: 0; }

.pd-review__cta { text-align: center; margin-top: 1.6rem; }

/* related */
.pd-related { padding-top: 0; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-gallery { position: static; max-width: 560px; margin-inline: auto; width: 100%; }
  .pd-review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pd-actions .btn { width: 100%; white-space: nowrap; padding-inline: 1.2rem; }
  .pd-add { order: 3; }
  .pd-qty { flex: 1 1 150px; max-width: 170px; }
  .pd-thumbs { justify-content: center; }
  .pd-lightbox__inner { width: 100%; height: 100%; gap: .7rem; }
  .pd-lightbox__bar { padding-inline: .4rem; }
  .pd-lightbox__title { font-size: .85rem; }
  .pd-lightbox__close { width: 38px; height: 38px; }
  .pd-lightbox__stage { padding-inline: 44px; }
  .pd-lightbox__nav { width: 38px; height: 38px; }
  .pd-lightbox__nav svg { width: 17px; height: 17px; }
  .pd-lightbox__slide img { padding: .5rem; border-radius: 12px; }
  .pd-lightbox__thumbs { justify-content: flex-start; padding-inline: .4rem; }
  .pd-lightbox__thumb { width: 50px; }
  .pd-benefits { grid-template-columns: 1fr; }
  .pd-tabsec .pd-tabs { justify-content: center; }
}

/* ── Ingredients accordion (ported from the approved PHYRIS design) ── */
.container--narrow { width: min(920px, 100% - 48px); margin-inline: auto; }
@media (max-width: 560px) {
  .container--narrow { width: min(920px, 100% - 40px); }
}

.pd-accs { width: min(920px, 100%); margin-inline: auto; }

.acc {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); overflow: hidden;
  transition: border-color .4s ease, box-shadow .4s ease;
}
.acc + .acc { margin-top: .9rem; }
.acc.open { border-color: var(--line-strong); box-shadow: var(--shadow-card); }

.acc__head {
  width: 100%; display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; text-align: start;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-fa); color: var(--text);
}
.acc__num {
  flex: none; font-size: 1.6rem; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px var(--num-stroke);
  transition: -webkit-text-stroke-color .4s ease;
}
.acc.open .acc__num { -webkit-text-stroke-color: var(--gold); }
.acc__titles { flex: 1; display: flex; flex-direction: column; gap: .1rem; text-align: start; }
.acc__en { font-size: 1.06rem; letter-spacing: .1em; color: var(--gold-soft); font-weight: 500; }
.acc__fa { font-size: .9rem; color: var(--muted); }
.acc__fa--main { font-size: 1.02rem; color: var(--text); font-weight: 600; letter-spacing: 0; }
.acc__icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--gold-soft);
  transition: transform .5s var(--ease), background .4s ease, color .4s ease, border-color .4s ease;
}
.acc__icon svg { width: 15px; height: 15px; }
.acc.open .acc__icon {
  transform: rotate(45deg);
  background: var(--gold-grad); color: #241a08; border-color: transparent;
}

.acc__body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.acc.open .acc__body { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__inner > p {
  color: var(--muted); font-size: .95rem; line-height: 1.9;
  padding: .1rem 1.4rem 1.1rem; max-width: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity .45s ease .1s, transform .45s var(--ease) .1s;
}
.acc.open .acc__inner > p { opacity: 1; transform: none; }
@media (max-width: 560px) {
  .acc__head { padding: 1rem 1.1rem; }
  .acc__num { font-size: 1.35rem; }
}

/* ── Usage tab (WYSIWYG content + warnings block) ── */
.pd-usage-html p { color: var(--muted); margin-bottom: 1rem; }
.pd-usage-html ul {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: grid; gap: .45rem;
}
.pd-usage-html li {
  position: relative; padding-inline-start: 1.3rem;
  color: var(--muted); font-size: .95rem; line-height: 1.9;
}
.pd-usage-html li::before {
  content: "✦"; position: absolute; inset-inline-start: 0;
  color: var(--gold); font-size: .8rem;
}
.pd-usage-html strong { color: var(--text); font-weight: 700; }

.pd-usage__note--block {
  display: flex; align-items: flex-start; gap: .8rem;
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
}
.pd-usage__note--block svg { width: 20px; height: 20px; color: #c0563a; flex: none; margin-top: .2rem; }
.pd-usage__note--block .pd-usage__note-body { color: var(--muted); font-size: .92rem; line-height: 1.9; }
.pd-usage__note--block .pd-usage__note-body p { margin: 0 0 .5rem; }
.pd-usage__note--block .pd-usage__note-body p:last-child { margin-bottom: 0; }
.pd-usage__note--block .pd-usage__note-body strong { color: var(--text); }

/* ── Extra content section (توضیحات اضافی) ── */
.pd-extra { padding-top: 0; }
.pd-extra__box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-card);
}
.pd-extra__title {
  font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 800;
  margin-bottom: .9rem;
}
.pd-extra__content p { color: var(--muted); line-height: 2; margin-bottom: .8rem; max-width: none; }
.pd-extra__content p:last-child { margin-bottom: 0; }

/* second benefits list (extra_features) — no repeated divider */
.pd-benefits--more { margin-top: .8rem; border-top: 0; padding-top: 0; }
