/* ========== صفحه محصول — سبک Mixin / arzankalaarnikaa + تم ایوان ========== */
:root {
  --pdp-red: #ef394e;
  --pdp-text: #0c0c0c;
  --pdp-muted: #81858b;
  --pdp-hint: #a1a3a8;
  --pdp-border: #e0e0e2;
  --pdp-body: #f5f5f5;
  --pdp-title: #212121;
  --pdp-star: #f9bc00;
  --pdp-success: #00a049;
  --font: "Yekan Bakh", "YekanBakh", Estedad, Vazirmatn, Tahoma, sans-serif;
}

.pdp-body .site-footer {
  margin-top: 8px;
  margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

.pdp-body {
  margin: 0;
  background: var(--pdp-body);
  font-family: var(--font);
  color: var(--pdp-text);
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
}
.pdp-body .header {
  position: sticky;
  top: 0;
  z-index: 120;
}
.pdp-body .pdp {
  position: relative;
  z-index: 1;
}
.pdp-body a,
.pdp-body button,
.pdp-body [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ti-icon--star { --ti: url("icons/tabler/star.svg"); }
.ti-icon--star-filled { --ti: url("icons/tabler/star-filled.svg"); }
.ti-icon--heart { --ti: url("icons/tabler/heart.svg"); }
.ti-icon--heart-filled { --ti: url("icons/tabler/heart-filled.svg"); }
.ti-icon--share-2 { --ti: url("icons/tabler/share-2.svg"); }
.ti-icon--copy { --ti: url("icons/tabler/copy.svg"); }
.ti-icon--search { --ti: url("icons/tabler/search.svg"); }
.ti-icon--arrow-right { --ti: url("icons/tabler/arrow-right.svg"); }
.ti-icon--dots-vertical { --ti: url("icons/tabler/dots-vertical.svg"); }
.ti-icon--chevron-down { --ti: url("icons/tabler/chevron-down.svg"); }
.ti-icon--chevron-left { --ti: url("icons/tabler/chevron-left.svg"); }
.ti-icon--message-2 { --ti: url("icons/tabler/message-2.svg"); }
.ti-icon--thumb-up { --ti: url("icons/tabler/thumb-up.svg"); }
.ti-icon--check { --ti: url("icons/tabler/check.svg"); }
.ti-icon--circle-check { --ti: url("icons/tabler/circle-check.svg"); }
.ti-icon--info-circle { --ti: url("icons/tabler/info-circle.svg"); }
.ti-icon--x { --ti: url("icons/tabler/x.svg"); }
.ti-icon--plus { --ti: url("icons/tabler/plus.svg"); }
.ti-icon--minus { --ti: url("icons/tabler/minus.svg"); }
.ti-icon--trash { --ti: url("icons/tabler/trash.svg"); }
.ti-icon--shopping-cart { --ti: url("icons/tabler/shopping-cart.svg"); }

/* Top actions — بالای گالری، قابل کلیک */
.pdp-top {
  position: absolute;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 8px 12px 0;
  background: transparent;
  border: 0;
  pointer-events: none;
}
.pdp-top__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  pointer-events: auto;
  position: relative;
  z-index: 41;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
.pdp-top > .pdp-top__btn {
  pointer-events: auto;
  position: relative;
  z-index: 41;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.pdp-top__btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #424750;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.15s ease,
    box-shadow 0.18s ease,
    color 0.15s ease;
}
.pdp-top__actions .pdp-top__btn {
  width: 38px;
  height: 38px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 14px;
}
.pdp-top__btn .ti-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: inherit;
  transition: transform 0.2s ease;
}
.pdp-top__btn:hover {
  background: #fff;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
.pdp-top__actions .pdp-top__btn:hover {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  transform: none;
}
.pdp-top__btn:active {
  transform: scale(0.94);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.pdp-top__actions .pdp-top__btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}
.pdp-top__fav.is-on {
  color: var(--pdp-red);
  background: rgba(255, 241, 242, 0.85);
}
.pdp-top__actions .pdp-top__fav.is-on {
  background: rgba(255, 241, 242, 0.9);
  box-shadow: inset 0 0 0 1px rgba(239, 57, 78, 0.18);
}
.pdp-top__fav.is-on .ti-icon {
  animation: favPop 0.4s cubic-bezier(0.22, 1.4, 0.36, 1);
}
@keyframes favPop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/*
  Gallery — ارتفاع بر اساس ویوپورت؛ عکس همیشه contain/فیت
  کاربر لازم نیست داخل عکس اسکرول عمودی کند
*/
.pdp-gallery {
  position: relative;
  background: #fff;
  z-index: 0;
  overflow: hidden;
}
.pdp-gallery__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(260px, 50vh, 400px);
  max-height: min(50vh, 400px);
  background: #fff;
  overflow: hidden;
}
.pdp-gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  cursor: zoom-in;
}
.pdp-gallery__track::-webkit-scrollbar { display: none; }
.pdp-gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
.pdp-gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: filter 0.28s ease, transform 0.28s ease;
}
.pdp-gallery.is-oos .pdp-gallery__slide img {
  filter: blur(7px) saturate(0.5) brightness(0.9);
  transform: scale(1.06);
}
.pdp-gallery__oos {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.pdp-gallery__oos[hidden] {
  display: none !important;
}
.pdp-gallery__oos span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(33, 37, 41, 0.84);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pdp-gallery__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 4;
  pointer-events: auto;
  padding: 4px 8px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}
.pdp-gallery__dots button {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: #c0c2c5;
  padding: 0;
  cursor: pointer;
  transition: width 0.2s ease, background 0.15s ease;
}
.pdp-gallery__dots button.is-active {
  width: 14px;
  border-radius: 50px;
  background: var(--pdp-red);
}

@media (min-width: 768px) {
  .pdp-gallery__stage {
    height: clamp(320px, 52vh, 460px);
    max-height: 460px;
  }
}

/* لایت‌باکس تمام‌صفحه */
.pdp-zoom {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.pdp-zoom.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.pdp-zoom__bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 12px;
  color: #fff;
}
.pdp-zoom__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pdp-zoom__close .ti-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: #fff;
  background-color: #fff;
}
.pdp-zoom__counter {
  font-size: 13px;
  font-weight: 600;
  direction: ltr;
}
.pdp-zoom__track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pdp-zoom__track::-webkit-scrollbar { display: none; }
.pdp-zoom__slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
.pdp-zoom__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pdp-toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 600;
  padding: 10px 18px;
  border-radius: 50px;
  background: rgba(12, 12, 12, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.pdp-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/*
  پیشنهاد شگفت‌انگیز — زیر عکس محصول (نه overlay روی گالری)
  تگ راست · تایمر چپ · بدون درصد فروش رفته
*/
.pdp-offer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -12px 0 0;
  padding: 12px 14px 12px;
  background: linear-gradient(90deg, #ef394e 0%, #d9143a 100%);
  color: #fff;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 18px rgba(217, 20, 58, 0.18);
}
/* در RTL: تگ (اول DOM) سمت راست · تایمر سمت چپ */
.pdp-offer__tag {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.pdp-offer__timer {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  direction: ltr;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pdp-offer__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 34px;
}
.pdp-offer__timer span {
  background: rgba(255, 255, 255, 0.2);
  min-width: 34px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.pdp-offer__unit em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0;
}
.pdp-offer__timer > i {
  font-style: normal;
  font-family: var(--font);
  opacity: 0.95;
  font-weight: 800;
  font-size: 14px;
  line-height: 30px;
  padding-top: 0;
  align-self: flex-start;
}

/* Head + price */
.pdp-head {
  background: #fff;
  padding: 16px 16px 18px;
  margin-bottom: 8px;
}
.pdp-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--pdp-title);
}
.pdp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.pdp-meta__rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pdp-text);
  text-decoration: none;
}
.pdp-meta__star {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: var(--pdp-star);
  background-color: var(--pdp-star);
}
.pdp-meta__muted { color: var(--pdp-muted); font-size: 11px; }
.pdp-meta__link {
  color: #19bfd3;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.pdp-meta__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c0c2c5;
}

/* انتخاب رنگ */
.pdp-color {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 16px;
}
.pdp-color__label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--pdp-text);
}
.pdp-color__label strong {
  font-weight: 700;
  color: #424750;
}
.pdp-color__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #e0e0e2;
  display: inline-block;
  flex-shrink: 0;
}
.pdp-color__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 4px;
  margin: 0 -16px;
  padding-inline: 16px;
}
.pdp-color__list::-webkit-scrollbar { display: none; }
.pdp-color__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 48px;
  padding: 6px 12px 6px 8px;
  border: 1px solid #e0e0e2;
  border-radius: 8px;
  background: #fff;
  font-family: var(--font);
  font-size: 13px;
  color: #62666d;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pdp-color__opt.is-active {
  border-color: #0c0c0c;
  color: #0c0c0c;
  font-weight: 600;
}
.pdp-color__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
.pdp-color__swatch .ti-icon {
  width: 12px;
  height: 12px;
  font-size: 12px;
  color: #fff;
  background-color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.pdp-color__swatch.is-light {
  border-color: #c0c2c5;
}
.pdp-color__swatch.is-light .ti-icon {
  color: #0c0c0c;
  background-color: #0c0c0c;
}
.pdp-color__opt.is-active .pdp-color__swatch .ti-icon {
  opacity: 1;
  transform: scale(1);
}
.pdp-color__opt-name {
  white-space: nowrap;
}

.pdp-chip {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f0f0f1;
  color: #424750;
  font-size: 13px;
  font-weight: 700;
}
.pdp-chip.is-out {
  background: #fff1f2;
  color: #ef394e;
}
.pdp-chip.is-low {
  background: #fffbeb;
  color: #d97706;
}

.pdp-pricebox__old-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.pdp-pricebox__old {
  color: var(--pdp-hint);
  text-decoration: line-through;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: plaintext;
}
.pdp-pricebox__off {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 16px;
  background: var(--pdp-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.pdp-pricebox__now {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--pdp-text);
}
.pdp-pricebox__now strong {
  font-size: 22px;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: plaintext;
  color: var(--pdp-red);
}
.pdp-pricebox__now span {
  font-size: 12px;
  color: var(--pdp-muted);
  font-weight: 500;
}

/* Blocks */
.pdp-block {
  background: #fff;
  padding: 16px;
  margin-bottom: 8px;
}
.pdp-sec-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--pdp-text);
}

/* توضیحات */
.pdp-desc {
  font-size: 13px;
  line-height: 2;
  color: #424750;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdp-desc.is-open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.pdp-desc h2,
.pdp-desc h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pdp-text);
  line-height: 1.7;
}
.pdp-desc h2 + h2,
.pdp-desc h3 + h3 { margin-top: 14px; }
.pdp-desc p { margin: 0 0 12px; }
.pdp-desc ul,
.pdp-desc ol {
  margin: 0 0 12px;
  padding: 0 18px 0 0;
  list-style: disc;
}
.pdp-desc ol { list-style: persian; }
.pdp-desc li { margin-bottom: 6px; }
.pdp-desc strong,
.pdp-desc b {
  font-weight: 800;
  color: var(--pdp-text);
}
.pdp-desc em,
.pdp-desc i { font-style: italic; }

.pdp-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--pdp-red);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.pdp-more .ti-icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: inherit;
  transition: transform 0.2s ease;
}
.pdp-more.is-open .ti-icon {
  transform: rotate(180deg);
}

/* ========== ریل محصولات مشابه / پیشنهادی (درشت‌تر) ========== */
.pdp-rail {
  padding-bottom: 16px;
}
.pdp-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pdp-rail__head .pdp-sec-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.pdp-rail__more {
  color: #19bfd3;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.pdp-rail__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 4px 16px 12px;
  -webkit-overflow-scrolling: touch;
}
.pdp-rail__track::-webkit-scrollbar { display: none; }
.pdp-rail__track .product-card {
  flex: 0 0 196px;
  width: 196px;
  min-height: 0;
  border: 1px solid var(--pdp-border);
  border-radius: 12px;
  background: #fff;
  scroll-snap-align: start;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.pdp-rail__track .product-card__link {
  padding: 14px;
  gap: 10px;
}
.pdp-rail__track .product-card__media {
  max-width: none;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.pdp-rail__track .product-card__title {
  font-size: 14.5px;
  line-height: 1.7;
  min-height: 48px;
  -webkit-line-clamp: 2;
  font-weight: 700;
}
.pdp-rail__track .product-card__off {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
}
.pdp-rail__track .product-card__old {
  font-size: 13px;
}
.pdp-rail__track .product-card__value {
  font-size: 16px;
  font-weight: 800;
}
.pdp-rail__track .product-card__currency {
  font-size: 12px;
  font-weight: 700;
}
.pdp-rail__empty {
  width: 100%;
  padding: 28px 12px;
  text-align: center;
  color: var(--pdp-muted);
  font-size: 14px;
  font-weight: 600;
}
@media (min-width: 768px) {
  .pdp-rail__head .pdp-sec-title { font-size: 20px; }
  .pdp-rail__more { font-size: 15px; }
  .pdp-rail__track {
    gap: 16px;
    margin: 0;
    padding: 4px 2px 14px;
  }
  .pdp-rail__track .product-card {
    flex: 0 0 220px;
    width: 220px;
  }
  .pdp-rail__track .product-card__title { font-size: 15px; min-height: 52px; }
  .pdp-rail__track .product-card__value { font-size: 17px; }
}

/* ========== نظرات کامل ========== */
.pdp-comments__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pdp-comments__head .pdp-sec-title { margin: 0; }
.pdp-comments__count {
  font-size: 12px;
  color: var(--pdp-muted);
  font-weight: 500;
}

.pdp-comments__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 0 16px;
  border-bottom: 1px solid #f0f0f1;
  margin-bottom: 14px;
}
.pdp-comments__score {
  text-align: center;
  min-width: 72px;
}
.pdp-comments__score strong {
  display: block;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--pdp-text);
}
.pdp-comments__stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 6px 0 4px;
}
.pdp-comments__stars .ti-icon {
  width: 12px;
  height: 12px;
  font-size: 12px;
  color: var(--pdp-star);
  background-color: var(--pdp-star);
}
.pdp-comments__score > span {
  font-size: 11px;
  color: var(--pdp-muted);
}

.pdp-comments__bars { display: grid; gap: 6px; }
.pdp-bar {
  display: grid;
  grid-template-columns: 14px 1fr 32px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--pdp-muted);
}
.pdp-bar i {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 50px;
  background: #f0f0f1;
  overflow: hidden;
  font-style: normal;
  min-width: 0;
}
.pdp-bar b {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: var(--w, 0);
  max-width: 100%;
  height: 100%;
  background: var(--pdp-star);
  border-radius: 50px;
  font-weight: 400;
  display: block;
  margin: 0;
  padding: 0;
}
.pdp-bar em {
  font-style: normal;
  text-align: left;
  direction: ltr;
}

.pdp-comments__write {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid var(--pdp-red);
  border-radius: 10px;
  background: #fff;
  color: var(--pdp-red);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pdp-comments__write .ti-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
  color: inherit;
}
.pdp-comments__write:hover { background: #fff1f2; }

.pdp-comments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.pdp-comment {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f1;
}
.pdp-comment:last-child { border-bottom: 0; padding-bottom: 4px; }

.pdp-comment__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pdp-comment__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pdp-comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4e8, #ffc9d1);
  color: var(--pdp-red);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.pdp-comment__user strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pdp-text);
}
.pdp-comment__user time {
  display: block;
  font-size: 11px;
  color: var(--pdp-muted);
  margin-top: 2px;
}
.pdp-comment__rate {
  display: flex;
  gap: 1px;
  flex-shrink: 0;
}
.pdp-comment__rate .ti-icon {
  width: 12px;
  height: 12px;
  font-size: 12px;
}
.pdp-comment__rate .ti-icon--star-filled {
  color: var(--pdp-star);
  background-color: var(--pdp-star);
}
.pdp-comment__rate .ti-icon--star {
  color: #c0c2c5;
  background-color: #c0c2c5;
}
.pdp-comment__text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.9;
  color: #424750;
}
.pdp-comment__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pdp-comment__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f0f0f1;
  color: var(--pdp-muted);
  font-size: 11px;
  font-weight: 600;
}
.pdp-comment__tag.is-buy {
  background: #e6f4ea;
  color: var(--pdp-success);
}
.pdp-comment__like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--pdp-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.pdp-comment__like .ti-icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: inherit;
}
.pdp-comment__like em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.pdp-comment__like:hover,
.pdp-comment__like.is-on {
  color: var(--pdp-red);
  background: #fff1f2;
}

/* Buy bar — قیمت چپ · دکمه/تعداد راست (direction:ltr) */
.pdp-buybar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--pdp-border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
}
.pdp-buybar__btn {
  flex: 1 1 auto;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--pdp-red);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  order: 3;
}
.pdp-buybar__btn:hover { background: #e02e44; }
.pdp-buybar.is-in-cart .pdp-buybar__btn { display: none; }
.pdp-buybar__cart {
  order: 2;
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-inline-start: auto;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--pdp-red);
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pdp-buybar.is-in-cart .pdp-buybar__cart {
  display: inline-flex;
}
.pdp-buybar__cart[hidden] { display: none !important; }
.pdp-buybar__cart:active { transform: scale(0.94); }
.pdp-buybar__cart .ti-icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  color: inherit;
}
.pdp-buybar__cart em {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50px;
  background: var(--pdp-red);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}
.pdp-buybar__qty {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  width: 128px;
  padding: 0 4px;
  border: 1px solid #e0e0e2;
  border-radius: 10px;
  background: #fff;
  order: 3;
}
.pdp-buybar.is-in-cart .pdp-buybar__qty {
  display: inline-flex;
}
.pdp-buybar__qty[hidden] { display: none !important; }
.pdp-buybar__trash,
.pdp-buybar__plus {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--pdp-red);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pdp-buybar__trash .ti-icon,
.pdp-buybar__plus .ti-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: inherit;
}
.pdp-buybar__count {
  font-size: 16px;
  font-weight: 800;
  color: var(--pdp-red);
  min-width: 24px;
  text-align: center;
}
/* قیمت نوار پایین — سمت چپ صفحه */
.pdp-buybar__price {
  flex-shrink: 0;
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  margin-inline-end: auto;
}
.pdp-buybar:not(.is-in-cart) .pdp-buybar__btn {
  margin-inline-start: 0;
}
.pdp-buybar__old-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  direction: ltr;
}
.pdp-buybar__old {
  font-size: 12px;
  font-weight: 500;
  color: var(--pdp-hint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  unicode-bidi: plaintext;
  line-height: 1;
}
.pdp-buybar__off {
  display: inline-flex;
  height: 18px;
  padding: 0 6px;
  border-radius: 16px;
  background: var(--pdp-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  line-height: 1;
}
.pdp-buybar__now {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
}
.pdp-buybar__now strong {
  font-size: 15px;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: plaintext;
  color: var(--pdp-text);
  line-height: 1.2;
}
.pdp-buybar__now span {
  font-size: 11px;
  font-weight: 500;
  color: var(--pdp-muted);
}

/* ========== شیت کالا اضافه شد — انیمیشن نرم ========== */
.cart-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.45s;
}
.cart-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s;
}
.cart-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-sheet.is-open .cart-sheet__backdrop {
  opacity: 1;
}
.cart-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow:
    0 -12px 40px rgba(0, 0, 0, 0.14),
    0 -2px 8px rgba(0, 0, 0, 0.04);
  transform: translate3d(0, 108%, 0);
  opacity: 0.96;
  transition:
    transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  will-change: transform;
}
.cart-sheet.is-open .cart-sheet__panel {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}
.cart-sheet.is-closing .cart-sheet__panel {
  transition:
    transform 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease;
}
.cart-sheet__handle {
  width: 44px;
  height: 4px;
  border-radius: 50px;
  background: #e0e0e2;
  margin: 12px auto 8px;
  flex-shrink: 0;
  opacity: 0;
  transform: scaleX(0.6);
}
.cart-sheet.is-open .cart-sheet__handle {
  animation: cartSheetFadeUp 0.45s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 14px;
  border-bottom: 1px solid #f0f0f1;
  flex-shrink: 0;
}
.cart-sheet__close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: #424750;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(8px);
}
.cart-sheet.is-open .cart-sheet__close {
  animation: cartSheetFadeUp 0.42s 0.16s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__close .ti-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: inherit;
}
.cart-sheet__ok {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-end: auto;
  min-width: 0;
  opacity: 0;
  transform: translateY(10px);
}
.cart-sheet.is-open .cart-sheet__ok {
  animation: cartSheetFadeUp 0.48s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__ok-ico {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #00a049;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transform: scale(0.35);
  opacity: 0;
}
.cart-sheet.is-open .cart-sheet__ok-ico {
  animation: cartOkPop 0.55s 0.28s cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}
.cart-sheet__ok-ico::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 160, 73, 0.35);
  opacity: 0;
  transform: scale(0.7);
}
.cart-sheet.is-open .cart-sheet__ok-ico::after {
  animation: cartOkRing 0.7s 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__ok-ico .ti-icon {
  width: 15px;
  height: 15px;
  font-size: 15px;
  color: #fff;
  background-color: #fff;
}
.cart-sheet__ok strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--pdp-text);
  white-space: nowrap;
}
.cart-sheet__goto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 50px;
  background: #f0f0f1;
  color: #0c0c0c;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: background 0.15s ease, transform 0.15s ease;
}
.cart-sheet.is-open .cart-sheet__goto {
  animation: cartSheetFadeUp 0.48s 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__goto:active {
  transform: scale(0.96);
  background: #e8e8ea;
}
.cart-sheet__goto .ti-icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: inherit;
}
.cart-sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 20px;
  -webkit-overflow-scrolling: touch;
}
.cart-sheet__sec {
  padding: 16px 16px 4px;
  opacity: 0;
  transform: translateY(16px);
}
.cart-sheet.is-open .cart-sheet__sec {
  animation: cartSheetFadeUp 0.5s 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet__sec + .cart-sheet__sec {
  border-top: 8px solid #f5f5f5;
  margin-top: 8px;
  padding-top: 16px;
}
.cart-sheet__sec-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--pdp-text);
}

/* آپسل */
.cart-upsell {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.cart-upsell__item {
  border-bottom: 1px solid #f0f0f1;
  opacity: 0;
  transform: translateY(14px);
}
.cart-sheet.is-open .cart-upsell__item:nth-child(1) {
  animation: cartSheetFadeUp 0.48s 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet.is-open .cart-upsell__item:nth-child(2) {
  animation: cartSheetFadeUp 0.48s 0.46s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-sheet.is-open .cart-upsell__item:nth-child(3) {
  animation: cartSheetFadeUp 0.48s 0.54s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-upsell__item:last-child { border-bottom: 0; }
.cart-upsell__link {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.cart-upsell__link:active {
  background: #fafafa;
}
.cart-upsell__link img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: #fafafa;
  flex-shrink: 0;
}
.cart-upsell__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cart-upsell__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: #424750;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-upsell__rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #424750;
  font-weight: 600;
}
.cart-upsell__rate .ti-icon {
  width: 12px;
  height: 12px;
  font-size: 12px;
  color: var(--pdp-star);
  background-color: var(--pdp-star);
}
.cart-upsell__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
}
.cart-upsell__off {
  display: inline-flex;
  height: 18px;
  padding: 0 6px;
  border-radius: 16px;
  background: var(--pdp-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  align-items: center;
}
.cart-upsell__price strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--pdp-text);
  direction: ltr;
  unicode-bidi: plaintext;
}
.cart-upsell__price > span:last-child {
  font-size: 11px;
  color: var(--pdp-muted);
}

@keyframes cartOkPop {
  0% { transform: scale(0.35); opacity: 0; }
  55% { transform: scale(1.18); opacity: 1; }
  78% { transform: scale(0.94); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cartOkRing {
  0% { opacity: 0; transform: scale(0.65); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.45); }
}
@keyframes cartSheetFadeUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cart-sheet__backdrop,
  .cart-sheet__panel,
  .cart-sheet.is-open .cart-sheet__handle,
  .cart-sheet.is-open .cart-sheet__close,
  .cart-sheet.is-open .cart-sheet__ok,
  .cart-sheet.is-open .cart-sheet__ok-ico,
  .cart-sheet.is-open .cart-sheet__ok-ico::after,
  .cart-sheet.is-open .cart-sheet__goto,
  .cart-sheet.is-open .cart-sheet__sec,
  .cart-sheet.is-open .cart-upsell__item {
    animation: none !important;
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
  }
  .cart-sheet__panel {
    transform: translate3d(0, 0, 0) !important;
  }
  @media (min-width: 768px) {
    .cart-sheet__panel,
    .cart-sheet.is-open .cart-sheet__panel {
      transform: translate3d(-50%, -50%, 0) !important;
    }
  }
}

body.cart-sheet-lock {
  overflow: hidden;
  touch-action: none;
}

/* ========== مودال اشتراک‌گذاری ========== */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.share-modal[hidden]:not(.is-open) { display: none !important; }
.share-modal.is-open {
  display: flex !important;
}
.share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.share-modal.is-open .share-modal__backdrop { opacity: 1; }

.share-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 22px 18px 18px;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.22),
    0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(28px) scale(0.96);
  opacity: 0;
  overflow: hidden;
  transition:
    transform 0.42s cubic-bezier(0.22, 1.2, 0.36, 1),
    opacity 0.28s ease;
}
.share-modal.is-open .share-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
@media (min-width: 720px) {
  .share-modal {
    align-items: center;
    padding: 24px;
  }
  .share-modal__panel {
    transform: translateY(16px) scale(0.94);
  }
  .share-modal.is-open .share-modal__panel {
    transform: translateY(0) scale(1);
  }
}

.share-modal__glow {
  position: absolute;
  inset-inline: -20%;
  top: -80px;
  height: 160px;
  background: radial-gradient(ellipse at center, rgba(239, 57, 78, 0.22), transparent 70%);
  pointer-events: none;
  animation: shareGlow 2.8s ease-in-out infinite alternate;
}
@keyframes shareGlow {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.08); }
}

.share-modal__head {
  position: relative;
  text-align: center;
  padding: 4px 36px 14px;
}
.share-modal__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ef394e, #ff6b7a);
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 57, 78, 0.35);
  animation: shareBadgePop 0.55s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}
.share-modal.is-open .share-modal__badge {
  animation: shareBadgePop 0.55s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}
@keyframes shareBadgePop {
  from { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.share-modal__badge .ti-icon {
  width: 26px;
  height: 26px;
  font-size: 26px;
  color: #fff;
  background-color: #fff;
}
.share-modal__head h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--pdp-text);
}
.share-modal__sub {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--pdp-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-modal__close {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #424750;
}
.share-modal__close .ti-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
}
.share-modal__close:active { transform: scale(0.94); }

.share-modal__urlbox {
  background: #f8f8f9;
  border: 1px solid #eeeef0;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  animation: shareFadeUp 0.45s ease 0.08s both;
}
.share-modal.is-open .share-modal__urlbox {
  animation: shareFadeUp 0.45s ease 0.08s both;
}
@keyframes shareFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.share-modal__url-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pdp-muted);
  margin-bottom: 8px;
}
.share-modal__urlrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-modal__url {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: 1px solid #e0e0e2;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: #424750;
  outline: 0;
}
.share-modal__url:focus {
  border-color: #ef394e;
  box-shadow: 0 0 0 3px rgba(239, 57, 78, 0.12);
}
.share-modal__copy {
  flex-shrink: 0;
  height: 42px;
  min-width: 86px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #ef394e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.share-modal__copy:hover { background: #e02e44; }
.share-modal__copy:active { transform: scale(0.96); }
.share-modal__copy .ti-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: #fff;
  background-color: #fff;
}
.share-modal__copy em {
  font-style: normal;
}
.share-modal__copy-ok { display: none; }
.share-modal__copy.is-copied {
  background: #00a049;
}
.share-modal__copy.is-copied .share-modal__copy-ico { display: none; }
.share-modal__copy.is-copied .share-modal__copy-ok { display: inline-block; }

.share-modal__apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  animation: shareFadeUp 0.45s ease 0.16s both;
}
.share-modal.is-open .share-modal__apps {
  animation: shareFadeUp 0.45s ease 0.16s both;
}
.share-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: #424750;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}
.share-app__ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.2s cubic-bezier(0.22, 1.2, 0.36, 1), box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.share-app:hover .share-app__ico {
  transform: translateY(-3px) scale(1.04);
}
.share-app:active .share-app__ico {
  transform: scale(0.94);
}
.share-app__ico .ti-icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  color: #fff;
  background-color: #fff;
}
.share-app--tg .share-app__ico { background: linear-gradient(145deg, #2aabee, #229ed9); }
.share-app--wa .share-app__ico { background: linear-gradient(145deg, #25d366, #1ebe57); }
.share-app--x .share-app__ico { background: linear-gradient(145deg, #1a1a1a, #333); }
.share-app--more .share-app__ico { background: linear-gradient(145deg, #6b3aa8, #8b5cf6); }
.share-app--more[hidden] { display: none !important; }

.share-modal__hint {
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--pdp-hint);
  line-height: 1.55;
  animation: shareFadeUp 0.45s ease 0.24s both;
}
.share-modal.is-open .share-modal__hint {
  animation: shareFadeUp 0.45s ease 0.24s both;
}

body.is-share-open {
  overflow: hidden;
}

/* ========== شیت ثبت نظر ========== */
.review-sheet {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.review-sheet.is-open { display: flex; }
.review-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.review-sheet.is-open .review-sheet__backdrop { opacity: 1; }

.review-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.22, 1.15, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}
.review-sheet.is-open .review-sheet__panel { transform: translateY(0); }

.review-sheet__handle {
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: #e0e0e2;
  margin: 6px auto 10px;
}
.review-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.review-sheet__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.review-sheet__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #424750;
}
.review-sheet__close .ti-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.review-sheet__form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  display: grid;
  gap: 14px;
}

.review-sheet__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8f8f9;
  border-radius: 14px;
  border: 1px solid #f0f0f1;
  animation: reviewFadeUp 0.4s ease both;
}
.review-sheet__product img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.review-sheet__product strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}
.review-sheet__product span {
  font-size: 11px;
  color: var(--pdp-muted);
  font-weight: 600;
}

.review-rate {
  text-align: center;
  padding: 6px 0 2px;
  animation: reviewFadeUp 0.4s ease 0.05s both;
}
.review-rate__label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #424750;
}
.review-rate__stars {
  display: inline-flex;
  gap: 6px;
  direction: ltr;
}
.review-rate__star {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1.3, 0.36, 1), background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.review-rate__star .ti-icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
  color: #c0c2c5;
  transition: color 0.15s ease, transform 0.2s ease;
}
.review-rate__star:hover { background: #fff8e6; transform: translateY(-2px); }
.review-rate__star:active { transform: scale(0.92); }
.review-rate__star.is-on {
  background: #fff6d6;
}
.review-rate__star.is-on .ti-icon {
  color: #f9bc00;
  --ti: url("icons/tabler/star-filled.svg");
  transform: scale(1.08);
}
.review-rate.is-picked .review-rate__label {
  color: #b8860b;
}

.review-field {
  display: grid;
  gap: 6px;
  animation: reviewFadeUp 0.4s ease 0.1s both;
}
.review-field > span {
  font-size: 12px;
  font-weight: 800;
  color: #424750;
}
.review-field input,
.review-field textarea {
  width: 100%;
  border: 1px solid var(--pdp-border);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--pdp-text);
  outline: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  resize: vertical;
  min-height: 48px;
}
.review-field textarea { min-height: 110px; line-height: 1.7; }
.review-field input:focus,
.review-field textarea:focus {
  border-color: var(--pdp-red);
  box-shadow: 0 0 0 4px rgba(239, 57, 78, 0.12);
}
.review-field__count {
  justify-self: end;
  font-size: 11px;
  font-weight: 700;
  color: var(--pdp-hint);
  font-style: normal;
}

.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: reviewFadeUp 0.4s ease 0.14s both;
}
.review-chip {
  border: 1px solid #e0e0e2;
  background: #fff;
  color: #424750;
  border-radius: 9999px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.review-chip:hover { background: #fafafa; }
.review-chip.is-on {
  background: #fff1f2;
  border-color: #ef394e;
  color: #ef394e;
}
.review-chip:active { transform: scale(0.96); }

.review-sheet__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  color: #ef394e;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.review-sheet__error[hidden] { display: none !important; }

.review-sheet__submit {
  position: relative;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--pdp-red);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(239, 57, 78, 0.28);
  transition: background 0.18s ease, transform 0.15s ease;
  animation: reviewFadeUp 0.4s ease 0.18s both;
}
.review-sheet__submit:hover { background: #e02e44; }
.review-sheet__submit:active { transform: scale(0.98); }
.review-sheet__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.review-sheet__submit-text,
.review-sheet__submit-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.review-sheet__submit-ok {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
}
.review-sheet__submit-ok .ti-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
  color: #fff;
  background-color: #fff;
}
.review-sheet__submit.is-success {
  background: #00a049;
  box-shadow: 0 10px 22px rgba(0, 160, 73, 0.28);
}
.review-sheet__submit.is-success .review-sheet__submit-text {
  opacity: 0;
  transform: translateY(-8px);
}
.review-sheet__submit.is-success .review-sheet__submit-ok {
  opacity: 1;
  transform: none;
}

.pdp-comment.is-new {
  animation: reviewCommentIn 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) both;
  background: linear-gradient(180deg, #fff8e8, transparent 70%);
  border-radius: 12px;
  padding-inline: 8px;
  margin-inline: -8px;
}
@keyframes reviewCommentIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes reviewFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

body.is-review-open {
  overflow: hidden;
}

@media (min-width: 720px) {
  .review-sheet {
    align-items: center;
    padding: 24px;
  }
  .review-sheet__panel {
    border-radius: 20px;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.22, 1.15, 0.36, 1), opacity 0.28s ease;
  }
  .review-sheet.is-open .review-sheet__panel {
    transform: none;
    opacity: 1;
  }
  .review-sheet__handle { display: none; }
}

/* تبلت/دسکتاپ: مودال وسط‌صفحه به‌جای شیت گوشه */
@media (min-width: 768px) {
  .cart-sheet__backdrop {
    background: rgba(12, 12, 12, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .cart-sheet__panel {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(440px, calc(100vw - 48px));
    max-width: 440px;
    max-height: min(86vh, 640px);
    border-radius: 16px;
    box-shadow:
      0 24px 64px rgba(15, 23, 42, 0.22),
      0 4px 16px rgba(15, 23, 42, 0.08);
    transform: translate3d(-50%, -42%, 0) scale(0.96);
    opacity: 0;
    padding-bottom: 0;
  }
  .cart-sheet.is-open .cart-sheet__panel {
    transform: translate3d(-50%, -50%, 0) scale(1);
    opacity: 1;
  }
  .cart-sheet.is-closing .cart-sheet__panel {
    transform: translate3d(-50%, -46%, 0) scale(0.98);
    opacity: 0;
  }
  .cart-sheet__handle {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .pdp {
    max-width: 720px;
    margin: 0 auto;
  }
  .pdp-buybar {
    max-width: 720px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 14px 14px 0 0;
  }
}

/* صفحه محصول: فقط FAB پشتیبانی — نوار پایین موبایل اضافه نشود */
.pdp-body .fnav__nav {
  display: none !important;
}
.pdp-body .fnav__dock {
  gap: 0;
}
@media (max-width: 899px) {
  .pdp-body .fnav {
    inset-inline: auto;
    left: 12px;
    right: auto;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    width: auto;
    padding: 0;
    display: flex;
  }
}

/* دسکتاپ ویندوز: گالری + اطلاعات کنار هم (از ۹۰۰px) */
@media (min-width: 900px) {
  .pdp-body {
    padding-bottom: 96px;
  }
  .pdp-body .site-footer {
    margin-bottom: 0;
  }
  .pdp-body .fnav {
    display: flex;
    inset-inline: auto;
    left: 24px;
    right: auto;
    bottom: 24px;
    width: auto;
    padding: 0;
  }
  .pdp {
    max-width: 1180px;
    width: min(1180px, calc(100% - 40px));
    margin: 20px auto 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    column-gap: 24px;
    row-gap: 0;
    align-items: start;
  }
  .pdp-gallery {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    position: relative;
    top: auto;
    border-radius: 12px;
    border: 1px solid var(--pdp-border);
    overflow: hidden;
    background: #fff;
  }
  .pdp-top {
    display: none;
  }
  .pdp-gallery__stage {
    height: min(520px, 68vh);
    max-height: none;
  }
  .pdp-offer {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
  }
  .pdp-head {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 0;
    padding: 20px 20px 22px;
    border: 1px solid var(--pdp-border);
    border-top: 0;
    border-radius: 0 0 12px 12px;
  }
  .pdp-title {
    font-size: 20px;
    line-height: 1.7;
  }
  .pdp-block,
  .pdp-rail,
  .pdp-comments {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
  .pdp-buybar {
    max-width: min(1180px, calc(100% - 40px));
    width: min(1180px, calc(100% - 40px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 16px;
    border-radius: 14px;
    border: 1px solid var(--pdp-border);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
    padding: 12px 18px;
  }
  /* مودال سبد از ۷۶۸px به بالا وسط‌چین است — اینجا override گوشه‌ای نکن */
}
