/* =========================================================
   ImenFix — single product page (product.html?id=…)
   Uses .sp / .stage / --u (services.css) and .pcard / toast (products.css).
   ========================================================= */

/* breadcrumb strip (design y 100 → 152) */
.pd-crumbs { padding-top: 82px; background: linear-gradient(180deg, #17181f, #1d1e26); }
.pd-crumbs .stage { height: calc(52 * var(--u)); display: flex; align-items: center; }
.pd-crumbs .crumbs { margin: 0 calc(36 * var(--u)) 0 0; color: #fff; font-size: calc(12.5 * var(--u)); }
.pd-crumbs .crumbs::before { content: ""; width: calc(22 * var(--u)); height: calc(3 * var(--u)); border-radius: 3px; background: var(--red); }

/* ---------- top: info | main image | thumbs ---------- */
.pd-top { padding-top: calc(18 * var(--u)); }
.pd-top__row {
  display: grid; direction: ltr; align-items: start;
  grid-template-columns: calc(485 * var(--u)) calc(372 * var(--u)) calc(81 * var(--u));
  column-gap: calc(15 * var(--u)) ; width: calc(968 * var(--u)); margin-left: calc(28 * var(--u));
}
.pd-top__row > * { direction: rtl; }
.pd-top__row { column-gap: 0; }
.pd-info { margin-right: calc(15 * var(--u)); }
.pd-thumbs { margin-left: calc(13 * var(--u)); }

.pd-main {
  position: relative; height: calc(460 * var(--u)); border-radius: calc(16 * var(--u)); overflow: hidden;
  background: radial-gradient(80% 70% at 50% 45%, #f7f7f9, #e7e6ec); box-shadow: 0 14px 30px rgba(40,30,60,.14);
}
.pd-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.pd-main img.is-contain { object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.pd-zoom {
  position: absolute; left: calc(15 * var(--u)); bottom: calc(14 * var(--u)); width: calc(42 * var(--u)); height: calc(40 * var(--u));
  display: grid; place-items: center; border: 0; border-radius: calc(9 * var(--u)); cursor: pointer; color: #fff;
  background: rgba(24,24,30,.82); box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.pd-zoom svg { width: 55%; height: 55%; }

.pd-thumbs { display: flex; flex-direction: column; align-items: center; height: calc(460 * var(--u)); }
.pd-thumbs__nav { flex: none; width: calc(30 * var(--u)); height: calc(22 * var(--u)); border: 0; background: none; cursor: pointer; color: #15121a; padding: 0; }
.pd-thumbs__nav svg { width: 100%; height: 100%; }
.pd-thumbs__nav--up svg { transform: rotate(180deg); }
.pd-thumbs__list { flex: 1; display: flex; flex-direction: column; gap: calc(6 * var(--u)); overflow: hidden; padding: calc(8 * var(--u)) 0; scroll-behavior: smooth; }
.pd-thumb {
  flex: none; width: calc(80 * var(--u)); height: calc(75 * var(--u)); padding: 0; cursor: pointer;
  border-radius: calc(8 * var(--u)); overflow: hidden; border: 2px solid transparent; background: #f2f2f5;
  box-shadow: 0 4px 10px rgba(40,30,60,.1);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.is-active { border-color: #e3111f; box-shadow: 0 0 0 2px rgba(227,17,31,.2); }

/* info column */
.pd-info { color: #15121a; }
.pd-info__head { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(12 * var(--u)); padding-top: calc(4 * var(--u)); }
.pd-info h1 { font-size: calc(21 * var(--u)); font-weight: 900; line-height: 1.5; max-width: calc(330 * var(--u)); }
.pd-badge { flex: none; margin-top: calc(8 * var(--u)); padding: calc(5 * var(--u)) calc(14 * var(--u)); border-radius: 999px; font-size: calc(12 * var(--u)); font-weight: 800; color: #fff; background: linear-gradient(180deg, #ef2030, #c40a17); box-shadow: 0 4px 12px rgba(200,10,25,.35); }
.pd-rate { display: flex; align-items: center; gap: calc(4 * var(--u)); margin-top: calc(14 * var(--u)); font-size: calc(12 * var(--u)); }
.pd-rate .star { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.pd-rate span { margin-right: calc(6 * var(--u)); }
.pd-meta { margin-top: calc(10 * var(--u)); font-size: calc(14 * var(--u)); font-weight: 800; line-height: calc(30 * var(--u)); }
.pd-meta b { font-weight: 600; }
.pd-meta .en { direction: ltr; unicode-bidi: isolate; }
.pd-stock { display: flex; align-items: center; gap: calc(6 * var(--u)); color: #138a3a; font-weight: 800; }
.pd-stock svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }

.pd-buy {
  position: relative; margin-top: calc(10 * var(--u)); padding: calc(14 * var(--u)) calc(20 * var(--u)) calc(14 * var(--u));
  border-radius: calc(16 * var(--u)); background: linear-gradient(180deg, #fff, #f6f6f9); border: 1px solid #fff;
  box-shadow: 0 12px 28px rgba(40,30,60,.1);
}
.pd-buy__top { display: grid; grid-template-columns: 1fr calc(205 * var(--u)); gap: calc(12 * var(--u)); align-items: start; }
.pd-buy__desc { font-size: calc(12.5 * var(--u)); line-height: 1.8; font-weight: 500; color: #2b2830; padding-top: calc(6 * var(--u)); }
.pd-price {
  margin: calc(-38 * var(--u)) 0 0 calc(-20 * var(--u)); padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(14 * var(--u));
  border-radius: calc(16 * var(--u)); background: #fff; box-shadow: 0 10px 26px rgba(40,30,60,.12);
}
.pd-price strong { display: block; text-align: center; font-size: calc(21 * var(--u)); font-weight: 900; color: #d10f1d; }
.pd-qty { display: flex; align-items: center; justify-content: space-between; margin-top: calc(14 * var(--u)); font-size: calc(13 * var(--u)); font-weight: 700; }
.pd-qty__box { display: flex; align-items: center; border: 1px solid #e2e1e8; border-radius: calc(10 * var(--u)); background: #f7f7fa; overflow: hidden; direction: ltr; }
.pd-qty__box button { width: calc(30 * var(--u)); height: calc(30 * var(--u)); border: 0; background: none; cursor: pointer; font: 800 calc(18 * var(--u))/1 Arial, sans-serif; color: #15121a; }
.pd-qty__box input { width: calc(30 * var(--u)); height: calc(30 * var(--u)); border: 0; background: none; text-align: center; font: 700 calc(14 * var(--u)) "Vazirmatn", Tahoma, sans-serif; -moz-appearance: textfield; }
.pd-qty__box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pd-add, .pd-quick {
  display: flex; align-items: center; justify-content: center; gap: calc(14 * var(--u)); width: 100%; cursor: pointer;
  border-radius: calc(12 * var(--u)); font: 900 calc(17 * var(--u)) "Vazirmatn", Tahoma, sans-serif;
  transition: transform .2s, box-shadow .2s;
}
.pd-add { height: calc(44 * var(--u)); margin-top: calc(14 * var(--u)); border: 0; color: #fff; background: linear-gradient(180deg, #e8192a, #b00c19); box-shadow: 0 10px 22px rgba(200,10,25,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.pd-quick { height: calc(40 * var(--u)); margin-top: calc(10 * var(--u)); border: 1.5px solid #e3111f; color: #d10f1d; background: #fff; font-size: calc(15 * var(--u)); }
.pd-add:hover, .pd-quick:hover { transform: translateY(-2px); }
.pd-add svg, .pd-quick svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }

.pd-perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(8 * var(--u)); margin-top: calc(12 * var(--u)); }
.pd-perks li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: calc(98 * var(--u));
  border-radius: calc(12 * var(--u)); background: linear-gradient(180deg, #fff, #f5f5f8); border: 1px solid #fff; box-shadow: 0 8px 18px rgba(40,30,60,.08);
  font-size: calc(12.5 * var(--u)); font-weight: 700; line-height: 1.6; color: #15121a;
}
.pd-perks svg { width: calc(30 * var(--u)); height: calc(30 * var(--u)); color: #e3111f; margin-bottom: calc(8 * var(--u)); }

/* ---------- specs strip (design y 665 → 775) ---------- */
.pd-specs { padding-top: calc(14 * var(--u)); }
.pd-specs ul {
  display: grid; grid-template-columns: repeat(6, 1fr); align-items: center;
  width: calc(968 * var(--u)); height: calc(110 * var(--u)); margin-left: calc(28 * var(--u));
  border-radius: calc(18 * var(--u)); background: linear-gradient(180deg, #fff, #f6f6f9); border: 1px solid #fff; box-shadow: 0 12px 28px rgba(40,30,60,.1);
}
.pd-specs li { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: calc(13.5 * var(--u)); line-height: 1.55; color: #15121a; }
.pd-specs li + li { border-right: 1px solid #dddce4; }
.pd-specs svg { width: calc(34 * var(--u)); height: calc(34 * var(--u)); color: #e3111f; margin-bottom: calc(6 * var(--u)); }
.pd-specs strong { font-weight: 900; }
.pd-specs span { font-weight: 700; }

/* ---------- tabs (design y 795 → 1165) ---------- */
.pd-tabs { padding-top: calc(20 * var(--u)); }
.pd-tabs__card {
  width: calc(968 * var(--u)); min-height: calc(370 * var(--u)); margin-left: calc(28 * var(--u)); padding: calc(10 * var(--u));
  border-radius: calc(18 * var(--u)); background: linear-gradient(180deg, #fff, #f8f8fb); border: 1px solid #fff; box-shadow: 0 12px 28px rgba(40,30,60,.1);
}
.pd-tabs__bar { display: grid; grid-template-columns: 214fr 250fr 234fr 250fr; gap: 0; }
.pd-tab {
  display: flex; align-items: center; justify-content: center; gap: calc(12 * var(--u)); height: calc(43 * var(--u)); cursor: pointer;
  border: 1px solid #e6e5ec; background: linear-gradient(180deg, #f8f8fb, #efeff3);
  font: 800 calc(15 * var(--u)) "Vazirmatn", Tahoma, sans-serif; color: #15121a;
}
.pd-tab:first-child { border-radius: 0 calc(12 * var(--u)) 0 0; }
.pd-tab:last-child { border-radius: calc(12 * var(--u)) 0 0 0; }
.pd-tab svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.pd-tab.is-active { color: #fff; border-color: transparent; background: linear-gradient(180deg, #e8192a, #c10d1a); box-shadow: 0 6px 16px rgba(200,10,25,.3); }
.pd-panel { padding: calc(18 * var(--u)) calc(12 * var(--u)) calc(10 * var(--u)); }
.pd-panel[hidden] { display: none; }

.pd-intro { display: grid; direction: ltr; grid-template-columns: calc(470 * var(--u)) 1fr; gap: calc(24 * var(--u)); align-items: start; }
.pd-intro > * { direction: rtl; }
.pd-intro__text h2 { font-size: calc(17.5 * var(--u)); font-weight: 900; line-height: 1.5; margin-bottom: calc(8 * var(--u)); }
.pd-intro__text p { font-size: calc(12.8 * var(--u)); line-height: calc(21 * var(--u)); color: #26232b; font-weight: 500; text-align: justify; }
.pd-uses {
  margin-top: calc(18 * var(--u)); padding: calc(12 * var(--u)) calc(18 * var(--u)) calc(14 * var(--u));
  border-radius: calc(12 * var(--u)); background: linear-gradient(180deg, #fbe9eb, #f8e3e6);
  display: grid; grid-template-columns: 1fr auto; align-items: start;
}
.pd-uses h3 { font-size: calc(16 * var(--u)); font-weight: 900; margin-bottom: calc(8 * var(--u)); }
.pd-uses ul { grid-column: 1; display: grid; grid-template-columns: 1fr 1fr; gap: calc(6 * var(--u)) calc(18 * var(--u)); }
.pd-uses li { display: flex; align-items: center; gap: calc(6 * var(--u)); font-size: calc(12 * var(--u)); font-weight: 600; color: #26232b; }
.pd-uses li::before { content: "✔"; color: #e3111f; font-size: calc(13 * var(--u)); }
.pd-uses > svg { grid-column: 2; grid-row: 1 / span 2; width: calc(40 * var(--u)); height: calc(44 * var(--u)); color: #e3111f; align-self: center; }

/* anatomy figure with call-outs */
.pd-anatomy { position: relative; height: calc(300 * var(--u)); }
.pd-anatomy > img { position: absolute; left: calc(155 * var(--u)); top: 0; width: calc(150 * var(--u)); height: calc(300 * var(--u)); object-fit: contain; mix-blend-mode: multiply; }
.pd-anatomy--plain > img { left: 50%; transform: translateX(-50%); width: calc(260 * var(--u)); }
.pd-callout {
  position: absolute; padding: calc(6 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u));
  background: linear-gradient(180deg, #fff, #f1f1f5); box-shadow: 0 6px 16px rgba(40,30,60,.12);
  font-size: calc(11.5 * var(--u)); line-height: 1.6; color: #2b2830; font-weight: 500; white-space: nowrap;
}
.pd-callout strong { display: block; font-size: calc(12.5 * var(--u)); font-weight: 900; color: #15121a; }
.pd-callout::after { content: ""; position: absolute; top: 50%; height: 1.5px; background: #e3111f; }
.pd-callout::before { content: ""; position: absolute; top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: #e3111f; }
.pd-callout--l::after { left: 100%; width: var(--line, 30px); }
.pd-callout--l::before { left: calc(100% + var(--line, 30px) - 3px); }
.pd-callout--r::after { right: 100%; width: var(--line, 30px); }
.pd-callout--r::before { right: calc(100% + var(--line, 30px) - 3px); }

.pd-spec-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: calc(13.5 * var(--u)); }
.pd-spec-table th, .pd-spec-table td { padding: calc(10 * var(--u)) calc(16 * var(--u)); text-align: right; border-bottom: 1px solid #ecebf1; }
.pd-spec-table th { width: 32%; font-weight: 800; color: #15121a; background: #f6f6f9; }
.pd-spec-table td { font-weight: 600; color: #2b2830; }
.pd-note { margin-top: calc(10 * var(--u)); font-size: calc(12 * var(--u)); color: #6b6773; }
.pd-panel__msg { display: flex; flex-direction: column; align-items: center; gap: calc(14 * var(--u)); padding: calc(40 * var(--u)) 0; text-align: center; font-size: calc(14 * var(--u)); font-weight: 600; color: #2b2830; }
.pd-panel__msg .big { font-size: calc(44 * var(--u)); font-weight: 900; color: #15121a; line-height: 1; }
.pd-panel__msg .star { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.pd-panel__msg .sp-btn { margin-top: calc(6 * var(--u)); }

/* ---------- related (design y 1180 → 1395) ---------- */
.pd-related { padding-top: calc(16 * var(--u)); }
.pd-related .sd-title { padding-right: calc(46 * var(--u)); font-size: calc(19 * var(--u)); }
.pd-related__row { position: relative; width: calc(980 * var(--u)); margin: calc(10 * var(--u)) 0 0 calc(22 * var(--u)); }
.pd-related__list { display: flex; gap: calc(10 * var(--u)); overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: calc(4 * var(--u)) calc(40 * var(--u)) calc(14 * var(--u)); }
.pd-related__list::-webkit-scrollbar { display: none; }
.pd-related .pcard { flex: none; width: calc(172 * var(--u)); padding-bottom: calc(14 * var(--u)); }
.pd-related .pcard__img { height: calc(92 * var(--u)); }
.pd-related .pcard h3 { font-size: calc(13 * var(--u)); margin-top: calc(6 * var(--u)); }
.pd-related .pcard__sub { font-size: calc(12 * var(--u)); color: #2b2830; }
.pd-related .pcard__price { font-size: calc(14.5 * var(--u)); color: #d10f1d; margin-top: calc(10 * var(--u)); }
.pd-related .pcard__price small { color: #d10f1d; font-size: calc(13 * var(--u)); }
.pd-related__nav {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: calc(32 * var(--u)); height: calc(32 * var(--u));
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, #e4192a, #b00c19); box-shadow: 0 6px 14px rgba(200,10,25,.35);
}
.pd-related__nav svg { width: 55%; height: 55%; }
.pd-related__nav--prev { left: 0; } .pd-related__nav--prev svg { transform: rotate(90deg); }
.pd-related__nav--next { right: 0; } .pd-related__nav--next svg { transform: rotate(-90deg); }

/* ---------- consult CTA (design y 1418 → 1532) ---------- */
.pd-cta { padding: calc(22 * var(--u)) 0 calc(30 * var(--u)); }
.pd-cta__band {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
  width: calc(987 * var(--u)); height: calc(114 * var(--u)); margin-left: calc(18 * var(--u)); padding: 0 calc(42 * var(--u)) 0 0;
  border-radius: calc(22 * var(--u)); background: linear-gradient(90deg, #1b1b22 0%, #18171d 100%); box-shadow: 0 16px 34px rgba(20,15,30,.3);
}
.pd-cta__img { position: absolute; left: 0; top: 0; width: calc(400 * var(--u)); height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(to left, transparent, #000 35%); mask-image: linear-gradient(to left, transparent, #000 35%); }
.pd-cta__btn {
  position: relative; display: flex; align-items: center; gap: calc(18 * var(--u)); padding: 0 calc(26 * var(--u));
  width: calc(238 * var(--u)); height: calc(65 * var(--u)); border-radius: calc(16 * var(--u)); color: #fff;
  background: linear-gradient(180deg, #d81626, #9e0b17); border: 1px solid rgba(255,140,150,.5);
  box-shadow: 0 0 20px rgba(220,20,40,.35), 0 10px 22px rgba(120,0,15,.4);
}
.pd-cta__btn svg { width: calc(36 * var(--u)); height: calc(36 * var(--u)); flex: none; }
.pd-cta__btn strong { display: block; font-size: calc(15.5 * var(--u)); font-weight: 900; }
.pd-cta__btn span { display: block; font-size: calc(12.5 * var(--u)); color: #fbe0e3; }
.pd-cta__text { position: relative; margin-left: calc(345 * var(--u)); font-size: calc(19.5 * var(--u)); font-weight: 900; line-height: 1.6; color: #fff; }

/* lightbox */
.pd-lightbox { position: fixed; inset: 0; z-index: 950; display: none; align-items: center; justify-content: center; background: rgba(10,10,14,.9); padding: 24px; cursor: zoom-out; }
.pd-lightbox.is-open { display: flex; }
.pd-lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }

.pd-missing { padding: 140px 20px 120px; text-align: center; font-size: 18px; font-weight: 700; }
.pd-missing a { color: #e3111f; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .pd-crumbs .crumbs { margin-right: 16px; flex-wrap: wrap; }
  .pd-crumbs .stage { height: auto; min-height: 48px; padding-block: 10px; }
  .pd-top__row { width: auto; margin: 0 16px; grid-template-columns: 1fr; direction: rtl; row-gap: 16px; }
  .pd-info { margin: 0; order: 3; }
  .pd-main { order: 1; height: auto; aspect-ratio: 372 / 460; max-height: 70vh; }
  .pd-thumbs { order: 2; margin: 0; height: auto; flex-direction: row; }
  .pd-thumbs__list { flex-direction: row; overflow-x: auto; padding: 0 4px; }
  .pd-thumbs__nav { display: none; }
  .pd-price { margin: 0; }
  .pd-buy__top { grid-template-columns: 1fr; }
  .pd-perks { grid-template-columns: repeat(2, 1fr); }
  .pd-specs ul { width: auto; margin: 0 16px; height: auto; grid-template-columns: repeat(3, 1fr); row-gap: 18px; padding: 16px 0; }
  .pd-specs li:nth-child(4) { border-right: 0; }
  .pd-tabs__card { width: auto; margin: 0 16px; }
  .pd-tabs__bar { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pd-tab, .pd-tab:first-child, .pd-tab:last-child { border-radius: 10px; font-size: 13px; }
  .pd-intro { grid-template-columns: 1fr; direction: rtl; }
  .pd-anatomy { height: 300px; max-width: 470px; width: 100%; margin: 0 auto; }
  .pd-related__row { width: auto; margin: 10px 16px 0; }
  .pd-cta__band { width: auto; margin: 0 16px; height: auto; flex-direction: column; gap: 14px; padding: 22px 16px; }
  .pd-cta__img { width: 100%; opacity: .4; }
  .pd-cta__text { margin: 0; text-align: center; }
  .pd-cta__btn { order: 2; }
}
@media (max-width: 640px) {
  .pd-anatomy { transform: scale(.78); transform-origin: top center; height: 240px; }
  .pd-uses ul { grid-template-columns: 1fr; }
  .pd-specs ul { grid-template-columns: repeat(2, 1fr); }
  .pd-specs li:nth-child(odd) { border-right: 0; }
  .pd-specs li:nth-child(4) { border-right: 1px solid #dddce4; }
}

/* products without a public price */
.pd-price--call strong { font-size: calc(17 * var(--u)); line-height: 1.7; }
a.pd-add { text-decoration: none; }
