/* ==========================================================================
   product.css — صفحة المنتج (product.php) — تصميم "المسرح" الجديد
   يعتمد على متغيرات header.php: --accent --accent-glow --bg-dark --bg-light --bg-surface-glass
   --border-color --text-primary --text-secondary --text-muted  (+ خط Cairo)
   أسماء الأصناف التي تعتمد عليها الجافاسكربت محفوظة كما هي:
   #main-img .thumbnail-item(.active) .color-btn(.color-btn-item .unit-btn-item .active .out-of-stock .color-swatch-btn)
   #product_price_display #old_price_span #current_price_span #sale_badge #sticky-price-display
   .tab-btn(.active) .tab-content(.active) .slider-container-wrapper .slider-arrow-left/right .products-grid .product-card*
   .sticky-mobile-buy-bar(.show) #lightbox(.show) #toast(.show .error) .share-menu #review_form_container
   ========================================================================== */
.pd {
    --pd-r: 22px; --pd-r-sm: 14px;
    --pd-surface: rgba(15, 19, 26, 0.62);
    --pd-surface-2: rgba(255, 255, 255, 0.03);
    --pd-border: rgba(255, 255, 255, 0.07);
    --pd-border-strong: rgba(255, 255, 255, 0.13);
    --pd-accent-soft: rgba(255, 204, 0, 0.10);
    --pd-accent-line: rgba(255, 204, 0, 0.35);
    --pd-green: #10b981; --pd-red: #ef4444; --pd-blue: #38bdf8; --pd-purple: #a78bfa; --pd-wa: #25D366;
    --pd-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary, #f8fafc);
    max-width: 1320px; margin: 0 auto; padding: 22px 20px 80px;
    direction: rtl;
}
.pd *, .pd *::before, .pd *::after { box-sizing: border-box; }
.pd a { color: inherit; text-decoration: none; }
.pd button { font-family: inherit; }

/* ---------- مسار التنقل + أزرار الأدمن ---------- */
.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted, #64748b); min-width: 0; }
.pd-crumbs a { color: var(--text-secondary, #cbd5e1); transition: color .2s; }
.pd-crumbs a:hover { color: var(--accent); }
.pd-crumbs i { font-size: 10px; opacity: .6; }
.pd-crumbs [aria-current] { color: #fff; font-weight: 700; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-admin { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-ghost { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--pd-border-strong); background: var(--pd-surface-2); color: var(--text-secondary, #cbd5e1); font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .2s; }
.pd-ghost:hover { border-color: var(--pd-accent-line); color: var(--accent); background: var(--pd-accent-soft); transform: translateY(-1px); }
.pd-ghost--warn { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); }

/* ---------- البطل: المسرح (الصور) + لوحة الشراء ---------- */
.pd-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); gap: 28px; align-items: start; }

.pd-stage { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; }
.pd-stage__main { position: relative; order: 2; aspect-ratio: 1 / 1; border-radius: var(--pd-r); overflow: hidden; background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 204, 0, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(20, 25, 34, 0.9), rgba(10, 13, 19, 0.95));
    border: 1px solid var(--pd-border); box-shadow: var(--pd-shadow); cursor: zoom-in; }
.pd-stage__main::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 -80px 120px rgba(0, 0, 0, 0.35); border-radius: inherit; }
.pd-stage__main img { width: 100%; height: 100%; object-fit: contain; padding: 26px; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.pd-stage__main:hover img { transform: scale(1.04); }
.pd-zoom { position: absolute; bottom: 14px; inset-inline-start: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(8, 11, 17, 0.7); backdrop-filter: blur(10px); color: #e2e8f0; font-size: 12px; font-weight: 700; cursor: zoom-in; }
.pd-ribbons { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.pd-ribbon { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.pd-ribbon--sale { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.pd-ribbon--out { background: rgba(15, 19, 26, 0.85); border: 1px solid rgba(239, 68, 68, 0.5); color: #fca5a5; }
.pd-ribbon--new { background: linear-gradient(135deg, var(--accent), #e6b800); color: #000; }

.pd-thumbs { order: 1; display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.thumbnail-item { width: 80px; height: 80px; flex: 0 0 auto; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: rgba(0, 0, 0, 0.3); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.thumbnail-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbnail-item:hover { transform: translateY(-2px); border-color: var(--pd-border-strong); }
.thumbnail-item.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--pd-accent-soft), 0 8px 18px rgba(0, 0, 0, 0.35); }

/* ---------- لوحة الشراء ---------- */
.pd-buy { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--pd-r); background: var(--pd-surface); border: 1px solid var(--pd-border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--pd-shadow); }
body.admin-mode .pd-buy { top: 140px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--pd-surface-2); border: 1px solid var(--pd-border); color: var(--text-secondary, #cbd5e1); font-size: 12px; font-weight: 700; }
.pd-chip i { color: var(--accent); font-size: 11px; }
.pd-chip a:hover { color: var(--accent); }
.pd-chip--sku { font-family: ui-monospace, 'Cairo', monospace; direction: ltr; letter-spacing: .4px; }
.pd-title { margin: 6px 0 2px; font-size: clamp(22px, 2.3vw, 30px); font-weight: 900; line-height: 1.35; color: #fff; }
.pd-title-en { font-size: 14px; color: var(--text-muted, #64748b); direction: ltr; text-align: end; font-weight: 600; }
.pd-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.star-rating { color: var(--accent); font-size: 14px; letter-spacing: 1px; }
.pd-rating { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary, #cbd5e1); }
.pd-rating b { color: #fff; }
.stock-badge { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.stock-badge.in_stock { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stock-badge.out_of_stock { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.stock-badge i { font-size: 11px; }

.pd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; padding: 16px 18px; border-radius: var(--pd-r-sm); background: linear-gradient(135deg, rgba(255, 204, 0, 0.10), rgba(255, 204, 0, 0.03)); border: 1px solid var(--pd-accent-line); }
.price-old { text-decoration: line-through; color: var(--text-muted, #64748b); font-size: 15px; font-weight: 700; }
.price-now { font-size: clamp(28px, 3vw, 36px); font-weight: 900; color: var(--accent); line-height: 1; text-shadow: 0 0 24px rgba(255, 204, 0, 0.25); }
.price-cur { font-size: 15px; font-weight: 800; color: var(--text-secondary, #cbd5e1); }
.sale-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); font-size: 12px; font-weight: 800; }
.pd-price__meta { flex-basis: 100%; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary, #cbd5e1); }
.pd-price__meta b { color: #fff; font-weight: 800; }
.pd-price__meta .dot { opacity: .35; }

/* الخيارات (الألوان) + وحدات الشراء */
.pd-opt { display: flex; flex-direction: column; gap: 10px; }
.pd-opt__label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--text-secondary, #cbd5e1); }
.pd-opt__label i { color: var(--accent); }
.pd-opt__value { margin-inline-start: auto; font-weight: 700; color: var(--accent); font-size: 12.5px; }
.options-row { display: flex; flex-wrap: wrap; gap: 10px; }
.color-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 14px; border-radius: 12px; border: 1.5px solid var(--pd-border-strong); background: var(--pd-surface-2); color: var(--text-secondary, #cbd5e1); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .2s, box-shadow .2s; }
.color-btn:hover { border-color: var(--pd-accent-line); color: #fff; transform: translateY(-1px); }
.color-btn.active { border-color: var(--accent); background: var(--pd-accent-soft); color: #fff; box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.12); }
.color-btn.active::after { content: '\f00c'; font: 900 9px/1 'Font Awesome 6 Free'; position: absolute; top: -7px; inset-inline-end: -7px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #000; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.color-btn.out-of-stock { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }
/* شخط أحمر مائل خفيف على الخيارات النافذة (نص أو عيّنة لون) */
.color-btn.out-of-stock::before { content: ''; position: absolute; left: -6%; right: -6%; top: 50%; height: 2px; margin-top: -1px; background: rgba(239, 68, 68, 0.85); transform: rotate(-24deg); pointer-events: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.color-btn.out-of-stock.color-swatch-btn::before { left: 8%; right: 8%; transform: rotate(-45deg); }
.color-btn.out-of-stock.color-swatch-btn { overflow: hidden; }
.color-btn.color-swatch-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.color-btn .opt-thumb { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--pd-border); }
/* بطاقات الوحدات: شبكة مضغوطة (4 بصف على الحاسوب، 2 على الموبايل) */
.pd-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.pd-units .unit-btn-item { flex: none; min-width: 0; min-height: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 10px; text-align: start; border-radius: 12px; }
.unit-btn-item .unit-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; }
.unit-btn-item .unit-head i { color: var(--accent); width: 14px; text-align: center; font-size: 12px; }
.unit-btn-item .unit-qty { font-size: 11px; color: var(--text-muted, #64748b); font-weight: 700; }
.unit-btn-item .unit-price { font-size: 12.5px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.unit-btn-item .unit-price s { color: var(--text-muted, #64748b); font-weight: 600; font-size: 11px; margin-inline-end: 4px; }
.pd-units .empty-note { color: #f87171; font-size: 13px; }

/* الإجراءات */
.pd-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.qty-input-box { display: inline-flex; align-items: center; height: 50px; border-radius: 14px; border: 1px solid var(--pd-border-strong); background: rgba(0, 0, 0, 0.25); overflow: hidden; }
.qty-btn { width: 44px; height: 100%; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 14px; transition: background .2s, color .2s; }
.qty-btn:hover { background: var(--pd-accent-soft); color: var(--accent); }
.qty-input-box input { width: 54px; height: 100%; border: 0; background: transparent; color: #fff; text-align: center; font-family: inherit; font-size: 16px !important; font-weight: 800; -moz-appearance: textfield; }
.qty-input-box input::-webkit-outer-spin-button, .qty-input-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-cart-add { height: 50px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #e6b800); color: #000; font-size: 15.5px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 10px 24px rgba(255, 204, 0, 0.25); transition: transform .2s, box-shadow .2s, filter .2s; }
.btn-cart-add:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 204, 0, 0.35); filter: brightness(1.05); }
.btn-cart-add:disabled { background: #374151; color: #9ca3af; box-shadow: none; cursor: not-allowed; }
/* نبّهني عند التوفر (يظهر بدل الإضافة للسلة عندما يكون المنتج نافذاً) */
.btn-notify-stock { grid-column: 1 / -1; height: 48px; border-radius: 14px; border: 1.5px dashed var(--pd-accent-line); background: var(--pd-accent-soft); color: var(--accent); font-size: 14.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.btn-notify-stock:hover:not(:disabled) { background: rgba(255, 204, 0, 0.16); border-style: solid; transform: translateY(-1px); }
.btn-notify-stock.is-on { background: rgba(16, 185, 129, 0.12); border: 1.5px solid rgba(16, 185, 129, 0.45); color: #34d399; }
.btn-notify-stock:disabled { opacity: .6; cursor: wait; }
.pd-actions__row2 { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.btn-order-whatsapp { height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: rgba(37, 211, 102, 0.12); border: 1px solid rgba(37, 211, 102, 0.35); color: #4ade80; font-size: 14px; font-weight: 800; transition: background .2s, transform .2s; }
.btn-order-whatsapp:hover { background: rgba(37, 211, 102, 0.2); transform: translateY(-1px); }
.btn-order-whatsapp i { font-size: 18px; }
.pd-icon-btn { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--pd-border-strong); background: var(--pd-surface-2); color: var(--text-secondary, #cbd5e1); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .2s; }
.pd-icon-btn:hover { border-color: var(--pd-accent-line); color: var(--accent); transform: translateY(-1px); }
.btn-fav .fa-solid { color: #f43f5e; }
.share-btn-wrapper { position: relative; }
.share-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 190px; padding: 6px; border-radius: 14px; background: rgba(13, 17, 26, 0.97); border: 1px solid var(--pd-border-strong); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); z-index: 30; }
.share-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--text-secondary, #cbd5e1); cursor: pointer; }
.share-menu a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.pd-trust { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--pd-border-strong); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pd-trust li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-secondary, #cbd5e1); }
.pd-trust i { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--pd-accent-soft); color: var(--accent); font-size: 14px; }

/* معاينة الأدمن (قابلة للطي) */
.admin-price-preview { border-radius: var(--pd-r-sm); border: 1px dashed rgba(255, 204, 0, 0.35); background: rgba(255, 204, 0, 0.04); padding: 0; }
.admin-price-preview summary { cursor: pointer; list-style: none; padding: 10px 14px; font-size: 12.5px; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.admin-price-preview summary::-webkit-details-marker { display: none; }
.admin-price-preview summary::after { content: '\f078'; font: 900 10px/1 'Font Awesome 6 Free'; margin-inline-start: auto; transition: transform .2s; }
.admin-price-preview[open] summary::after { transform: rotate(180deg); }
.apv-rows { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; }
.apv-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; padding: 6px 0; border-top: 1px solid var(--pd-border); }
.apv-row > span:first-child { color: #fff; }
.apv-row > div { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }

/* ---------- الحقائق السريعة ---------- */
.pd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 22px; }
.pd-fact { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--pd-r-sm); background: var(--pd-surface); border: 1px solid var(--pd-border); min-width: 0; }
.pd-fact i { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--pd-accent-soft); color: var(--accent); font-size: 14px; }
.pd-fact div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pd-fact small { font-size: 11px; color: var(--text-muted, #64748b); font-weight: 700; }
/* النص يلتف على أكثر من سطر بدل قصّه */
.pd-fact b { font-size: 12.5px; color: #fff; font-weight: 800; line-height: 1.5; white-space: normal; overflow: visible; word-break: break-word; }
.pd-fact b a:hover { color: var(--accent); }
.pd-fact b i { width: auto; height: auto; background: transparent; font-size: 9px; margin: 0 3px; color: var(--text-muted, #64748b); display: inline; }

/* ---------- التبويبات ---------- */
.pd-tabs { margin-top: 28px; border-radius: var(--pd-r); background: var(--pd-surface); border: 1px solid var(--pd-border); overflow: hidden; }
.tabs-nav { display: flex; gap: 4px; padding: 8px; background: rgba(0, 0, 0, 0.22); border-bottom: 1px solid var(--pd-border); overflow-x: auto; scrollbar-width: none; }
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--text-secondary, #cbd5e1); font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.tab-btn i { color: var(--text-muted, #64748b); }
.tab-btn:hover { color: #fff; }
.tab-btn.active { background: var(--pd-accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--pd-accent-line); }
.tab-btn.active i { color: var(--accent); }
.tab-content { display: none; padding: 24px; animation: pdFade .25s ease; }
.tab-content.active { display: block; }
@keyframes pdFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* الوصف يأخذ عرض التبويب كاملاً (الوصف قد يحتوي شبكات/بطاقات مصمّمة بعرض 100%) */
.pd-prose { font-size: 15px; line-height: 1.9; color: var(--text-secondary, #cbd5e1); width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
.pd-prose h1, .pd-prose h2, .pd-prose h3 { color: #fff; margin: 18px 0 8px; }
.pd-prose p { margin: 0 0 12px; }
.pd-prose ul, .pd-prose ol { padding-inline-start: 22px; margin: 0 0 12px; }
.pd-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.pd-prose a { color: var(--accent); }

/* ==========================================================================
   قالب وصف المنتج الموحّد (نفس HTML يُعرض في الموقع وتطبيق الهاتف)
   HTML المخزّن في TinyMCE يحمل الأصناف فقط بلا ألوان ثيم — الألوان هنا للموقع (داكن)،
   والتطبيق يلوّنها من ثيمه (فاتح/داكن) في lib/widgets/product_description.dart.
   الأصناف: product-description › description-header (collection-label, description-title, description-intro)
            › products-grid › product-card.accent-* (product-tag, product-title, product-subtitle, product-body, product-feature)
            › collection-info › description-footer (footer-title, footer-subtitle)
   ========================================================================== */
.product-description { direction: rtl; line-height: 1.7; width: 100%; color: var(--text-secondary, #cbd5e1); }
.product-description .description-header { text-align: center; padding: 18px 20px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 204, 0, 0.09), rgba(255, 255, 255, 0.025)); border: 1px solid var(--pd-border-strong); }
.product-description .collection-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .5px; margin-bottom: 5px; }
.product-description .description-title { color: #fff; font-size: 24px; line-height: 1.45; margin: 0 0 7px; }
.product-description .description-intro { max-width: 900px; margin: 0 auto; color: #bdbdbd; font-size: 14px; line-height: 1.8; }
.product-description .products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; align-items: stretch; }
.product-description .product-card { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--pd-border-strong); border-top: 3px solid var(--accent); border-radius: 10px; padding: 14px 15px; min-width: 0; }
.product-description .product-tag { display: inline-block; color: var(--accent); background: rgba(255, 204, 0, 0.12); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; line-height: 1.5; margin-bottom: 7px; }
.product-description .product-title { color: #fff; font-size: 16px; line-height: 1.5; margin: 0; }
.product-description .product-subtitle { color: #858585; font-size: 12px; font-weight: 400; margin: 1px 0 8px; }
.product-description .product-body { color: #c9c9c9; font-size: 13px; line-height: 1.75; }
.product-description .product-feature { margin-bottom: 4px; }
.product-description .product-card strong { color: var(--accent); }
.product-description .collection-info { margin-top: 12px; padding: 12px 15px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--pd-border-strong); text-align: center; color: #aaa; font-size: 12px; line-height: 1.75; }
.product-description .description-footer { margin-top: 12px; padding: 12px 15px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--pd-border-strong); text-align: center; }
.product-description .footer-title { color: #fff; font-size: 14px; font-weight: 700; }
.product-description .footer-subtitle { color: #777; font-size: 11px; margin-inline-start: 7px; }
/* ألوان التمييز لكل بطاقة: الحد العلوي + الوسم + strong */
.product-description .accent-green  { border-top-color: #00a66a; } .product-description .accent-green  .product-tag, .product-description .accent-green  strong { color: #20c98a; } .product-description .accent-green  .product-tag { background: rgba(0, 166, 106, 0.12); }
.product-description .accent-yellow { border-top-color: #e3ae00; } .product-description .accent-yellow .product-tag, .product-description .accent-yellow strong { color: #f0c536; } .product-description .accent-yellow .product-tag { background: rgba(227, 174, 0, 0.12); }
.product-description .accent-gold   { border-top-color: #d4af37; } .product-description .accent-gold   .product-tag, .product-description .accent-gold   strong { color: #e2c458; } .product-description .accent-gold   .product-tag { background: rgba(212, 175, 55, 0.12); }
.product-description .accent-red    { border-top-color: #c4452c; } .product-description .accent-red    .product-tag, .product-description .accent-red    strong { color: #e96a51; } .product-description .accent-red    .product-tag { background: rgba(196, 69, 44, 0.12); }
.product-description .accent-orange { border-top-color: #e0782a; } .product-description .accent-orange .product-tag, .product-description .accent-orange strong { color: #f08c45; } .product-description .accent-orange .product-tag { background: rgba(224, 120, 42, 0.12); }
.product-description .accent-blue   { border-top-color: #1688d4; } .product-description .accent-blue   .product-tag, .product-description .accent-blue   strong { color: #42a9ed; } .product-description .accent-blue   .product-tag { background: rgba(22, 136, 212, 0.12); }
.product-description .accent-teal   { border-top-color: #12a5a5; } .product-description .accent-teal   .product-tag, .product-description .accent-teal   strong { color: #2bc4c4; } .product-description .accent-teal   .product-tag { background: rgba(18, 165, 165, 0.12); }
.product-description .accent-purple { border-top-color: #8b5cf6; } .product-description .accent-purple .product-tag, .product-description .accent-purple strong { color: #a78bfa; } .product-description .accent-purple .product-tag { background: rgba(139, 92, 246, 0.12); }
.product-description .accent-pink   { border-top-color: #db2777; } .product-description .accent-pink   .product-tag, .product-description .accent-pink   strong { color: #f472b6; } .product-description .accent-pink   .product-tag { background: rgba(219, 39, 119, 0.12); }
@media (max-width: 640px) { .product-description .products-grid { grid-template-columns: 1fr; } .product-description .description-title { font-size: 20px; } }

.spec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.spec-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--pd-surface-2); border: 1px solid var(--pd-border); font-size: 13.5px; }
.spec-list li strong { color: var(--text-secondary, #cbd5e1); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.spec-list li strong i { color: var(--accent); width: 16px; text-align: center; }
.spec-list li span { color: #fff; font-weight: 800; text-align: end; }
.spec-list li.spec-title-divider { grid-column: 1 / -1; background: transparent; border: 0; padding: 6px 0 0; }
.spec-list li.spec-title-divider strong { color: var(--accent); font-size: 13px; }
.spec-pack { display: inline-flex; align-items: baseline; gap: 4px; }
.spec-pack small { color: var(--text-muted, #64748b); font-weight: 700; }

/* المراجعات */
.reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.reviews-head h3 { margin: 0; font-size: 17px; color: #fff; display: flex; align-items: center; gap: 8px; }
.reviews-head h3 i { color: var(--accent); }
.reviews-hint { font-size: 13px; color: var(--text-muted, #64748b); }
.btn-review-open, .btn-review-submit { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--pd-accent-line); background: var(--pd-accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s; }
.btn-review-open:hover, .btn-review-submit:hover { background: var(--accent); color: #000; }
.pd-review-summary { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: var(--pd-r-sm); background: var(--pd-surface-2); border: 1px solid var(--pd-border); margin-bottom: 18px; }
.pd-review-summary__score { text-align: center; }
.pd-review-summary__score b { display: block; font-size: 44px; line-height: 1; color: #fff; font-weight: 900; }
.pd-review-summary__score small { display: block; margin-top: 6px; color: var(--text-muted, #64748b); font-size: 12px; }
.pd-bars { display: flex; flex-direction: column; gap: 6px; }
.pd-bar { display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; align-items: center; font-size: 12px; color: var(--text-secondary, #cbd5e1); }
.pd-bar i { color: var(--accent); font-size: 10px; }
.pd-bar__track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pd-bar__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #e6b800); }
.review-form { display: grid; gap: 10px; padding: 18px; border-radius: var(--pd-r-sm); background: var(--pd-surface-2); border: 1px dashed var(--pd-accent-line); margin-bottom: 18px; }
.review-form h4 { margin: 0; font-size: 15px; color: #fff; }
.review-form select, .review-form textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--pd-border-strong); background: rgba(0, 0, 0, 0.28); color: #fff; font-family: inherit; font-size: 14px; outline: none; }
.review-form select:focus, .review-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--pd-accent-soft); }
.reviews-list { display: grid; gap: 12px; }
.review-box { padding: 16px 18px; border-radius: var(--pd-r-sm); background: var(--pd-surface-2); border: 1px solid var(--pd-border); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.review-head strong { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.review-head strong i { color: var(--accent); font-size: 18px; }
.review-box p { margin: 0 0 8px; color: var(--text-secondary, #cbd5e1); line-height: 1.8; font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-muted, #64748b); }
.reviews-empty { text-align: center; padding: 30px; color: var(--text-muted, #64748b); }

/* ---------- المنتجات ذات الصلة / شاهدتها مؤخراً ---------- */
.related-products { margin-top: 34px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; color: #fff; margin: 0 0 16px; }
.section-title i { color: var(--accent); }
.slider-container-wrapper { position: relative; padding: 0 6px; }
.products-grid { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 2px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.products-grid::-webkit-scrollbar { display: none; }
.product-card { flex: 0 0 224px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 18px; background: var(--pd-surface); border: 1px solid var(--pd-border); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-4px); border-color: var(--pd-accent-line); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35); }
.product-card-img { aspect-ratio: 1 / 1; background: rgba(0, 0, 0, 0.25); overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card-title { font-size: 13.5px; font-weight: 800; color: #fff; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.product-card-price { font-size: 14px; font-weight: 800; color: var(--accent); }
.product-card-price .rel-old-price { color: var(--text-muted, #64748b); text-decoration: line-through; font-size: 12px; margin-inline-end: 6px; font-weight: 600; }
.product-card-link { margin-top: auto; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--pd-accent-soft); border: 1px solid var(--pd-accent-line); color: var(--accent); font-size: 13px; font-weight: 800; transition: background .2s, color .2s; }
.product-card-link:hover { background: var(--accent); color: #000; }
.slider-arrow { position: absolute; top: 40%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--pd-border-strong); background: rgba(15, 19, 26, 0.9); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transition: background .2s, color .2s, opacity .2s; }
.slider-arrow:hover { background: var(--accent); color: #000; }
.slider-arrow-left { left: -12px; } .slider-arrow-right { right: -12px; }

/* ---------- Lightbox / Toast / الشريط العائم ---------- */
#lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: rgba(5, 7, 11, 0.92); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; padding: 20px; touch-action: none; overscroll-behavior: contain; }
#lightbox.show { opacity: 1; visibility: visible; }
/* قفل الصفحة خلف التكبير (JS يضبط top = -scrollY ويعيده عند الإغلاق) */
body.lb-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
#lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); object-fit: contain; }
.lb-close { position: absolute; top: 18px; inset-inline-start: 22px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 26px; cursor: pointer; }
#toast { position: fixed; bottom: 92px; left: 50%; transform: translate(-50%, 20px); z-index: 99998; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: rgba(16, 185, 129, 0.95); color: #fff; font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 800; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#toast.error { background: rgba(239, 68, 68, 0.96); }
.sticky-mobile-buy-bar { position: fixed; bottom: 80px; left: 0; right: 0; z-index: 9990; display: none; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(13, 17, 26, 0.96); backdrop-filter: blur(16px); border-top: 1px solid var(--pd-accent-line); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45); transform: translateY(110%); transition: transform .3s; }
.sticky-mobile-buy-bar.show { transform: translateY(0); }
.sticky-buy-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sticky-buy-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: rgba(0, 0, 0, 0.3); flex: 0 0 auto; }
.sticky-buy-text { display: flex; flex-direction: column; min-width: 0; }
.sticky-buy-title { font-size: 12.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy-price { font-size: 13.5px; font-weight: 900; color: var(--accent); }
.btn-sticky-buy { height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #e6b800); color: #000; font-family: inherit; font-size: 14px; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }

/* ---------- الاستجابة ---------- */
@media (max-width: 1100px) {
    .pd-hero { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr); gap: 20px; }
    .pd-stage { grid-template-columns: 70px minmax(0, 1fr); }
    .thumbnail-item { width: 66px; height: 66px; }
}
@media (max-width: 900px) {
    .pd { padding: 14px 14px 120px; }
    .pd-hero { grid-template-columns: 1fr; gap: 18px; }
    .pd-stage { grid-template-columns: 1fr; gap: 10px; }
    .pd-stage__main { order: 1; aspect-ratio: 1 / 1; border-radius: 18px; }
    .pd-stage__main img { padding: 14px; }
    .pd-thumbs { order: 2; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 4px 2px; }
    .thumbnail-item { width: 62px; height: 62px; }
    .pd-buy { position: static; padding: 16px; border-radius: 18px; }
    .pd-crumbs [aria-current] { max-width: 180px; }
    .pd-actions { grid-template-columns: auto 1fr; }
    .sticky-mobile-buy-bar { display: flex; }
    #toast { bottom: 160px; } /* فوق شريط التنقل السفلي + شريط الشراء العائم */
    .pd-review-summary { grid-template-columns: 1fr; }
    .tab-content { padding: 16px; }
    .product-card { flex-basis: 180px; }
    .slider-arrow { display: none !important; }
    .pd-facts { grid-template-columns: repeat(2, 1fr); }
    .pd-units { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .pd-actions { grid-template-columns: 1fr; }
    .qty-input-box { width: 100%; justify-content: space-between; }
    .qty-input-box input { flex: 1; width: auto; }
    .pd-actions__row2 { grid-template-columns: 1fr auto auto; }
    .pd-units { grid-template-columns: repeat(2, 1fr); }
    .pd-facts { grid-template-columns: 1fr; gap: 8px; }
    .pd-fact { padding: 10px 12px; }
    .pd-fact i { width: 34px; height: 34px; font-size: 14px; }
    .tab-btn { padding: 0 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .pd *, .pd *::before, .pd *::after { transition: none !important; animation: none !important; } }
