/* صفحات الخصوصية والشروط و«قريباً»: نفس هوية الموقع، بدون سكربت (تبديل اللغة برابط #en) */
:root {
  --engine: #333333; --gold: #E9B53F; --gold-deep: #C9952A; --ivory: #F4F1EA; --card: #FFFFFF;
  --line: #E2DDD1; --text: #2A2A2A; --muted: #6B675F; --radius: 14px;
  --t-meta: .8125rem; --t-small: .875rem; --t-body: 1rem; --t-lead: 1.125rem;
  --font: 'Alexandria', 'Sora', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--ivory); color: var(--text); line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
.top { background: var(--engine); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; min-height: 44px; min-width: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; background: #fff; }
.lang { border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 4px 12px; text-decoration: none; font-size: var(--t-small); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.to-ar { display: none; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 28px; overflow-wrap: anywhere; }
.doc-en { display: none; font-family: 'Sora', 'Alexandria', system-ui, sans-serif; }
#en:target { display: block; scroll-margin-top: 80px; }
#en:target ~ .doc-ar { display: none; }
body:has(#en:target) .to-en { display: none; }
body:has(#en:target) .to-ar { display: inline-block; }
h1 { font-size: 1.5rem; margin: 0 0 4px; line-height: 1.4; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.updated { color: var(--muted); font-size: var(--t-small); margin: 0 0 16px; }
.lead { font-size: var(--t-lead); }
ul { padding-inline-start: 1.3em; margin: 8px 0; }
li { margin: 4px 0; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; }
.note { background: #faf5e8; border-inline-start: 4px solid var(--gold); padding: 12px 16px; border-radius: 8px; margin: 12px 0; }
mark.todo { background: #fde9b8; color: #6b4e0e; border: 1px dashed var(--gold-deep); border-radius: 6px; padding: 0 8px; font-size: .9em; }
.foot { text-align: center; color: var(--muted); font-size: var(--t-small); padding: 20px 16px 28px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.foot a { text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.soon { text-align: center; padding-top: 40px; }
.soon img { width: 96px; height: 96px; border-radius: 20px; background: #fff; }
.soon h1 { font-size: 1.75rem; margin-top: 16px; }
.soon p { color: var(--muted); max-width: 480px; margin: 8px auto; }
@media (max-width: 440px) { .brand span { display: none; } dl.info { grid-template-columns: 1fr; } dl.info dd { margin-bottom: 8px; } }
/* الرابط لجزء داخل النسخة الإنجليزية (مثل #refund-en) يفتح الإنجليزي */
.doc-en:has(:target) { display: block; }
body:has(.doc-en :target) .doc-ar { display: none; }
body:has(.doc-en :target) .to-en { display: none; }
body:has(.doc-en :target) .to-ar { display: inline-block; }
h2[id], section[id] { scroll-margin-top: 80px; }
.soon .links { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.soon .links a { display: inline-flex; align-items: center; min-height: 44px; }
.btn { display: inline-block; background: var(--gold); color: var(--engine); border-radius: 999px; padding: 8px 20px; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* صفحة الأسعار بشكل متجر */
.store main { max-width: 1080px; }
.store .doc { padding: 20px 16px 28px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin: 12px 0 0; position: sticky; top: 56px; background: var(--card); z-index: 1; scrollbar-width: none; }
.cats a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px; font-size: var(--t-small); text-decoration: none; background: var(--ivory); min-height: 44px; display: inline-flex; align-items: center; touch-action: manipulation; }
.cats a:hover { border-color: var(--gold); }
.cat { scroll-margin-top: 100px; }
.cat h2 { scroll-margin-top: 110px; }
.cat h2 { margin-top: 24px; }
ul.grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.product { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--card); }
.product .pic { position: relative; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; overflow: hidden; background: #fff; }
/* الصورة كاملة داخل الإطار بدون قص في كل المتصفحات (بدون شبكة حول الصورة). كل الملفات أكبر من الإطار، فما تتكبر */
.product .pic:not(.ph) svg { display:none; }
.product .pic img { position: absolute; top: 4px; left: 4px; width: calc(100% - 8px); height: calc(100% - 8px); margin: 0; object-fit: contain; object-position: center; display: block; }
.product .pic.ph { background: var(--ivory); color: var(--gold-deep); }
.product .pic.ph svg { width: 52%; height: 52%; }
.product h3 { font-size: var(--t-small); font-weight: 500; line-height: 1.5; margin: 0; flex: 1; }
.product small { color: var(--muted); font-size: var(--t-meta); }
.product b { font-size: var(--t-body); color: var(--engine); }
.product b { white-space: nowrap; }
.product b em { display: block; font-style: normal; font-weight: 400; font-size: var(--t-meta); color: var(--muted); }
.product.svc .pic { aspect-ratio: 2 / 1; }
.product.svc .pic.ph svg { width: 26%; height: 52%; }
.product b .per { font-size: var(--t-meta); font-weight: 400; color: var(--muted); }
.product b.free { color: #3F7A5C; }
@media (max-width: 440px) { ul.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .product { padding: 12px; } }
/* البطاقة لا تتعدى عمودها: «لكل لتر» تنزل سطرًا لوحدها إذا ضاق المكان، والرقم نفسه ما ينكسر */
.product b { white-space: normal; }
.product b bdi, .product b .per { white-space: nowrap; }
.product b.soon { font-size: var(--t-small); font-weight: 500; color: var(--muted); white-space: normal; }
.product .book { margin-top: 8px; text-align: center; border-radius: 999px; padding: 8px 12px; min-height: 44px; display: grid; place-items: center; font-size: var(--t-small); font-weight: 600; text-decoration: none; background: var(--gold); color: var(--engine); }
/* «احجز بهذه القطعة» و«Book with this part» تنزل لسطرين في بطاقة ضيقة (320) ولا تكبّر البطاقة */
.product .book { line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.product .book.off { background: var(--ivory); color: var(--muted); border: 1px dashed var(--line); font-weight: 500; cursor: default; }

/* عرض الجوال: لا شيء أعرض من الشاشة */
html, body { overflow-x: clip; }
img { max-width: 100%; }

.price-search { width:100%; margin-block:12px; min-height:44px; padding:8px 12px; border:1px solid var(--muted); border-radius:10px; font:inherit; }
.price-search + .cats { position:static; display:flex; flex-wrap:wrap; margin:0; padding-block:4px; }
.store .product[hidden], .store .cat[hidden], .store [role=status]:empty { display:none; }
