/* ═══════════════════════════════════════════════
   متجر فرح مصر — Product landing page (pages/product.html · /p/<slug>)
   Mobile-first. المتغيرات الأساسية من style.css وقيم احتياطية للبراند.
   ═══════════════════════════════════════════════ */
:root {
  --pp-navy: var(--navy-900, #0B1929);
  --pp-navy-2: var(--navy-800, #12263F);
  --pp-gold: var(--gold-500, #D4A853);
  --pp-gold-l: var(--gold-300, #F0D78C);
  --pp-gold-d: var(--gold-700, #9A7428);
  --pp-cream: var(--cream, #F7F3EA);
  --pp-ink: var(--ink, #0B1929);
  --pp-muted: #5B6475;
  --pp-soft: #8A93A3;
  --pp-line: rgba(11, 25, 41, 0.09);
  --pp-ok: var(--success, #157F4F);
  --pp-low: #B45309;
  --pp-err: #C0362C;
  --pp-r: 20px;
  --pp-r-sm: 14px;
  --pp-shadow: 0 1px 2px rgba(11, 25, 41, 0.04), 0 12px 32px rgba(11, 25, 41, 0.07);
  --pp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pp-font: var(--font, 'Cairo', system-ui, sans-serif);
  /* الهيدر sticky (style.css) — product.js بيقيس ويحدّث القيم دي */
  --pp-top: var(--nav-h, 64px);
  --pp-pad: 0px;
}

/* انتقال ناعم من كارت المنتج للصفحة (cross-document view transition) */
@view-transition { navigation: auto; }
#gallery-main-img { view-transition-name: product-image; }
::view-transition-group(product-image) { animation-duration: 0.35s; animation-timing-function: var(--pp-ease); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

.pp-body { background: #F6F4EF; }
.pp { font-family: var(--pp-font); color: var(--pp-ink); padding: calc(var(--pp-pad) + 16px) 0 48px; }
.pp [hidden], .pp-buybar[hidden], .pp-lightbox [hidden] { display: none !important; }
.pp-wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.pp h1, .pp h2, .pp h3 { font-family: var(--pp-font); letter-spacing: 0; }

/* ── Mobile mini header ── */
.pp-mobilebar { display: none; }
.pp-iconbtn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--pp-navy);
  border: 1px solid var(--pp-line); box-shadow: 0 2px 8px rgba(11, 25, 41, 0.06);
}

/* ── Breadcrumb ── */
.pp-crumbs { margin-bottom: 16px; font-size: 0.84rem; color: var(--pp-muted); }
.pp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.pp-crumbs li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; }
.pp-crumbs li:last-child { overflow: hidden; }
.pp-crumbs li:last-child span { overflow: hidden; text-overflow: ellipsis; color: var(--pp-ink); font-weight: 700; }
.pp-crumbs li + li::before { content: '›'; color: var(--pp-soft); font-size: 1rem; }
.pp-crumbs a { color: var(--pp-muted); }
.pp-crumbs a:hover { color: var(--pp-gold-d); }

/* ── Unavailable ── */
.pp-unavailable { text-align: center; padding: 40px 20px; max-width: 560px; margin: 8px auto 32px; background: #fff; border-radius: var(--pp-r); border: 1px solid var(--pp-line); box-shadow: var(--pp-shadow); }
.pp-unavailable-icon { font-size: 3rem; }
.pp-unavailable h1 { font-size: 1.45rem; font-weight: 900; color: var(--pp-navy); margin: 8px 0; line-height: 1.4; }
.pp-unavailable p { color: var(--pp-muted); margin-bottom: 20px; }
.pp-unavailable-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Hero layout ── */
.pp-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 960px) {
  .pp-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; }
  .pp-gallery { position: sticky; top: calc(var(--pp-top) + 16px); }
}

/* ── Gallery ── */
.pp-gallery { min-width: 0; }
.pp-stage {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 24px; overflow: hidden;
  background: #fff; border: 1px solid var(--pp-line); box-shadow: var(--pp-shadow);
}
.pp-track {
  display: flex; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  outline: none;
}
.pp-track::-webkit-scrollbar { display: none; }
.pp-track:focus-visible { box-shadow: inset 0 0 0 3px var(--pp-gold); }
.pp-slide {
  position: relative; flex: 0 0 100%; height: 100%; margin: 0;
  scroll-snap-align: center; scroll-snap-stop: always;
  cursor: zoom-in; background: #fff;
}
.pp-slide img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pp-real-badge {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; color: #fff;
  background: rgba(11, 25, 41, 0.82); backdrop-filter: blur(6px);
  pointer-events: none;
}
.pp-stage-nav, .pp-stage-zoom {
  position: absolute; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92); color: var(--pp-navy);
  box-shadow: 0 4px 14px rgba(11, 25, 41, 0.14);
  transition: transform 0.2s, background 0.2s, opacity 0.2s;
}
.pp-stage-nav:hover, .pp-stage-zoom:hover { background: #fff; transform: scale(1.06); }
.pp-stage-nav { top: 50%; margin-top: -21px; opacity: 0; }
.pp-stage:hover .pp-stage-nav, .pp-stage-nav:focus-visible { opacity: 1; }
.pp-stage-prev { right: 12px; }
.pp-stage-next { left: 12px; }
.pp-stage-zoom { top: 12px; left: 12px; }
.pp-stage-count {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font-size: 0.78rem; font-weight: 800; color: var(--pp-navy);
  background: rgba(255, 255, 255, 0.92); padding: 3px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
@media (hover: none) { .pp-stage-nav { display: none; } }

.pp-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.pp-thumbs::-webkit-scrollbar { display: none; }
.pp-thumb {
  position: relative; flex: 0 0 auto; width: 68px; height: 68px;
  border-radius: 14px; overflow: hidden; background: #fff;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--pp-line);
  opacity: 0.72; transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-thumb:hover { opacity: 1; }
.pp-thumb.active { opacity: 1; border-color: var(--pp-gold); box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3); }
.pp-thumb-real { position: absolute; bottom: 3px; right: 3px; font-size: 0.65rem; line-height: 1; padding: 2px; border-radius: 6px; background: #fff; }

/* ── فيديو المنتج جوه المعرض ── */
.pp-slide-video { cursor: pointer; background: var(--pp-navy); overflow: hidden; }
.pp-slide-video img { object-fit: cover; filter: saturate(1.05); transform: scale(1.02); transition: transform 0.4s ease; }
.pp-slide-video:hover img { transform: scale(1.05); }
.pp-slide-video::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 25, 41, 0.55), rgba(11, 25, 41, 0) 45%);
}
.pp-vplay {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 4px;
  color: var(--pp-navy); background: var(--pp-gold);
  box-shadow: 0 0 0 10px rgba(212, 168, 83, 0.28), 0 10px 30px rgba(11, 25, 41, 0.35);
  transition: transform 0.2s ease;
}
.pp-slide-video:hover .pp-vplay { transform: scale(1.07); }
.pp-vlabel {
  position: absolute; bottom: 14px; right: 50%; transform: translateX(50%); z-index: 2;
  white-space: nowrap; padding: 6px 14px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 800; color: #fff;
  background: rgba(11, 25, 41, 0.78); backdrop-filter: blur(6px);
}
.pp-slide-video.is-playing { cursor: default; }
.pp-slide-video.is-playing::after { display: none; }
.pp-slide-video video, .pp-lb-video video {
  width: 100%; height: 100%; object-fit: contain; background: var(--pp-navy); display: block;
}
.pp-lb-video { display: grid; place-items: center; }
.pp-thumb-video { opacity: 0.9; }
.pp-thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.05rem; color: #fff; background: rgba(11, 25, 41, 0.38);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .pp-slide-video img, .pp-vplay { transition: none; } .pp-slide-video:hover img { transform: none; } }

/* ── Buy box ── */
.pp-buy { min-width: 0; }
@media (min-width: 960px) {
  .pp-buy { background: #fff; border-radius: 24px; padding: 28px; border: 1px solid var(--pp-line); box-shadow: var(--pp-shadow); }
}
.pp-buy-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pp-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8rem; font-weight: 700; color: var(--pp-navy);
  background: var(--pp-cream); border: 1px solid rgba(212, 168, 83, 0.35);
  padding: 4px 12px; border-radius: 999px;
}
.pp-chip:hover { border-color: var(--pp-gold); }
.pp-share {
  display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto;
  font-size: 0.82rem; font-weight: 700; color: var(--pp-navy);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--pp-line); background: #fff;
}
.pp-share:hover { border-color: var(--pp-gold); }
.pp-title { font-size: clamp(1.4rem, 4.6vw, 2rem); font-weight: 900; line-height: 1.4; color: var(--pp-navy); margin: 0; }
.pp-title-en { font-size: 0.85rem; color: var(--pp-soft); margin-top: 2px; text-align: right; }
.pp-title-en:empty { display: none; }
.pp-headline { font-size: 1.02rem; font-weight: 600; color: var(--pp-muted); line-height: 1.7; margin-top: 8px; }
.pp-rating { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 0.85rem; color: var(--pp-muted); }
.pp-stars { color: var(--pp-gold); letter-spacing: 1px; }

.pp-price { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #fff, #FBF8F1); border: 1px solid var(--pp-line); }
.pp-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pp-price-now { font-size: clamp(1.8rem, 6vw, 2.2rem); font-weight: 900; color: var(--pp-navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pp-price-now small { font-size: 0.55em; font-weight: 800; }
.pp-price-was { font-size: 1.05rem; font-weight: 600; color: var(--pp-soft); }
.pp-price-badge { font-size: 0.8rem; font-weight: 800; color: #9A2A20; background: #FDECEA; padding: 4px 10px; border-radius: 999px; }
.pp-offer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 0.88rem; font-weight: 700; color: var(--pp-navy); }
.pp-countdown { font-variant-numeric: tabular-nums; font-weight: 800; color: #9A2A20; background: #FDECEA; padding: 3px 10px; border-radius: 999px; }

.pp-stockline { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.92rem; font-weight: 700; min-height: 1.4em; }
.pp-stockline:empty { display: none; }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pp-dot.is-in { background: var(--pp-ok); box-shadow: 0 0 0 4px rgba(22, 134, 90, 0.14); }
.pp-dot.is-low { background: var(--pp-low); box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.14); }
.pp-dot.is-out { background: var(--pp-err); box-shadow: 0 0 0 4px rgba(192, 54, 44, 0.12); }
.pp-stockline .is-in { color: var(--pp-ok); }
.pp-stockline .is-low { color: var(--pp-low); }
.pp-stockline .is-out { color: var(--pp-err); }

.pp-variants { margin-top: 16px; }
.pp-label { font-size: 0.9rem; font-weight: 800; margin-bottom: 8px; }
.pp-variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-variant { min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1.5px solid #DFE2E8; background: #fff; font-weight: 700; color: var(--pp-ink); }
.pp-variant:hover { border-color: var(--pp-gold); }
.pp-variant.active { border-color: var(--pp-navy); background: var(--pp-navy); color: #fff; }

/* CTA */
.pp-cta { margin-top: 18px; display: grid; gap: 10px; }
.pp-cta-row { display: flex; gap: 10px; align-items: stretch; }
.pp-qty {
  display: flex; align-items: center; flex-shrink: 0;
  height: 56px; border-radius: 16px; background: #fff;
  border: 1.5px solid #DFE2E8;
}
.pp-qty button { width: 44px; height: 100%; font-size: 1.3rem; font-weight: 700; color: var(--pp-navy); border-radius: 14px; }
.pp-qty button:hover:not(:disabled) { background: var(--pp-cream); }
.pp-qty button:disabled { color: #C5CAD3; cursor: not-allowed; }
.pp-qty input {
  width: 36px; text-align: center; border: 0; background: transparent;
  font-family: var(--pp-font); font-size: 1.1rem; font-weight: 800; color: var(--pp-ink);
  -moz-appearance: textfield; appearance: textfield;
}
.pp-qty input::-webkit-outer-spin-button, .pp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 14px;
  font-family: var(--pp-font); font-size: 1rem; font-weight: 800; line-height: 1.2;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s, background 0.2s;
}
.pp-btn:active { transform: scale(0.98); }
.pp-btn-lg { min-height: 56px; font-size: 1.06rem; border-radius: 16px; flex: 1; }
.pp-btn-block { width: 100%; }
.pp-btn-primary { background: var(--pp-navy); color: #fff; box-shadow: 0 10px 24px rgba(11, 25, 41, 0.22); }
.pp-btn-primary:hover { filter: brightness(1.18); }
.pp-btn-gold { background: linear-gradient(135deg, var(--pp-gold-l), var(--pp-gold)); color: var(--pp-ink); box-shadow: 0 10px 24px rgba(212, 168, 83, 0.32); }
.pp-btn-gold:hover { filter: brightness(1.04); }
.pp-btn-ghost { background: #fff; color: var(--pp-navy); border: 1.5px solid var(--pp-line); }
.pp-btn-ghost:hover { border-color: var(--pp-gold); }
.pp-btn.is-added { background: var(--pp-ok); color: #fff; box-shadow: 0 10px 24px rgba(22, 134, 90, 0.25); }

/* Notify */
.pp-notify { padding: 16px; border-radius: 18px; background: #FFF9EC; border: 1px solid rgba(212, 168, 83, 0.45); }
.pp-notify-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 1.3rem; }
.pp-notify h2 { font-size: 1rem; font-weight: 800; color: var(--pp-navy); margin: 0; line-height: 1.5; }
.pp-notify p { font-size: 0.86rem; color: var(--pp-muted); margin: 0; }
.pp-notify-form { display: grid; gap: 8px; margin-bottom: 10px; }
.pp-input {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font-family: var(--pp-font); font-size: 16px; color: var(--pp-ink);
  background: #fff; border: 1.5px solid #DFE2E8; border-radius: 14px;
}
.pp-input[dir="ltr"]:placeholder-shown { direction: rtl; }
.pp-input:focus { outline: none; border-color: var(--pp-gold); box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.18); }
.pp-notify-done { display: flex; flex-direction: column; gap: 2px; text-align: center; color: var(--pp-ok); padding: 6px; }

/* Trust */
.pp-trust { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pp-trust li { display: flex; min-width: 0; }
.pp-trust li:not(:has(.pp-trust-wa)), .pp-trust-wa {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--pp-line);
}
.pp-trust-wa { color: inherit; border-color: rgba(31, 175, 83, 0.35); background: #F1FBF4; transition: border-color 0.2s; }
.pp-trust-wa:hover { border-color: #1FAF53; }
.pp-trust-wa .pp-trust-ic { color: #1FAF53; background: #fff; }
.pp-trust-ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--pp-gold-d); background: var(--pp-cream); }
.pp-trust-ic + span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pp-trust strong { font-size: 0.82rem; font-weight: 800; color: var(--pp-ink); }
.pp-trust small { font-size: 0.72rem; color: var(--pp-muted); }

.pp-shipnote { margin-top: 12px; font-size: 0.82rem; color: var(--pp-muted); line-height: 1.7; }
.pp-sku { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8rem; color: var(--pp-soft); }
.pp-sku strong { color: var(--pp-muted); font-family: ui-monospace, monospace; font-weight: 700; }
.pp-sku button { color: var(--pp-muted); padding: 4px; border-radius: 8px; display: grid; place-items: center; }
.pp-sku button:hover { color: var(--pp-navy); background: var(--pp-cream); }

/* ── Details ── */
.pp-details { margin-top: 36px; }
.pp-jump {
  position: sticky; top: calc(var(--pp-top) + 8px); z-index: 5;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin-bottom: 18px; width: max-content; max-width: 100%;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--pp-line); border-radius: 999px; box-shadow: 0 6px 20px rgba(11, 25, 41, 0.06);
}
.pp-jump::-webkit-scrollbar { display: none; }
.pp-jump a { flex-shrink: 0; font-size: 0.85rem; font-weight: 700; color: var(--pp-navy); padding: 6px 14px; border-radius: 999px; }
.pp-jump a:hover { background: var(--pp-cream); }
.pp-section { margin-top: 36px; scroll-margin-top: calc(var(--pp-top) + 70px); }
.pp-details > .pp-section:first-of-type { margin-top: 0; }
.pp-h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); font-weight: 900; color: var(--pp-navy); margin: 0 0 14px; line-height: 1.35; }
.pp-intro { font-size: 1.02rem; line-height: 1.9; color: var(--pp-ink); max-width: 760px; margin-bottom: 18px; }

.pp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 760px) { .pp-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pp-card-wide { grid-column: 1 / -1; } }
.pp-card { background: #fff; border-radius: var(--pp-r); padding: 18px; border: 1px solid var(--pp-line); box-shadow: var(--pp-shadow); scroll-margin-top: calc(var(--pp-top) + 70px); }
.pp-card-title { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 800; color: var(--pp-navy); margin: 0 0 12px; line-height: 1.4; }
.pp-card-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-cream); font-size: 1.05rem; flex-shrink: 0; }
.pp-card p { font-size: 0.95rem; line-height: 1.85; color: var(--pp-ink); margin: 0; }
.pp-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 760px) { .pp-checklist { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 20px; } }
.pp-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; line-height: 1.7; }
.pp-check { width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: linear-gradient(135deg, var(--pp-gold), var(--pp-gold-d)); }
.pp-boxlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-boxlist li { position: relative; padding-inline-start: 18px; font-size: 0.95rem; line-height: 1.7; }
.pp-boxlist li::before { content: ''; position: absolute; right: 0; top: 0.7em; width: 7px; height: 7px; border-radius: 2px; background: var(--pp-gold); transform: rotate(45deg); }
.pp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.pp-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #FAFAF7; font-size: 0.95rem; line-height: 1.7; }
.pp-step-n { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 900; font-size: 0.9rem; color: var(--pp-gold-l); background: var(--pp-navy); }
.pp-card-warn { background: #FFFBF3; border-color: rgba(212, 168, 83, 0.45); }
.pp-card-warn .pp-card-ic { background: #FDF0D0; }

/* FAQ */
.pp-faq { display: grid; gap: 10px; max-width: 860px; }
.pp-faq-item { background: #fff; border-radius: 16px; border: 1px solid var(--pp-line); overflow: hidden; transition: box-shadow 0.2s, border-color 0.2s; }
.pp-faq-item[open] { border-color: rgba(212, 168, 83, 0.55); box-shadow: var(--pp-shadow); }
.pp-faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-size: 0.97rem; font-weight: 800; color: var(--pp-navy); line-height: 1.5;
}
.pp-faq-item summary::-webkit-details-marker { display: none; }
.pp-faq-item summary:focus-visible { outline: 3px solid var(--pp-gold); outline-offset: -3px; border-radius: 16px; }
.pp-faq-ic { position: relative; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--pp-cream); }
.pp-faq-ic::before, .pp-faq-ic::after { content: ''; position: absolute; top: 50%; left: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; border-radius: 2px; background: var(--pp-navy); transition: transform 0.25s var(--pp-ease); }
.pp-faq-ic::after { transform: rotate(90deg); }
.pp-faq-item[open] .pp-faq-ic::after { transform: rotate(0); }
.pp-faq-a { padding: 0 18px 16px; font-size: 0.93rem; line-height: 1.85; color: var(--pp-muted); }
.pp-faq-more { display: inline-flex; margin-top: 14px; font-size: 0.9rem; font-weight: 800; color: #168A43; }

/* ── Rails (related / recent) ── */
.pp-rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pp-rail-all { font-size: 0.86rem; font-weight: 700; color: var(--pp-navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(212, 168, 83, 0.7); white-space: nowrap; }
.pp-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 12px; scrollbar-width: none;
}
.pp-rail::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .pp-rail { grid-auto-columns: 30%; } }
@media (min-width: 960px) { .pp-rail { grid-auto-columns: calc((100% - 36px) / 4); } }
.pp-mini { position: relative; scroll-snap-align: start; background: #fff; border-radius: 18px; border: 1px solid var(--pp-line); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.pp-mini:hover { box-shadow: var(--pp-shadow); transform: translateY(-2px); }
.pp-mini-link { display: flex; flex-direction: column; color: inherit; height: 100%; }
.pp-mini-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--pp-cream); }
.pp-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-mini-badge { position: absolute; top: 8px; right: 8px; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--pp-navy); color: var(--pp-gold-l); }
.pp-mini-badge-sale { background: #C0362C; color: #fff; }
.pp-mini-out { position: absolute; inset: auto 8px 8px auto; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--pp-err); }
.pp-mini.is-out .pp-mini-img img { filter: grayscale(0.6); opacity: 0.75; }
.pp-mini-name { padding: 10px 12px 2px; font-size: 0.86rem; font-weight: 700; line-height: 1.45; min-height: calc(0.86rem * 1.45 * 2 + 12px); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-mini-price { padding: 2px 12px 12px; padding-inline-end: 52px; font-size: 0.8rem; color: var(--pp-soft); }
.pp-mini-price strong { font-size: 0.95rem; color: var(--pp-navy); font-weight: 900; }
.pp-mini-add {
  position: absolute; left: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; background: var(--pp-navy);
  box-shadow: 0 6px 14px rgba(11, 25, 41, 0.2); transition: transform 0.15s, background 0.2s;
}
.pp-mini-add:hover { transform: scale(1.06); }
.pp-mini-add.is-added { background: var(--pp-ok); }

/* ── Sticky buy bar ── */
.pp-buybar {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--pp-line); box-shadow: 0 -10px 30px rgba(11, 25, 41, 0.1);
  font-family: var(--pp-font);
  transform: translateY(110%); transition: transform 0.35s var(--pp-ease);
}
.pp-buybar.is-visible { transform: none; }
.pp-buybar-cart { position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: var(--pp-navy); background: var(--pp-cream); }
.pp-buybar-count { position: absolute; top: -5px; left: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: #fff; background: #C0362C; border: 2px solid #fff; }
.pp-buybar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pp-buybar-name { font-size: 0.78rem; font-weight: 600; color: var(--pp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-buybar-price strong { font-size: 1.1rem; font-weight: 900; color: var(--pp-navy); }
.pp-buybar-price s { font-size: 0.78rem; color: var(--pp-soft); }
.pp-buybar .pp-btn { min-height: 48px; padding: 0 18px; flex-shrink: 0; }
@media (min-width: 960px) {
  .pp-buybar { left: 50%; right: auto; bottom: 16px; width: min(640px, calc(100% - 32px)); border-radius: 20px; border: 1px solid var(--pp-line); transform: translate(-50%, 140%); padding: 10px 12px; }
  .pp-buybar.is-visible { transform: translate(-50%, 0); }
}
/* الشريط بياخد مكان الـ bottom nav على الموبايل وهو ظاهر */
.mobile-bottom-nav { transition: transform 0.35s var(--pp-ease), opacity 0.35s; }
body.pp-buybar-on .mobile-bottom-nav { transform: translateY(calc(100% + 24px)) !important; opacity: 0; pointer-events: none; }
@media (max-width: 899px) { body.pp-buybar-on .back-top { bottom: calc(92px + env(safe-area-inset-bottom)); } }
@media (min-width: 900px) { body.pp-buybar-on .back-top { bottom: 100px; } }

/* ── Lightbox ── */
.pp-lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; inset: 0;
  background: #0B1929; color: #fff; overflow: hidden;
}
.pp-lightbox::backdrop { background: rgba(11, 25, 41, 0.92); }
.pp-lightbox[open] { display: block; animation: ppFade 0.25s ease; }
html.pp-lb-open { overflow: hidden; }
.pp-lb-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(180deg, rgba(11, 25, 41, 0.7), transparent); }
.pp-lb-count { font-weight: 800; font-variant-numeric: tabular-nums; }
.pp-lb-hint { font-size: 0.78rem; opacity: 0.7; }
.pp-lb-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.14); }
.pp-lb-close:hover { background: rgba(255, 255, 255, 0.26); }
.pp-lb-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.pp-lb-track::-webkit-scrollbar { display: none; }
.pp-lb-track.is-zoomed { overflow: hidden; scroll-snap-type: none; }
.pp-lb-slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; direction: ltr; }
.pp-lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.pp-lb-slide.is-zoomed { overflow: auto; display: block; }
.pp-lb-slide.is-zoomed img { width: 220%; max-width: none; max-height: none; height: auto; cursor: zoom-out; }
.pp-lb-slide .pp-real-badge { bottom: calc(20px + env(safe-area-inset-bottom)); right: 50%; transform: translateX(50%); }
.pp-lb-nav { position: absolute; z-index: 3; top: 50%; margin-top: -24px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.14); }
.pp-lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.pp-lb-prev { right: 16px; }
.pp-lb-next { left: 16px; }
@media (hover: none) { .pp-lb-nav { display: none; } }
@keyframes ppFade { from { opacity: 0; } to { opacity: 1; } }

/* ── Mobile ── */
@media (max-width: 768px) {
  /* لو الهيدر العام مخفي على الموبايل، الصفحة بتعرض هيدر صغير خاص بيها (product.js بيحدد) */
  .pp { padding-top: calc(var(--pp-pad) + 10px); }
  body:not(.pp-has-header) .pp-mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .pp-mobilebar-logo { font-family: 'Tajawal', var(--pp-font); font-weight: 800; font-size: 1.2rem; color: var(--pp-gold-d); }
  .pp-wrap { width: calc(100% - 24px); }
  .pp-crumbs { font-size: 0.78rem; margin-bottom: 10px; }
  .pp-stage { border-radius: 20px; }
  .pp-thumb { width: 58px; height: 58px; border-radius: 12px; }
  .pp-trust { gap: 6px; }
  .pp-trust li:not(:has(.pp-trust-wa)), .pp-trust-wa { padding: 8px; gap: 8px; }
  .pp-trust-ic { width: 32px; height: 32px; border-radius: 10px; }
  .pp-details { margin-top: 28px; }
  .pp-section { margin-top: 28px; }
  .pp-card { padding: 16px; }
  .pp-jump { top: 8px; }
}
@media (max-width: 360px) {
  .pp-trust { grid-template-columns: minmax(0, 1fr); }
  .pp-qty button { width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .pp-buybar, .mobile-bottom-nav, .pp-thumb, .pp-mini, .pp-faq-ic::before, .pp-faq-ic::after { transition: none !important; }
  .pp-lightbox[open] { animation: none; }
}

/* ▶ فيديو المنتج على الطبيعة */
.pp-video-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; width: 100%; justify-content: center; padding: 12px 16px; border-radius: 14px; border: 1.5px solid rgba(212,168,83,.6); background: #0B1929; color: #F4EBDD; font: inherit; font-weight: 800; font-size: .98rem; cursor: pointer; }
.pp-video-btn span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #D4A853; color: #0B1929; font-size: .8rem; }
.pp-video-btn:hover { background: #13263d; }
.pp-video-btn[hidden] { display: none; }
