/* core/styles/product.css: صفحة المنتج. tokens فقط. */
.pdp { padding-top: 16px; }
.crumbs { margin-bottom: 14px; font-size: var(--fs-xs); color: var(--c-muted); }
.crumbs a:hover { color: var(--c-ink); }
.crumbs span { margin: 0 8px; }
.pdp-grid { display: grid; gap: 22px; }
@media (max-width: 899px) { .pdp-media { margin: 0 calc(-1 * var(--gutter)); } }
@media (min-width: 900px) {
  .pdp-grid { grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
  .pdp-info { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- المعرض ---------- */
.gal { position: relative; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; background: var(--c-soft); }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 4; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; }
.gal-ph { display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 9rem; color: var(--c-line-strong); }
.gal-arrow { position: absolute; top: 45%; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); font-size: 1.4rem; line-height: 1; display: none; align-items: center; justify-content: center; }
.gal-prev { left: 12px; } .gal-next { right: 12px; }
@media (hover: hover) and (min-width: 900px) { .gal-arrow { display: flex; } }
.gal-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gal-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--c-line-strong); }
.gal-dot[aria-current="true"] { background: var(--c-ink); }
.gal-thumbs { display: none; }
@media (min-width: 900px) {
  .gal-dots { display: none; }
  .gal-thumbs { display: flex; gap: 8px; margin-top: 10px; }
  .gal-thumb { width: 72px; aspect-ratio: 3 / 4; padding: 0; border: 0; background: var(--c-soft); opacity: .55; overflow: hidden; transition: opacity var(--t-fast); }
  .gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .gal-thumb[aria-current="true"], .gal-thumb:hover { opacity: 1; }
}

/* ---------- المعلومات ---------- */
.pdp-title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); font-weight: 500; line-height: 1.15; }
.pdp-sub { margin: 6px 0 0; color: var(--c-muted); }
.pdp-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.pdp-now { font-size: var(--fs-lg); font-weight: 500; }
.pdp-price:has(.pdp-was) .pdp-now { color: var(--c-accent); }
.pdp-was { color: var(--c-muted); }
.pdp-off { font-size: var(--fs-sm); color: var(--c-accent); font-weight: 500; }

.opt { margin-top: 24px; }
.opt-head { display: flex; gap: 8px; margin-bottom: 10px; font-size: var(--fs-sm); font-weight: 500; }
.opt-sel { color: var(--c-muted); font-weight: 400; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { min-width: 52px; height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--c-bg); border: 1px solid var(--c-line-strong); border-radius: 999px; font-size: var(--fs-sm); transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.opt-btn:hover:not(:disabled) { border-color: var(--c-ink); }
.opt-btn[aria-pressed="true"] { border-color: var(--c-ink); background: var(--c-ink); color: var(--c-on-ink); }
.opt-color[aria-pressed="true"] i { border-color: var(--c-on-ink); }
.opt-btn:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.opt-color i { width: 16px; height: 16px; border-radius: 50%; background: var(--sw, var(--c-soft)); border: 1px solid var(--c-line-strong); }
.opt.is-err .opt-list { outline: 1px solid var(--c-danger); outline-offset: 4px; }
.opt-err { margin: 10px 0 0; color: var(--c-danger); font-size: var(--fs-xs); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line-strong); border-radius: 999px; }
.qty button { width: 44px; height: 44px; background: none; border: 0; font-size: 1.2rem; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty-val { width: 48px; line-height: 44px; text-align: center; }
.stock-note { margin: 12px 0 0; color: var(--c-warn); font-size: var(--fs-sm); }

.pdp-cta { display: grid; gap: 10px; margin-top: 24px; }
.pdp-cta .btn { width: 100%; }
.pdp-desc { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--c-line); color: var(--c-ink-soft); white-space: pre-line; max-width: 62ch; line-height: 1.65; }
.pdp-trust { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--c-muted); }
.pdp-trust li { display: flex; gap: 10px; align-items: center; }
.pdp-trust li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--c-line-strong); flex: none; }

.related { margin-top: 72px; }
.related .sec-head h2 { font-family: var(--f-body); font-size: var(--fs-lg); font-weight: 500; }

/* ---------- شريط الشراء (موبايل) ---------- */
.buybar { display: none; }
@media (max-width: 767px) {
  .buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-header); align-items: center; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); border-top: 1px solid var(--c-line); transform: translateY(110%); transition: transform var(--t) var(--ease); display: flex; }
  .buybar.on { transform: translateY(0); }
  .buybar-info { flex: 1; min-width: 0; }
  .buybar-name { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar-price { font-weight: 600; font-size: var(--fs-sm); }
  .buybar .btn { flex: none; padding: 12px 22px; }
}