/* سوق الدراجة السورية — الهوية: برتقالي، أسود، أبيض (مطابقة لشعار المتجر) */
:root {
  --ink: #1A1512;
  --ink-2: #3A332D;
  --orange: #E8792B;
  --orange-deep: #B65C13;
  --orange-soft: #FDEBDD;
  --white: #FFFFFF;
  --surface: #F3F2EF;
  --line: #E1DDD6;
  --muted: #6B645C;
  --ok: #2F7D4F;
  --ok-soft: #E3F2E7;
  --danger: #B42318;
  --danger-soft: #FDE8E6;
  --spring: cubic-bezier(.34, 1.5, .64, 1);
  /* لمسة ثانوية مستوحاة من معدن الدراجة (فولاذ/كروم العجلات والهياكل) وميدالية "مميّز" ذهبية، إلى جانب هوية الشعار البرتقالية-السوداء-البيضاء الأساسية */
  --steel: #3E6B85;
  --steel-deep: #28485C;
  --steel-soft: #E6EEF1;
  --gold: #D9A94E;
  --gold-deep: #A87C2C;
  --radius: 10px;
  --font: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", sans-serif;
  --display: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
/* حبيبات فيلم سينمائية خفيفة جداً على الأسطح الغامقة (البطل، شرائط العناوين، غلاف المتجر، الشريط المميّز) لإحساس أعمق وأكثر خامة */
.hero::before, .page-head::before, .profile-cover.is-default::before, .featured-strip::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); border-radius: inherit; }
/* touch-action: manipulation: على الجوال (تصميم بعرض 880) تلغي تأخير اللمس وتكبير النقرتين المزدوجتين، ويبقى التكبير بالإصبعين متاحاً */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.75 var(--font); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.05rem + 2.1vw, 2.6rem); font-weight: 800; letter-spacing: -.015em; }

/* شريط عنوان موحّد لكل صفحات الموقع الداخلية: نفس هوية البطل الرئيسي (تدرّج غامق + ذيل أثر دولاب خفيف)
   بحيث يصير توقيع بصري واحد متكرر بثبات بكل مكان، لا تأثير معزول بصفحة وحدها. */
.page-head { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--ink) 0%, var(--ink) 60%, var(--steel-deep) 150%); border-radius: 14px; padding: 20px 24px 26px; margin-bottom: 24px; box-shadow: 0 10px 26px -8px rgba(26,21,18,.35); }
.page-head::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 10px; background: url('/img/tire-tread.png') repeat-x center / auto 340%; opacity: .4; }
.page-head h1 { color: #fff; margin: 0; }
.page-head .muted, .page-head .small.muted { color: rgba(255,255,255,.72) !important; }
h2 { font-size: 1.3rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
.wrap ul:not([class]) { margin: 0; padding: 0 22px 0 0; display: grid; gap: 8px; line-height: 1.7; }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
html { scroll-behavior: smooth; }
::selection { background: var(--orange); color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.35); } 60% { transform: scale(.92); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* الترويسة */
.site-head { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 20; border-bottom: 4px solid var(--orange); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.nav-actions { margin-inline-start: 0; }
.nav .ico { width: 18px; height: 18px; vertical-align: -3px; }
.cart-link .ico { display: none; } /* أيقونة السلة للجوال فقط؛ اللابتوب يعرض كلمة «السلة» كما هي */
.nav a, .nav summary, .nav button.link { color: #E9E4DE; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; cursor: pointer; background: none; border: 0; font: inherit; transition: background-color .16s ease, color .16s ease; }
.nav a:hover, .nav summary:hover, .nav a[aria-current="page"] { color: var(--white); background: #2C2521; }
/* زر «حساب جديد» بالترويسة: قاعدة .nav a كانت تلغي خلفيته فيظهر صندوقاً داكناً فارغاً */
.nav a.btn-primary { background: linear-gradient(180deg, #F2924F 0%, var(--orange) 55%, var(--orange-deep) 100%); color: var(--ink); padding: 7px 14px; font-weight: 700; }
.nav a.btn-primary:hover { background: linear-gradient(180deg, #F8A562 0%, #F2924F 55%, var(--orange) 100%); color: var(--ink); }
/* التابلت العمودي (عرض 761–860 بحجمه الطبيعي): تقليص المسافات قليلاً حتى تبقى الترويسة سطراً واحداً.
   الجوال يُعرض بعرض 880 واللابتوب أعرض، فلا يتأثران */
@media (min-width: 761px) and (max-width: 860px) {
  .site-head .wrap { gap: 12px; }
  .brand { font-size: 1rem; gap: 8px; }
  .nav a, .nav summary, .nav button.link { padding-inline: 7px; }
}
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 99px; background: var(--orange); color: var(--ink); font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; animation: bump .5s cubic-bezier(.2,.8,.2,1) both; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] > div { position: absolute; inset-inline-end: 0; top: 110%; min-width: 220px; background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(26,21,18,.18); padding: 8px; display: grid; }
.menu[open] > div a, .menu[open] > div button { color: var(--ink); text-align: start; padding: 9px 12px; border-radius: 6px; }
.menu[open] > div a:hover, .menu[open] > div button:hover { background: var(--surface); color: var(--ink); }
.menu form { margin: 0; }
.menu .who { padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) {
  .site-head { position: static; }
  .site-head .wrap { flex-wrap: wrap; padding-block: 8px; gap: 6px; }
  .nav { width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav summary { padding: 6px 8px; font-size: .88rem; white-space: nowrap; }
  .menu[open] > div { position: fixed; top: auto; inset-inline: 12px; }
}

main { padding: 26px 0 60px; min-height: 60vh; }
.site-foot { background: var(--ink); color: #BDB5AB; font-size: .92rem; }
/* padding-block فقط: العنصر نفسه يحمل .wrap، و«padding: … 0» كانت تلغي هامشه الجانبي فيلتصق النص بحافة الشاشة على الجوال والتابلت */
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-block: 40px 30px; }
.foot-col h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-col a { color: #BDB5AB; text-decoration: none; }
.foot-col a:hover { color: var(--orange); text-decoration: underline; }
.foot-brand .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.foot-brand p { margin: 0; max-width: 40ch; line-height: 1.8; color: #BDB5AB; }
.foot-bottom { border-top: 1px solid #3A332D; padding: 16px 0; text-align: center; font-size: .85rem; color: #8D8578; }
.foot-glance { background: #241E19; border-bottom: 1px solid #3A332D; }
.foot-glance-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-block: 14px; }
.fg-label { color: var(--white); font-weight: 700; font-family: var(--display); }
.fg-stat { color: #C9C0B3; font-size: .9rem; white-space: nowrap; }
.foot-glance-inner .btn { margin-inline-start: auto; }
.foot-inline { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 14px; }
.foot-inline a { font-size: .88rem; }
@media (max-width: 640px) { .foot-glance-inner .btn { margin-inline-start: 0; width: 100%; justify-content: center; } }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* رسائل */
.flash { position: relative; padding-block: 13px; padding-inline: 44px 16px; border-radius: 10px; margin-bottom: 16px; border-inline-start: 4px solid; box-shadow: 0 3px 14px rgba(26,21,18,.07); animation: flashIn .35s cubic-bezier(.2,.8,.2,1) both; }
.flash::before { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 1.05rem; line-height: 1; }
.flash.success { background: var(--ok-soft); border-color: var(--ok); }
.flash.success::before { content: '✓'; color: var(--ok); }
.flash.error { background: var(--danger-soft); border-color: var(--danger); }
.flash.error::before { content: '!'; color: var(--danger); }
.flash.info { background: var(--orange-soft); border-color: var(--orange); }
.flash.info::before { content: 'i'; color: var(--orange-deep); font-style: italic; font-family: serif; }

/* أزرار */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 2px solid transparent; font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; overflow: hidden; transition: background-color .18s ease, border-color .18s ease, box-shadow .22s ease, transform .35s var(--spring); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: linear-gradient(180deg, #F2924F 0%, var(--orange) 55%, var(--orange-deep) 100%); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px rgba(182,92,19,.25); }
.btn-primary:hover { background: linear-gradient(180deg, #F8A562 0%, #F2924F 55%, var(--orange) 100%); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 8px 18px rgba(182,92,19,.35); }
.btn-primary::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 35%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-18deg); transition: inset-inline-start .55s ease; pointer-events: none; }
.btn-primary:hover::before { inset-inline-start: 130%; }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); box-shadow: 0 8px 18px rgba(26,21,18,.3); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--surface); box-shadow: 0 6px 14px rgba(26,21,18,.12); }
.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); box-shadow: 0 6px 14px rgba(180,35,24,.15); }
.btn-wa { background: linear-gradient(180deg, #279a60, #1F7A4D); color: var(--white); }
.btn-wa:hover { background: linear-gradient(180deg, #2bab6a, #1F7A4D); box-shadow: 0 8px 18px rgba(31,122,77,.3); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::after { content: ''; width: 14px; height: 14px; margin-inline-start: 7px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; display: inline-block; animation: spin .6s linear infinite; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--orange-deep); cursor: pointer; text-decoration: underline; }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* نماذج */
form.stack, .stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 4px; align-content: start; } /* align-content: حقلان متجاوران بارتفاعين مختلفين (تلميح تحت أحدهما) يبقيان على خط واحد */
.field label, .label { font-weight: 600; font-size: .93rem; }
.field .hint { color: var(--muted); font-size: .83rem; }
.field .err { color: var(--danger); font-size: .85rem; font-weight: 600; }
/* input:not([type]) لأن عدة حقول نصية في القوالب بلا type صريح (الاسم، البريد، اسم المتجر…) وكانت تظهر بلا تنسيق */
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); font: inherit; color: var(--ink);
}
input, select, textarea { transition: border-color .16s ease, box-shadow .16s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--orange-soft); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--danger); }
textarea { resize: vertical; min-height: 90px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

/* أسطح */
.panel { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--white); }
.panel::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(232,121,43,.09), transparent 62%); }
.panel:hover::before { opacity: 1; }
.panel.stack { gap: 16px; }
.panel.soft { background: var(--surface); border-color: transparent; }
.narrow { max-width: 520px; margin: 0 auto; }
.section { margin-top: 38px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.empty { text-align: center; padding: 46px 16px; background: var(--surface); border-radius: var(--radius); color: var(--muted); }
.empty::before { content: ''; display: block; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background-color: var(--orange-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B65C13' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 26px; }
.empty p { font-size: 1.02rem; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--surface); color: var(--ink-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--orange-soft); color: var(--orange-deep); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.gold { background: linear-gradient(135deg, #F3D48A, var(--gold) 55%, var(--gold-deep)); color: #4A3410; font-weight: 700; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset; }
.tag.steel { background: var(--steel-soft); color: var(--steel-deep); font-weight: 700; }
/* الشارة الزرقاء الفولاذية لمتجر معتمد رسمياً، تمييزاً عن البرتقالي الأساسي وذهبي «مميّز» */
.verified { display: inline-flex; align-items: center; gap: 3px; color: var(--steel); font-weight: 700; font-size: .85em; white-space: nowrap; }
.verified svg { width: 1.05em; height: 1.05em; }
/* أوسمة الامتياز: شارة بارزة بميدالية دائرية؛ البرتقالي للأوسمة الأعلى والداكن للأساسية */
.medals { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.medal { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 5px; border-radius: 999px; background: linear-gradient(180deg, #FFFFFF 0%, #F3F2EF 100%); border: 1px solid var(--line); box-shadow: 0 1px 0 #fff inset, 0 3px 8px -3px rgba(26,21,18,.28); font: 600 .84rem/1.35 var(--font); color: var(--ink); white-space: nowrap; }
.medal-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 34% 28%, #FFC089 0%, var(--orange) 52%, var(--orange-deep) 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(182,92,19,.38), 0 2px 4px rgba(26,21,18,.3); }
.medal-base .medal-ico { background: radial-gradient(circle at 34% 28%, #6B625A 0%, var(--ink-2) 50%, var(--ink) 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(26,21,18,.28), 0 2px 4px rgba(26,21,18,.3); }
.medal-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.medals.compact { gap: 6px; margin-top: 8px; }
.medals.compact .medal { font-size: .76rem; padding: 2px 11px 2px 3px; gap: 6px; }
.medals.compact .medal-ico { width: 21px; height: 21px; }
.medals.compact .medal-ico svg { width: 12px; height: 12px; }
/* مربع اختيار مع نصه داخل جداول الإدارة (التوثيق) */
.check-line { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.check-line input, .medal-picks input { width: 18px; height: 18px; accent-color: var(--orange-deep); margin: 0; flex: none; }
.trust-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.medal-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.medal-picks label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-weight: 600; font-size: .9rem; cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.medal-picks label:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.medal-picks.tight { grid-template-columns: 1fr; gap: 6px; }
.medal-picks.tight label { padding: 6px 8px; font-size: .84rem; }
.medal-edit { margin-top: 8px; }
.medal-edit summary { cursor: pointer; color: var(--orange-deep); font-weight: 600; width: max-content; }
.medal-edit form { margin-top: 8px; display: grid; gap: 8px; justify-items: start; }
/* المتاجر في لوحة الإدارة: بطاقة لكل متجر (رأس بالاسم والمنشور، ثم خانات الاشتراك والتوثيق وVIP والأوسمة)
   بدل صف مزدحم بستة أعمدة. خانتان بكل سطر، وأربع عندما يتسع مكان المحتوى (container query). */
.store-cards { container-type: inline-size; }
.stores-table, .stores-table tbody { display: block; width: 100%; }
.stores-table thead { display: none; }
.stores-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); box-shadow: 0 8px 18px -12px rgba(26,21,18,.3); }
.stores-table td { display: block; min-width: 0; padding: 13px 16px; border: 0; border-top: 1px solid var(--line); }
.stores-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 7px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.stores-table td.st-name { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; border-top: 0; background: linear-gradient(180deg, var(--surface) 0%, #FBFAF8 100%); }
.stores-table td.st-name::before { display: none; }
.stores-table td.st-name strong { font-size: 1.05rem; }
.stores-table td.span-all { grid-column: 1 / -1; }
.stores-table td:nth-child(odd):not(.st-name):not(.span-all) { border-inline-start: 1px solid var(--line); }
.stores-table tr:target { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
@container (min-width: 820px) {
  .stores-table tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stores-table td:not(.st-name):not(.span-all) + td { border-inline-start: 1px solid var(--line); }
}
.stars { color: var(--orange-deep); letter-spacing: 1px; white-space: nowrap; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

/* الواجهة الرئيسية: الشريط الأسود هو العنصر المميز الوحيد */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: clamp(400px, 40vw, 600px); background: var(--ink); color: var(--white); margin: -26px 0 0; padding: 38px 0 30px; }
.hero > .wrap { width: 100%; }
/* صورة الهيرو: دراجة طريق عند الغروب مثبّتة يسار الهيرو بارتفاعه كاملاً، وطرفها الأيمن يذوب في لون الحبر.
   فوقها تدرّج يبدأ من جهة النص (اليمين) ليبقى العنوان والبحث مقروءين، وحركة تقريب بطيئة جداً تعطيها حياة */
.hero-photo { position: absolute; inset-block: 0; inset-inline-end: 0; height: 100%; width: auto; max-width: none; pointer-events: none; transform-origin: left center; animation: heroZoom 22s ease-in-out infinite alternate; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to left, rgba(26,21,18,.92) 0%, rgba(26,21,18,.74) 30%, rgba(26,21,18,.2) 52%, rgba(26,21,18,0) 64%); }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.04); } }
/* الشاشات المتوسطة (تابلت/لابتوب صغير): النص يغطي جزءاً أكبر من الدراجة، فالتدرّج أعمق وأوسع */
@media (min-width: 761px) and (max-width: 1200px) { .hero::after { background: linear-gradient(to left, rgba(26,21,18,.94) 0%, rgba(26,21,18,.86) 40%, rgba(26,21,18,.42) 63%, rgba(26,21,18,0) 80%); } }
/* فلاتر الفئات فوق الصورة: خلفية داكنة شفافة حتى تبقى مقروءة فوق السماء الفاتحة */
.hero .cats a:not([aria-current="true"]) { background: rgba(26,21,18,.52); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .hero-photo { animation: none; } }
/* الشاشات الضيقة والجوال العمودي: الصورة بعرض الهيرو كاملاً في أسفله، وأعلاها يذوب في لون الحبر تحت النص */
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding-bottom: 40vw; }
  .hero-photo { inset-block: auto 0; inset-inline: 0; width: 100%; height: auto; transform-origin: left bottom; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%); mask-image: linear-gradient(to bottom, transparent 0%, #000 32%); }
  .hero::after { display: none; }
}
@media (orientation: portrait) {
  html.is-phone .hero { display: block; min-height: 0; padding-bottom: 40vw; }
  html.is-phone .hero-photo { inset-block: auto 0; inset-inline: 0; width: 100%; height: auto; transform-origin: left bottom; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%); mask-image: linear-gradient(to bottom, transparent 0%, #000 32%); }
  html.is-phone .hero::after { display: none; }
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.4rem); line-height: 1.15; max-width: 20ch; margin-bottom: 18px; animation: riseIn .6s cubic-bezier(.2,.8,.2,1) both; }
.hero form { display: flex; max-width: 720px; background: var(--white); border-radius: 12px; overflow: hidden; border-bottom: 5px solid var(--orange); animation: riseIn .6s .1s cubic-bezier(.2,.8,.2,1) both; }
.hero .cats { animation: riseIn .6s .18s cubic-bezier(.2,.8,.2,1) both; }
/* شريط أرقام المنصة تحت الفئات (بطلب العميل): الرقم كبير والاسم تحته، بفواصل رفيعة بين الأرقام */
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 0; margin: 20px 0 0; padding: 0; list-style: none; animation: riseIn .6s .26s cubic-bezier(.2,.8,.2,1) both; }
.hero-stats li { display: grid; gap: 1px; padding-inline: 0 22px; margin-inline-end: 22px; border-inline-end: 1px solid rgba(255,255,255,.2); }
.hero-stats li:last-child { padding-inline-end: 0; margin-inline-end: 0; border: 0; }
.hero-stats b { font: 700 1.55rem/1.15 var(--display); color: var(--white); font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: .84rem; color: rgba(255,255,255,.72); }
.hero input[type=search] { border: 0; border-radius: 0; padding: 16px 18px; font-size: 1.05rem; box-shadow: none; }
.hero button { flex: none; border-radius: 0; padding-inline: 26px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.cats a { text-decoration: none; padding: 7px 14px; border-radius: 99px; border: 1.5px solid #4A423B; color: #E9E4DE; font-size: .92rem; transition: border-color .16s ease, color .16s ease, background-color .16s ease, transform .15s ease; }
.cats a:hover { border-color: var(--orange); color: var(--white); transform: translateY(-2px); }
.cats a[aria-current="true"] { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 16px; }
.toolbar form { display: flex; gap: 8px; align-items: center; }
.toolbar select { width: auto; }

/* بطاقات المنتجات: شكل موحّد */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
/* بطاقة المنتج: صورة المنتج خلفية كاملة للبطاقة، والفئة والمتجر والاسم والسعر فوقها كطبقة نصية */
.card { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--surface); box-shadow: 0 1px 2px rgba(26,21,18,.08), inset 0 0 36px rgba(26,21,18,.14); transition: transform .45s var(--spring), box-shadow .25s ease; }
/* معالجة لونية موحّدة لكل صور المنتجات الحقيقية (مصادر وإضاءات متفاوتة) بحيث يحس الكتالوج متناسق */
.card-img, .gallery .main img, .fc-thumb img { filter: saturate(1.08) contrast(1.05) brightness(1.015); }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 32px rgba(26,21,18,.22), inset 0 0 36px rgba(26,21,18,.1); }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-img { transform: scale(1.08); }
.card-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,7,.92) 0%, rgba(10,8,7,.55) 32%, rgba(10,8,7,0) 62%); }
.card-tag { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(247,243,236,.92); color: var(--ink); backdrop-filter: blur(2px); padding: 3px 11px; border-radius: 99px; font-size: .74rem; font-weight: 600; }
.card-info { position: absolute; inset-inline: 0; bottom: 0; padding: 14px; display: grid; gap: 3px; color: var(--white); }
.card-store { color: rgba(255,255,255,.8); font-size: .8rem; }
.card-store .verified { color: #9FC6DA; }
.card-name { font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.card-price { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: #FFC58A; }
.card-price.price-contact { color: rgba(255,255,255,.75); font-weight: 600; font-size: .92rem; font-family: var(--font); }
/* الشريط المتحرك (أساس شريط «منتجات الاستيراد»؛ شريط المميّزة صار بانر .fban تحت): أثر دولاب كخلفية ظاهرة
   للشريط كله، والنص والصورة ملزّقون مباشرة فوقه، كل عنصر بعمقه الخاص (ظل/ميلان). */
.featured-strip { position: relative; background: var(--orange) url('/img/tire-tread.png') repeat center / 360px auto; border-radius: 18px; margin-top: 22px; padding: 10px 6px; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 20px 40px -12px rgba(26,21,18,.35), inset 0 0 46px rgba(0,0,0,.2); }
.featured-carousel { display: flex; align-items: center; gap: 8px; position: relative; }
.fc-arrow { flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: linear-gradient(180deg, #fff, #ECE7DC); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.4), inset 0 1px 0 #fff; transition: transform .15s ease; }
.fc-arrow:hover { transform: translateY(-2px) scale(1.06); }
.fc-arrow:active { transform: translateY(0) scale(.94); }
.fc-viewport { flex: 1; overflow: hidden; }
.fc-track { display: flex; direction: rtl; transition: transform .5s cubic-bezier(.22,.78,.25,1); }
.fc-item { flex: 0 0 100%; min-width: 0; overflow: hidden; direction: rtl; display: flex; align-items: center; gap: 26px; padding: 26px 22px; text-decoration: none; min-height: 282px; }
.fc-info { flex: 1; min-width: 0; display: grid; gap: 8px; }
.fc-name { font-weight: 800; color: #fff; font-size: 1.6rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 5px rgba(0,0,0,.6), 0 1px 1px rgba(0,0,0,.4); }
.fc-store { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.92); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.fc-store .verified { color: #fff; }
.fc-thumb { flex: 0 1 300px; min-width: 0; width: 300px; height: auto; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--surface); border: 4px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25), 0 14px 24px -4px rgba(0,0,0,.55); transform: rotate(-3deg); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.fc-item:hover .fc-thumb { transform: rotate(1deg) scale(1.06); }
.fc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.fc-dots { display: flex; justify-content: center; gap: 7px; padding: 8px 0 2px; }
.fc-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); transition: width .4s var(--spring), background-color .25s ease; }
.fc-dots button[aria-current="true"] { background: #fff; width: 22px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
@media (max-width: 640px) {
  .fc-item { gap: 14px; padding: 18px 8px; min-height: 210px; }
  .fc-name { font-size: 1.15rem; }
  .fc-store { font-size: .85rem; white-space: normal; }
  .fc-thumb { flex-basis: 170px; width: 170px; }
  .fc-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* شريط «منتجات الاستيراد»: نفس بنية شريط المميّزة وحركته، بخلفية فولاذية بدل البرتقالي وأثر دولاب أبيض خفيف */
.featured-strip.import-strip { background: linear-gradient(120deg, #142a36 0%, var(--steel-deep) 50%, #1f4254 100%); }
.import-strip::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: url('/img/tire-tread.png') repeat center / 360px auto; filter: invert(1); opacity: .1; }
.import-strip .featured-carousel, .import-strip .fc-dots { position: relative; z-index: 1; }
.fc-tag { justify-self: start; white-space: nowrap; padding: 3px 14px; border-radius: 99px; font-size: .85rem; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); }
.fc-wa { flex: 0 0 auto; width: 170px; height: 170px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #3fd283, #1F7A4D 70%); box-shadow: 0 3px 8px rgba(0,0,0,.3), 0 14px 26px -6px rgba(0,0,0,.55); transform: rotate(-3deg); transition: transform .35s var(--spring); }
.fc-wa svg { width: 92px; height: 92px; }
.fc-cta:hover .fc-wa { transform: rotate(3deg) scale(1.08); }
@media (max-width: 640px) { .fc-wa { width: 110px; height: 110px; } .fc-wa svg { width: 60px; height: 60px; } .fc-tag { font-size: .64rem; padding: 0 8px; } }
/* شارة خدمة الاستيراد (img/import-badge.svg: طائرة وسهم صاعد بالبرتقالي والأبيض) بجانب نص كل قطعة في الشريط */
.imp-badge { flex: 0 1 130px; min-width: 56px; width: 130px; height: auto; aspect-ratio: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
@media (max-width: 640px) { .imp-badge { width: 84px; } }
/* نوافذ ضيقة جداً: لا مكان للشارة والصورة والنص جنباً إلى جنب، فتُخفى الشارة (العبارة «استيراد عند الطلب» تبقى ظاهرة) */
@media (max-width: 480px) { .imp-badge { display: none; } .featured-strip .fc-item { gap: 10px; padding: 14px 2px; min-height: 0; } .fc-thumb { flex-basis: 44%; width: 44%; } .fc-name { font-size: 1rem; } .fc-store { font-size: .76rem; } .fc-wa { width: 76px; height: 76px; } .fc-wa svg { width: 42px; height: 42px; } }

/* ===== شريط المنتجات المميّزة بتصميم العميل: بانر بعرض الشريط لكل منتج، يتبدّل بالأسهم والنقاط والسحب وتلقائياً.
   الصورة تملأ البانر: نسخة مكبّرة مغبّشة وغامقة خلفيةً، والصورة نفسها كاملة على اليسار (صور المتاجر غالباً طولية
   فلا تُقص). على اليمين: اسم المتجر مكان شعار الماركة، وتحته أول 4 كلمات من وصف المنتج، وزر «اكتشف الآن». ===== */
.fban { position: relative; margin-top: 22px; }
.fban-car { position: relative; border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 0 20px 40px -16px rgba(26,21,18,.55); }
.fban-viewport { overflow: hidden; }
.fban-track { display: flex; direction: rtl; transition: transform .6s cubic-bezier(.22,.78,.25,1); }
@media (prefers-reduced-motion: reduce) { .fban-track { transition: none; } }
/* --fb-in هامش جهة النص (مكان السهم)، --fb-pin هامش جهة الصورة (السهم يقع فوق طرفها)، --fb-ph عرض إطار الصورة (1.5 ضعف السابق بطلب العميل؛ والبانر أعلى حتى تظهر الصورة كاملة بلا قص)، والصورة تظهر كاملة بلا قص؛ لذلك صار البانر أعلى)،
   --fb-gap فراغ ثابت بين الصورة والنص؛ عرض النص هو الباقي فلا يلتصقان مهما طال الاسم */
.fban-slide { --fb-in: 6%; --fb-pin: 3%; --fb-ph: 66%; --fb-gap: 3%; position: relative; flex: 0 0 100%; display: block; height: clamp(300px, 40vw, 540px); overflow: hidden; text-decoration: none; color: var(--white); isolation: isolate; }
.fban-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(22px) saturate(1.25) brightness(.62); transform: scale(1.06); z-index: -2; }
.fban-slide::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(26,21,18,.78) 0%, rgba(26,21,18,.5) 38%, rgba(26,21,18,.08) 62%, rgba(26,21,18,0) 100%); }
.fban-photo { position: absolute; inset-block: 4%; inset-inline-end: var(--fb-pin); width: var(--fb-ph); display: flex; align-items: center; justify-content: center; }
/* الصورة تكبر لتملأ إطارها بنسبتها الأصلية (لا قص ولا تمطيط): --ar نسبة العرض للارتفاع، يضبطها app.js عند تحميل الصورة */
.fban-photo { container-type: size; }
.fban-photo img { width: min(100cqw, 100cqh * var(--ar, 1.5)); height: auto; max-width: none; border-radius: 12px; box-shadow: 0 18px 34px -10px rgba(0,0,0,.6); transition: transform .5s cubic-bezier(.2,.8,.2,1); filter: saturate(1.08) contrast(1.05); }
.fban-slide:hover .fban-photo img { transform: scale(1.03); }
.fban-text { position: absolute; inset-block: 0; inset-inline-start: var(--fb-in); width: calc(100% - var(--fb-in) - var(--fb-pin) - var(--fb-ph) - var(--fb-gap)); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
.fban-store { font: 800 clamp(1.2rem, .7rem + 1.3vw, 2rem)/1.15 var(--display); letter-spacing: .01em; text-shadow: 0 2px 10px rgba(0,0,0,.45); overflow-wrap: anywhere; }
.fban-store.is-long { font-size: clamp(1.05rem, .65rem + 1vw, 1.6rem); }
.fban-line { font: 700 clamp(.95rem, .75rem + .6vw, 1.3rem)/1.4 var(--display); text-shadow: 0 2px 8px rgba(0,0,0,.45); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fban-cta { margin-top: 6px; display: inline-block; padding: 10px 22px; border-radius: 10px; font-weight: 700; color: var(--ink); background: linear-gradient(180deg, #F2924F 0%, var(--orange) 55%, var(--orange-deep) 100%); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px -6px rgba(182,92,19,.6); transition: transform .15s ease; }
.fban-slide:hover .fban-cta { transform: translateY(-2px); }
.fban-arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.35); transition: transform .15s ease, background-color .15s ease; }
.fban-arrow:hover { background: var(--white); transform: scale(1.08); }
.fban-arrow:active { transform: scale(.94); }
.fban-prev { right: 12px; }
.fban-next { left: 12px; }
.fban-dots { position: absolute; z-index: 2; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.fban-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.6); cursor: pointer; transition: width .4s var(--spring), background-color .25s ease; }
.fban-dots button[aria-current="true"] { width: 26px; background: var(--orange); }
@media (max-width: 640px) {
  .fban-slide { height: 62vw; --fb-in: 52px; --fb-pin: 14px; --fb-ph: 60%; --fb-gap: 10px; }
  .fban-text { gap: 6px; }
  .fban-cta { padding: 8px 16px; font-size: .9rem; }
  .fban-arrow { width: 34px; height: 34px; margin-top: -17px; font-size: 1.25rem; }
}

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pager span[aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* صفحة المنتج */
.product-stage { position: relative; isolation: isolate; }
.ambient-glow { position: absolute; inset: -60px 0; background-size: cover; background-position: center; filter: blur(70px) saturate(1.35) brightness(1.08); opacity: .4; z-index: -1; pointer-events: none; }
.product { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: start; }
.buy .btn-wa, .buy form.add button { padding: 15px 22px; font-size: 1.05rem; }
.buy h1 { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.5rem); }
/* عرض الجوال يُفرض 880 (viewport.js)، فنقطة التوقف هنا 900 حتى تلتقطه: الصور بالأعلى، ثم الوصف تحتها بعمود واحد */
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }
.gallery .main { aspect-ratio: 4 / 3; background: var(--surface); border-radius: var(--radius); overflow: hidden; perspective: 1000px; box-shadow: 0 10px 30px rgba(26,21,18,.1); cursor: zoom-in; }
.lightbox-overlay { position: fixed; inset: 0; background: rgba(10,8,7,.93); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; animation: flashIn .2s ease both; }
.lightbox-overlay img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; transform: rotateX(0) rotateY(0) scale3d(1,1,1); transition: transform .5s cubic-bezier(.2,.8,.2,1); will-change: transform; transform-style: preserve-3d; }
.gallery .main.tilting img { transition: transform .08s linear; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: 0 0 76px; height: 60px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface); }
.thumbs button[aria-pressed="true"] { border-color: var(--orange); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy .price { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--orange-deep); }
.buy .seller { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border-radius: var(--radius); margin: 16px 0; }
.buy .seller img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--white); }
.buy form.add { display: flex; gap: 8px; }
.buy form.add input { width: 80px; }
.desc { white-space: pre-line; }
/* نصوص يكتبها المستخدمون (أوصاف، أسماء، تعليقات، روابط طويلة): الكلمة الطويلة بلا مسافات تنكسر ضمن مكانها
   بدل ما توسّع عمود المنتج وتصغّر صورته، أو تطلع برا حافة شاشة الجوال */
main p, main h1, main h2, main h3, main li, .desc, .card-name, .card-store, .notes a, .flash, .breadcrumb { overflow-wrap: anywhere; }
.product > *, .profile-grid > *, .about-grid > *, .profile-main, .profile-side { min-width: 0; }
details.report { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
details.report summary { cursor: pointer; color: var(--muted); font-size: .9rem; }

/* صفحة المنتج على الجوال: كانت بلا تكبير، فطلعت نصوصها صغيرة وغير واضحة رغم عمود المنتج الواحد؛
   تُكبَّر هون بمعامل خاص (--pm) أخف من معامل الترويسة (--m) لأن عناصرها أصلاً أكبر من عناصر الترويسة */
html.is-phone { --pm: calc(var(--m) * .9); }
html.is-phone .breadcrumb { font-size: calc(.86rem * var(--pm)); }
html.is-phone .buy .tag { font-size: calc(.8rem * var(--pm)); padding: calc(3px * var(--pm)) calc(10px * var(--pm)); }
html.is-phone .buy h1 { font-size: calc(1.55rem * var(--pm)); line-height: 1.25; }
html.is-phone .buy .price { font-size: calc(1.55rem * var(--pm)); }
html.is-phone .buy .seller { padding: calc(14px * var(--pm)); gap: calc(12px * var(--pm)); margin: calc(16px * var(--pm)) 0; }
html.is-phone .buy .seller img { width: calc(48px * var(--pm)); height: calc(48px * var(--pm)); }
html.is-phone .buy .seller strong { font-size: 31.5px; }
html.is-phone .buy .seller .small { font-size: 31.5px; }
/* أوسمة المتجر في بطاقة البائع على الجوال (بطلب مدير المشروع): ارتفاع 67.5px (الأصلي 27 × 2.5)،
   وتمتد أفقياً بكامل عرض البطاقة، وتتقاسم العرض بالتساوي إن كانت أكثر من وسام */
html.is-phone .buy .seller > div { flex: 1; min-width: 0; }
html.is-phone .buy .seller .medals.compact { display: flex; flex-wrap: nowrap; gap: 10px; margin-top: 14px; width: 100%; }
html.is-phone .buy .seller .medals.compact .medal { flex: 1 1 0; min-width: 0; height: 67.5px; box-sizing: border-box; justify-content: center; gap: 12px; padding: 0 14px; border-radius: 18px; font-size: 24px; line-height: 1.2; white-space: normal; text-align: center; }
html.is-phone .buy .seller .medals.compact .medal-ico { width: 46px; height: 46px; }
html.is-phone .buy .seller .medals.compact .medal-ico svg { width: 26px; height: 26px; }
html.is-phone .buy .btn-wa, html.is-phone .buy form.add button { padding: calc(15px * var(--pm)) calc(22px * var(--pm)); font-size: calc(1.05rem * var(--pm)); }
html.is-phone .buy form.add input { width: calc(80px * var(--pm)); font-size: calc(1rem * var(--pm)); padding: calc(10px * var(--pm)); }
html.is-phone .buy .section { font-size: calc(1.1rem * var(--pm)) !important; }
html.is-phone .desc { font-size: calc(1rem * var(--pm)); line-height: 1.7; }
html.is-phone .thumbs button { flex-basis: calc(76px * var(--pm)); height: calc(60px * var(--pm)); }
html.is-phone details.report summary { font-size: calc(.95rem * var(--pm)); }
html.is-phone .product { gap: calc(20px * var(--pm)); }

/* صفحة المتجر بأسلوب صفحات البروفايل (بهوية المنصة): رأس أبيض فيه غلاف عريض وصورة دائرية تتداخل معه،
   والاسم والمتابعون والأوسمة والأزرار، ثم شريط تبويبات؛ وتحته جسم رمادي فاتح ببطاقات بيضاء (عمود «حول» + المحتوى). */
.profile-top { position: relative; z-index: 1; margin-top: -26px; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 8px 16px -14px rgba(26,21,18,.35); }
.flash-zone:has(.flash) + .profile .profile-top, .flash-zone:has(.flash) + .hero { margin-top: 0; }
.profile-cover { position: relative; overflow: hidden; aspect-ratio: 1164 / 380; max-height: 400px; border-radius: 0 0 16px 16px; background: var(--ink); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
/* الغلاف الافتراضي لمتجر لم يرفع غلافه: هوية المنصة (تدرّج غامق، دولاب، وأثر إطار) */
.profile-cover.is-default { background: url('/img/hero-wheel.webp') no-repeat left -4% center / auto 150%, linear-gradient(115deg, var(--ink) 0%, var(--ink) 50%, var(--steel-deep) 135%); }
.profile-cover.is-default::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 12px; background: url('/img/tire-tread.png') repeat-x center / auto 340%; opacity: .45; }
.profile-id { display: flex; align-items: flex-start; gap: 22px; padding: 0 28px 16px; flex-wrap: wrap; }
.profile-avatar { position: relative; z-index: 1; flex: none; width: 176px; height: 176px; margin-top: -92px; border-radius: 50%; object-fit: cover; background: var(--white); border: 5px solid var(--white); box-shadow: 0 8px 22px rgba(26,21,18,.28); }
.profile-meta { flex: 1; min-width: 260px; padding-top: 14px; }
.profile-meta h1 { margin: 0; font-size: clamp(1.7rem, 1.25rem + 1.2vw, 2.25rem); }
.profile-meta h1 .verified { font-size: .5em; vertical-align: middle; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.profile-stats b { color: var(--ink); font-family: var(--display); }
.profile-stats a { text-decoration: none; }
.profile-stats a:hover { color: var(--orange-deep); }
.profile-sub { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.profile-meta .medals { margin-top: 12px; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; align-self: flex-end; padding-bottom: 4px; }
.profile-actions form { margin: 0; }
.btn-soft { background: #ECEAE6; color: var(--ink); }
.btn-soft:hover { background: #E1DDD6; box-shadow: 0 6px 14px rgba(26,21,18,.1); }
.btn-soft.is-on { background: var(--orange-soft); color: var(--orange-deep); }
.profile-tabs { display: flex; gap: 4px; margin: 0 16px; padding: 4px 0; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs a { position: relative; flex: none; padding: 12px 18px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; transition: background-color .16s ease, color .16s ease; }
.profile-tabs a span { display: inline-block; min-width: 22px; margin-inline-start: 4px; padding: 0 7px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .78rem; line-height: 20px; text-align: center; }
.profile-tabs a:hover { background: var(--surface); color: var(--ink); }
.profile-tabs a[aria-current="page"] { color: var(--orange-deep); }
.profile-tabs a[aria-current="page"] span { background: var(--orange-soft); color: var(--orange-deep); }
.profile-tabs a[aria-current="page"]::after { content: ''; position: absolute; inset-inline: 8px; bottom: -4px; height: 3px; border-radius: 3px 3px 0 0; background: var(--orange); }
.profile-body { background: var(--surface); padding: 22px 0 60px; margin-bottom: -60px; }
.profile-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-side { display: grid; gap: 16px; align-content: start; }
.pcard { background: var(--white); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(26,21,18,.1), 0 0 0 1px rgba(26,21,18,.03); }
.pcard h2 { font-size: 1.2rem; margin: 0 0 10px; }
.pcard .section-head { margin-bottom: 14px; }
.pcard .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pcard > .desc { margin: 0; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pinfo { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 11px; }
.pinfo li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.pinfo svg, .trust-line svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pinfo a { color: var(--ink); font-weight: 600; }
.pinfo a:hover { color: var(--orange-deep); }
.trust-line { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 600; }
.trust-line svg { stroke: var(--steel); margin: 0; }
.qr { display: block; width: 100%; max-width: 230px; margin: 6px auto 12px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; }
.qr-lg { max-width: 300px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.rating-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rs-score { display: grid; justify-items: center; padding: 10px 22px; border-radius: 12px; background: var(--surface); }
.rs-score b { font-family: var(--display); font-size: 2.2rem; line-height: 1.1; }
.rating-summary p { flex: 1; min-width: 220px; }
.reviews { margin-top: 6px; }
.reviews .review:last-child { border-bottom: 0; }
@media (max-width: 960px) {
  .profile-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-grid .profile-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 640px) {
  .profile-id { padding: 0 8px 14px; gap: 10px 16px; }
  .profile-avatar { width: 128px; height: 128px; margin-top: -64px; }
  .profile-meta { min-width: 0; flex-basis: 100%; padding-top: 0; }
  .profile-actions { align-self: auto; }
  .profile-tabs { margin: 0; }
}
/* المتاجر التي أتابعها */
.follow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.follow-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.follow-store { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.follow-store img { flex: none; width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--white); }
.follow-store > span { display: grid; min-width: 0; }
.follow-store:hover strong { color: var(--orange-deep); }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review .reply { margin: 8px 0 0; padding: 8px 12px; border-inline-start: 3px solid var(--orange); background: var(--surface); border-radius: 6px; font-size: .92rem; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 1.8rem; color: var(--line); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--orange); }
.star-input input:focus-visible + label { outline: 3px solid var(--orange); }

/* جداول */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: var(--white); font-weight: 500; font-size: .9rem; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
/* max-width: none: قاعدة img العامة (max-width: 100%) كانت تسمح للجدول بضغط الصورة المصغّرة لشريط رفيع */
td .thumb { width: 56px; height: 44px; max-width: none; object-fit: cover; border-radius: 6px; background: var(--surface); }
tr.dim td { color: var(--muted); }

/* جداول تتحوّل لبطاقات مكدّسة على الشاشات الضيقة بدل انضغاط الأعمدة لنص غير مقروء */
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; border: 0; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td, .table-wrap th { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 4px 14px; background: var(--white); }
  .table-wrap td, .table-wrap th { padding: 9px 0; border-bottom: 1px solid var(--line); }
  .table-wrap tr:last-child td, .table-wrap tr:last-child th { border-bottom: 0; }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap td[data-label]::before, .table-wrap th[data-label]::before { content: attr(data-label); display: block; font-size: .76rem; color: var(--muted); font-weight: 400; margin-bottom: 3px; }
  .table-wrap td .thumb { width: 100%; height: auto; max-height: 160px; object-fit: contain; margin-bottom: 6px; }
}

/* لوحات التحكم */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.dash > * { min-width: 0; } /* الجداول العريضة تُمرَّر داخل إطارها بدل أن تدفع الصفحة أعرض من الشاشة */
.dash nav { display: grid; gap: 2px; position: sticky; top: 84px; }
.dash nav a { text-decoration: none; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); }
.dash nav a:hover { background: var(--surface); }
.dash nav a[aria-current="page"] { background: var(--ink); color: var(--white); }
.dash nav .who { font-family: var(--display); font-weight: 600; padding: 0 12px 10px; }
/* حتى 900: يشمل الجوال (تصميم اللابتوب بعرض 880) فتأخذ جداول اللوحات العرض كاملاً وتصبح القائمة الجانبية شريط تبويبات */
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } .dash nav { position: static; display: flex; overflow-x: auto; gap: 6px; } .dash nav a { white-space: nowrap; border: 1px solid var(--line); } .dash nav .who { display: none; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: transform .15s linear, box-shadow .2s ease; }
/* ظهور متدرّج لبطاقات المنتجات عند دخولها الشاشة أثناء التمرير */
.card.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s var(--spring), transform .55s var(--spring); transition-delay: calc(var(--i, 0) * 45ms); }
.card.reveal.revealed { opacity: 1; transform: translateY(0); }
a.stat:hover, .stat:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(26,21,18,.1); }
.stat b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat.hot { border-color: var(--orange); background: var(--orange-soft); }
.meter { height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--orange); }

/* رفع الصور */
.uploader { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; }
.uploader .previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.uploader figure { margin: 0; position: relative; width: 104px; }
.uploader figure img { width: 104px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.uploader figure button, .uploader figure label { position: absolute; top: 4px; inset-inline-end: 4px; background: var(--ink); color: var(--white); border: 0; border-radius: 6px; font-size: .75rem; padding: 2px 7px; cursor: pointer; }
.uploader figure.removed img { opacity: .3; }
/* اختيار صورة الشريط المميّز (صورة واحدة لكل منتج) تحت كل صورة محفوظة */
.uploader figure .banner-pick { position: static; display: flex; align-items: center; gap: 4px; margin-top: 5px; padding: 3px 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-size: .72rem; }
.uploader figure .banner-pick:has(input:checked) { background: var(--orange); border-color: var(--orange); font-weight: 700; }
/* معاينة صورة الغلاف عريضة، ورمز شام كاش مربّع كامل بلا قص */
.uploader-wide figure { width: 260px; }
.uploader-wide figure img { width: 260px; height: 98px; }
.uploader-qr figure img { width: 104px; height: 104px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.form-sec { margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.form-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

/* رسائل المتاجر بانتظار موافقة الإدارة */
.msg-card { border: 1px solid var(--line); border-inline-start: 4px solid var(--orange); border-radius: 12px; padding: 16px 18px; background: var(--white); }
.msg-card h3 { margin: 8px 0 4px; }
.msg-decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.msg-decide input { flex: 1; min-width: 220px; }
/* اختيار الفرق في إشعارات الإدارة */
.team-picks { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--white); }
.team-picks summary { cursor: pointer; font-weight: 600; color: var(--orange-deep); }
.team-picks .tight-list { margin-top: 10px; max-height: 260px; overflow-y: auto; }

/* الإشعارات */
.notes { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notes a { display: block; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.notes a:last-child { border-bottom: 0; }
.notes a.new { background: var(--orange-soft); border-inline-start: 4px solid var(--orange); }
.notes a:hover { background: var(--surface); }

/* الفرق */
.team-card { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.team-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 10px 4px 20px; border-bottom: 1px solid var(--line); }
.team-head .meta { flex: 1; min-width: 240px; }
.team-card:hover { border-color: var(--ink); }
.event { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: start; }
.event .when { background: var(--ink); color: var(--white); border-radius: 8px; text-align: center; padding: 8px 4px; font-family: var(--display); line-height: 1.2; }
.event .when b { display: block; font-size: 1.6rem; color: var(--orange); }
@media (max-width: 640px) { .event { grid-template-columns: 64px 1fr; } .event .actions { grid-column: 1 / -1; } }

/* دليل القياسات */
.calc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .calc { grid-template-columns: 1fr; } }
.result { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.result b { color: var(--orange); font-family: var(--display); font-size: 1.6rem; }
/* لون لكل نوع دراجة في جداول القياسات: رأس العمود بلون النوع، وخلاياه بدرجة فاتحة منه، ومفتاح للألوان فوق الجداول.
   لتغيير الألوان يكفي تعديل المتغيرات --sg-* هنا. */
:root {
  --sg-mtb: #E8792B; --sg-mtb-ink: #1A1512; --sg-mtb-soft: #FDEEE2;
  --sg-road: #3E6B85; --sg-road-ink: #FFFFFF; --sg-road-soft: #E8EFF3;
  --sg-city: #2F7D4F; --sg-city-ink: #FFFFFF; --sg-city-soft: #E5F2EA;
  --sg-kids: #D9A94E; --sg-kids-ink: #1A1512; --sg-kids-soft: #FAF1DF;
}
.sg-mtb { --c: var(--sg-mtb); --ci: var(--sg-mtb-ink); --cs: var(--sg-mtb-soft); }
.sg-road { --c: var(--sg-road); --ci: var(--sg-road-ink); --cs: var(--sg-road-soft); }
.sg-city { --c: var(--sg-city); --ci: var(--sg-city-ink); --cs: var(--sg-city-soft); }
.sg-kids { --c: var(--sg-kids); --ci: var(--sg-kids-ink); --cs: var(--sg-kids-soft); }
.sg-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 26px 0 0; padding: 0; }
.sg-legend li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 8px; border-radius: 999px; background: var(--cs); color: var(--ink); font-weight: 600; font-size: .9rem; }
.sg-legend i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }
table.ref thead th.sg-col { background: var(--c); color: var(--ci); font-weight: 700; }
table.ref td.sg-mtb, table.ref td.sg-road, table.ref td.sg-city, table.ref td.sg-kids { background: var(--cs); font-weight: 600; }
/* صف المقاس المقترح للزائر: الصف كله داكن، وخلايا الأنواع بلونها الكامل */
table.ref tr.hit td { background: var(--ink); color: var(--white); font-weight: 700; }
table.ref tr.hit td[class^="sg-"] { background: var(--c); color: var(--ci); }
table.compare th.sg-row { border-inline-start: 5px solid var(--c); background: var(--cs); white-space: nowrap; }
.result.sg-mtb, .result.sg-road, .result.sg-city, .result.sg-kids { border-inline-start: 6px solid var(--c); }
@media (max-width: 700px) {
  .table-wrap table.ref td[class^="sg-"] { border-inline-start: 4px solid var(--c); padding-inline-start: 10px; }
}

/* السلة */
.cart-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.cart-group header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); flex-wrap: wrap; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: center; }
.cart-item img { width: 72px; height: 56px; object-fit: cover; border-radius: 6px; }
.cart-item form.qty { display: flex; gap: 6px; }
.cart-item form.qty input { width: 64px; padding: 6px 8px; }
.cart-group footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.deliver { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 16px; border-top: 1px dashed var(--line); background: #FBFAF8; }
.deliver[hidden], .deliver-addr[hidden] { display: none; }
.deliver-h { font-weight: 700; }
.deliver .check-line { font-weight: 600; }
.deliver-addr { flex: 1 1 260px; }
.deliver-addr input { width: 100%; }
.grand { display: flex; justify-content: space-between; align-items: center; padding: 18px; background: var(--ink); color: var(--white); border-radius: var(--radius); font-family: var(--display); font-size: 1.2rem; }

@media (max-width: 760px) {
  /* بطلب العميل: 3 منتجات بكل سطر على الجوال */
  .grid, .pcard .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card-info { padding: 7px; gap: 1px; }
  .card-tag { top: 6px; inset-inline-start: 6px; padding: 1px 7px; font-size: .62rem; }
  .card-store { font-size: .66rem; }
  .card-name { font-size: .76rem; line-height: 1.3; }
  .card-price { font-size: .84rem; }
  .card-price.price-contact { font-size: .7rem; }
  .nav .home-link { display: none; }
  .hero { padding: 26px 0 40vw; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* انتقال سينمائي بين كل صفحات الموقع (يدعمه كروم/إيدج تلقائياً؛ باقي المتصفحات تتصفّح عادي بدون أي كسر) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms cubic-bezier(.4,0,1,1) both vt-out; }
::view-transition-new(root) { animation: 280ms cubic-bezier(0,0,.2,1) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
@media print { .site-head, .site-foot, .dash nav { display: none; } }

/* شريط متاجر VIP: ثابت بلا حركة تلقائية، بشعارات دائرية كبيرة واسم كل متجر تحت شعاره.
   إذا زادت الشعارات عن عرض الشاشة يُسحب أفقياً بالإصبع، وتظهر أسهم وتلاشٍ على الطرف المخفي (app.js). */
.vip-strip { background: #211B17; border-bottom: 2px solid var(--orange); }
.vip-inner { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.vip-head { flex: none; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #F7F3EC; font: 700 .85rem/1.2 var(--font); white-space: nowrap; text-align: center; }
.vip-tag { padding: 3px 8px; border-radius: 6px; background: linear-gradient(180deg, #F2924F, var(--orange-deep)); color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.vip-scroller { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.vip-viewport { flex: 1; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.vip-viewport::-webkit-scrollbar { display: none; }
.vip-scroller.has-overflow .vip-viewport { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to left, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.vip-scroller.has-overflow.at-start .vip-viewport { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent 100%); }
.vip-scroller.has-overflow.at-end .vip-viewport { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px); mask-image: linear-gradient(to left, transparent 0, #000 28px); }
.vip-track { display: flex; gap: 6px; width: max-content; padding: 2px; }
.vip-item { flex: none; width: 124px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 4px; border-radius: 12px; text-decoration: none; scroll-snap-align: start; transition: background-color .2s ease; }
.vip-item:hover, .vip-item:focus-visible { background: rgba(255,255,255,.06); }
.vip-logo { flex: none; width: 66px; height: 66px; border-radius: 50%; overflow: hidden; background: #fff; border: 2.5px solid rgba(255,255,255,.85); box-shadow: 0 6px 14px -4px rgba(0,0,0,.6); transition: border-color .2s ease, transform .3s var(--spring); }
.vip-logo img { width: 100%; height: 100%; object-fit: cover; }
.vip-item:hover .vip-logo, .vip-item:focus-visible .vip-logo { border-color: var(--orange); transform: translateY(-2px) scale(1.04); }
/* اسم المتجر على سطرين كحد أقصى تحت شعاره */
.vip-name { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #E9E4DE; font-size: .8rem; font-weight: 600; line-height: 1.35; text-align: center; transition: color .2s ease; }
.vip-item:hover .vip-name, .vip-item:focus-visible .vip-name { color: #F2924F; }
.vip-arrow { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background-color .16s ease, color .16s ease, opacity .16s ease; }
.vip-arrow:hover { background: var(--orange); color: var(--ink); }
.vip-arrow[disabled] { opacity: .3; cursor: default; background: rgba(255,255,255,.12); color: #fff; }
.vip-arrow[hidden] { display: none; }

/* ===== وضع الجوال (علامة is-phone من viewport.js): الصفحة بتصميم اللابتوب بعرض 880 مصغّرة على شاشة الجوال،
   فتُكبَّر العناصر الثابتة (الترويسة والبحث وفلاتر الفئات والذيل وتبويبات اللوحات وشريط VIP) لتناسب القراءة والإصبع.
   --m معامل التكبير: كبير بالوضع العمودي، وخفيف بالعرضي لأن التصغير فيه شبه معدوم. لا يتأثر التابلت ولا اللابتوب. ===== */
:root { --m: 1; }
html.is-phone { --m: 1.9; }
@media (orientation: landscape) { html.is-phone { --m: 1.12; } }

/* الترويسة على سطرين للجوال العمودي فقط؛ بالعرض تتسع ترويسة اللابتوب الأصلية بسطر واحد */
@media (orientation: portrait) {
  html.is-phone .site-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: calc(5px * var(--m)) 12px; min-height: 0; padding-block: calc(8px * var(--m)) calc(7px * var(--m)); }
  html.is-phone .brand { min-width: 0; gap: calc(8px * var(--m)); font-size: calc(1.02rem * var(--m)); }
  html.is-phone .brand img { width: calc(32px * var(--m)); height: calc(32px * var(--m)); }
  html.is-phone .nav-actions { grid-column: 2; grid-row: 1; margin: 0; flex-wrap: nowrap; gap: calc(2px * var(--m)); }
  html.is-phone .nav-main { grid-column: 1 / -1; grid-row: 2; margin: 0; flex-wrap: nowrap; gap: calc(5px * var(--m)); overflow-x: auto; scrollbar-width: none; }
  html.is-phone .nav-main::-webkit-scrollbar { display: none; }
  html.is-phone .nav a, html.is-phone .nav summary { font-size: calc(.92rem * var(--m)); padding: calc(5px * var(--m)) calc(8px * var(--m)); white-space: nowrap; }
  html.is-phone .nav-main a { flex: none; border: calc(1px * var(--m)) solid #3A332D; border-radius: 999px; padding-inline: calc(12px * var(--m)); }
  html.is-phone .nav-main a[aria-current="page"] { border-color: var(--orange); }
  html.is-phone .nav-main .home-link { display: inline-block; }
  html.is-phone .nav .ico { width: calc(19px * var(--m)); height: calc(19px * var(--m)); }
  html.is-phone .cart-link .ico { display: inline-block; }
  html.is-phone .cart-link .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html.is-phone .count { min-width: calc(19px * var(--m)); padding: 0 calc(5px * var(--m)); margin-inline-start: calc(2px * var(--m)); font-size: calc(.72rem * var(--m)); line-height: calc(19px * var(--m)); }
  html.is-phone .nav a.btn-primary { padding: calc(5px * var(--m)) calc(11px * var(--m)); }
  html.is-phone .menu[open] > div { min-width: calc(220px * var(--m)); padding: calc(6px * var(--m)); font-size: calc(.95rem * var(--m)); }
  html.is-phone .menu[open] > div a, html.is-phone .menu[open] > div button { padding: calc(8px * var(--m)) calc(12px * var(--m)); font-size: inherit; }
  html.is-phone .menu .who { font-size: calc(.85rem * var(--m)); padding: calc(7px * var(--m)) calc(12px * var(--m)); }
}

html.is-phone .hero form { max-width: none; border-radius: calc(10px * var(--m)); border-bottom-width: calc(4px * var(--m)); }
html.is-phone .hero input[type=search] { font-size: calc(1.02rem * var(--m)); padding: calc(12px * var(--m)) calc(15px * var(--m)); }
html.is-phone .hero button { font-size: calc(.95rem * var(--m)); padding-inline: calc(20px * var(--m)); }
html.is-phone .hero-stats { margin-top: calc(14px * var(--m)); }
html.is-phone .hero-stats li { padding-inline-end: calc(16px * var(--m)); margin-inline-end: calc(16px * var(--m)); }
html.is-phone .hero-stats b { font-size: calc(1.25rem * var(--m)); }
html.is-phone .hero-stats span { font-size: calc(.76rem * var(--m)); }
html.is-phone .cats { flex-wrap: nowrap; gap: calc(6px * var(--m)); margin-top: calc(12px * var(--m)); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); }
html.is-phone .cats::-webkit-scrollbar { display: none; }
html.is-phone .cats a { flex: none; white-space: nowrap; scroll-snap-align: start; font-size: calc(.9rem * var(--m)); padding: calc(6px * var(--m)) calc(14px * var(--m)); border-width: calc(1px * var(--m)); }
html.is-phone .toolbar h2 { font-size: calc(1.15rem * var(--m)); }
html.is-phone .toolbar label, html.is-phone .toolbar select, html.is-phone .toolbar .btn { font-size: calc(.88rem * var(--m)); }
html.is-phone .toolbar select { padding: calc(6px * var(--m)) calc(10px * var(--m)); }
html.is-phone .toolbar .btn { padding: calc(6px * var(--m)) calc(12px * var(--m)); }

html.is-phone .vip-inner { gap: calc(10px * var(--m)); padding-block: calc(8px * var(--m)); }
html.is-phone .vip-head { font-size: calc(.78rem * var(--m)); gap: calc(4px * var(--m)); }
html.is-phone .vip-tag { font-size: calc(.66rem * var(--m)); padding: calc(2px * var(--m)) calc(6px * var(--m)); }
html.is-phone .vip-item { width: calc(104px * var(--m)); gap: calc(5px * var(--m)); padding: calc(4px * var(--m)) 2px; }
html.is-phone .vip-logo { width: calc(54px * var(--m)); height: calc(54px * var(--m)); border-width: calc(2px * var(--m)); }
html.is-phone .vip-name { font-size: calc(.76rem * var(--m)); }
html.is-phone .vip-arrow { display: none; } /* على الجوال يُسحب الشريط بالإصبع */

/* بانر المميّزة على الجوال: أعلى قليلاً من الحاسوب، والنصوص والزر والأسهم والنقاط بحجم القراءة واللمس */
html.is-phone .fban-car { border-radius: calc(14px * var(--m)); }
@media (orientation: portrait) { html.is-phone .fban-slide { height: 52vw; } }
html.is-phone .fban-store { font-size: calc(1rem * var(--m)); }
html.is-phone .fban-store.is-long { font-size: calc(.86rem * var(--m)); }
html.is-phone .fban-line { font-size: calc(.78rem * var(--m)); }
html.is-phone .fban-cta { font-size: calc(.76rem * var(--m)); padding: calc(6px * var(--m)) calc(12px * var(--m)); border-radius: calc(8px * var(--m)); }
html.is-phone .fban-slide { --fb-in: calc(14px + 30px * var(--m)); --fb-pin: calc(8px * var(--m)); --fb-ph: 58.5%; --fb-gap: calc(8px * var(--m)); }
html.is-phone .fban-text { gap: calc(4px * var(--m)); }
html.is-phone .fban-arrow { width: calc(30px * var(--m)); height: calc(30px * var(--m)); margin-top: calc(-15px * var(--m)); font-size: calc(1.15rem * var(--m)); }
html.is-phone .fban-dots { bottom: calc(9px * var(--m)); gap: calc(5px * var(--m)); }
html.is-phone .fban-dots button { width: calc(7px * var(--m)); height: calc(7px * var(--m)); }
html.is-phone .fban-dots button[aria-current="true"] { width: calc(20px * var(--m)); }
/* شريط الاستيراد على الجوال (ارتفاعه ضعف السابق): الاسم على سطرين بدل قصّه، والصورة والشارة بحجم يترك له مكاناً */
html.is-phone .fc-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: calc(.95rem * var(--m)); line-height: 1.3; }
html.is-phone .fc-store { white-space: normal; font-size: calc(.62rem * var(--m)); }
html.is-phone .fc-tag { font-size: calc(.5rem * var(--m)); }
html.is-phone .fc-thumb { flex-basis: 230px; width: 230px; }
html.is-phone .imp-badge { width: 108px; height: 108px; }
html.is-phone .fc-item { gap: 18px; }
/* بطلب العميل: 3 منتجات بكل سطر على الجوال، بأي صفحة فيها قائمة منتجات */
html.is-phone .grid, html.is-phone .pcard .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

html.is-phone .dash nav a { font-size: calc(.95rem * var(--m)); padding: calc(7px * var(--m)) calc(12px * var(--m)); }

html.is-phone .site-foot { font-size: calc(.9rem * var(--m)); }
html.is-phone .foot-grid { grid-template-columns: 1fr 1fr; gap: calc(20px * var(--m)) 24px; padding-block: calc(28px * var(--m)) calc(22px * var(--m)); }
html.is-phone .foot-brand { grid-column: 1 / -1; }
html.is-phone .foot-brand .brand { font-size: calc(1.05rem * var(--m)); }
html.is-phone .foot-brand .brand img { width: calc(30px * var(--m)); height: calc(30px * var(--m)); }
html.is-phone .foot-brand p { max-width: none; }
html.is-phone .foot-col h3 { font-size: calc(.98rem * var(--m)); margin-bottom: calc(10px * var(--m)); }
html.is-phone .foot-col ul { gap: calc(8px * var(--m)); }
html.is-phone .foot-inline { gap: calc(14px * var(--m)); }
html.is-phone .foot-inline a { font-size: inherit; }
html.is-phone .foot-bottom { font-size: calc(.82rem * var(--m)); }
html.is-phone .foot-glance-inner { gap: calc(6px * var(--m)) 18px; padding-block: calc(12px * var(--m)); }
html.is-phone .fg-stat { font-size: calc(.88rem * var(--m)); }
html.is-phone .foot-glance-inner .btn { font-size: calc(.85rem * var(--m)); padding: calc(6px * var(--m)) calc(12px * var(--m)); }

/* صفحة المتجر على الجوال: رأس البروفايل وأزراره وتبويباته بحجم مريح للإصبع، وبطاقات الصفحة مكبّرة بنسبة واحدة
   (zoom) حتى تبقى متناسقة: نصوص «حول» مقروءة والمنتجات بعمودين أكبر. المتصفحات التي لا تدعم zoom تعرضها بحجمها العادي. */
html.is-phone { --mz: 1.32; }
@media (orientation: landscape) { html.is-phone { --mz: 1; } }
html.is-phone .profile-body > .wrap { zoom: var(--mz); }
html.is-phone .profile-meta .medals { zoom: calc(var(--mz) * 1.2); }
@media (orientation: portrait) { html.is-phone .profile-cover { aspect-ratio: 16 / 7; } }
@media (orientation: landscape) { html.is-phone .profile-cover { aspect-ratio: auto; height: 210px; } } /* الجوال بالعرض: الغلاف لا يملأ ارتفاع الشاشة القصير */
html.is-phone .profile-avatar { width: calc(150px * var(--mz)); height: calc(150px * var(--mz)); margin-top: calc(-80px * var(--mz)); }
html.is-phone .profile-meta h1 { font-size: calc(1.4rem * var(--m)); }
html.is-phone .profile-stats, html.is-phone .profile-sub { font-size: calc(.95rem * var(--m)); }
html.is-phone .profile-actions .btn { font-size: calc(.92rem * var(--m)); padding: calc(8px * var(--m)) calc(14px * var(--m)); }
html.is-phone .profile-tabs a { font-size: calc(.95rem * var(--m)); padding: calc(10px * var(--m)) calc(16px * var(--m)); }
html.is-phone .profile-tabs a span { font-size: calc(.75rem * var(--m)); line-height: calc(19px * var(--m)); min-width: calc(20px * var(--m)); }

/* ---------- خدمات المتجر وحجز المواعيد (إضافة بطلب مدير المشروع) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.svc-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #FBFAF8; }
.svc-card h3 { margin: 4px 0 0; font-size: 1.08rem; }
.svc-card p { margin: 0; }
.svc-kind { align-self: flex-start; padding: 2px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--orange-soft); color: var(--orange-deep); }
.svc-kind.svc-rental { background: var(--steel-soft); color: var(--steel-deep); }
.svc-kind.svc-other { background: var(--surface); color: var(--ink-2); }
.svc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svc-price { font-family: var(--display); color: var(--orange-deep); }

/* استمارة الحجز: بطاقة بأسلوب النافذة المنبثقة (العنوان وزر الإغلاق أعلاها) */
.book-wrap { padding-block: 28px 48px; }
.book { max-width: 600px; margin-inline: auto; background: var(--white); border-radius: 16px; padding: 22px 24px 24px; box-shadow: 0 1px 2px rgba(26,21,18,.1), 0 20px 44px -18px rgba(26,21,18,.35); }
.book-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.book-head h1 { margin: 0; font-size: 1.35rem; }
.book-x { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); text-decoration: none; font-size: 1.5rem; line-height: 1; }
.book-x:hover { background: var(--surface); color: var(--ink); }
.book-form { gap: 14px; }
.book .req { color: var(--orange-deep); }
.book input[readonly] { background: var(--surface); }
.book fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .9rem; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.chip:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); font-weight: 700; }
.book-go, .book-send { padding-block: 13px; font-size: 1.05rem; }
.book-lead { margin: 0 0 14px; color: var(--ink-2); }
.book-summary { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.book-summary div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; padding: 9px 14px; }
.book-summary div:nth-child(odd) { background: #FBFAF8; }
.book-summary span { color: var(--ink-2); }
.book-summary b { overflow-wrap: anywhere; }
.book-edit { margin-top: 10px; }
@media (max-width: 560px) { .book .row2 { grid-template-columns: 1fr; } .book-summary div { grid-template-columns: 1fr; gap: 2px; } }
/* على الجوال (تصميم 880 مصغّراً): الاستمارة بعرض الشاشة، والخطوط والحقول بحجم القراءة واللمس */
html.is-phone .book { max-width: none; padding: calc(16px * var(--m)) calc(16px * var(--m)) calc(18px * var(--m)); font-size: calc(1rem * var(--m)); }
html.is-phone .book-head h1 { font-size: calc(1.25rem * var(--m)); }
html.is-phone .book .field label, html.is-phone .book .label, html.is-phone .book .hint, html.is-phone .book .err, html.is-phone .book p { font-size: calc(.86rem * var(--m)); }
html.is-phone .book input, html.is-phone .book select, html.is-phone .book textarea, html.is-phone .book .btn { font-size: calc(.95rem * var(--m)); }
html.is-phone .book input, html.is-phone .book select { min-height: calc(40px * var(--m)); }
html.is-phone .book .chip { font-size: calc(.84rem * var(--m)); padding: calc(6px * var(--m)) calc(10px * var(--m)); }
html.is-phone .book-x { width: calc(30px * var(--m)); height: calc(30px * var(--m)); font-size: calc(1.4rem * var(--m)); }
html.is-phone .book-summary div { font-size: calc(.88rem * var(--m)); }
html.is-phone .svc-grid { grid-template-columns: 1fr 1fr; }
html.is-phone .svc-card { font-size: calc(.9rem * var(--m)); }
html.is-phone .svc-card h3 { font-size: calc(1.05rem * var(--m)); }
html.is-phone .svc-card .btn { font-size: calc(.85rem * var(--m)); padding: calc(6px * var(--m)) calc(12px * var(--m)); }
html.is-phone .book input[type=checkbox] { width: calc(16px * var(--m)); height: calc(16px * var(--m)); }
.deliver-pick { gap: 10px; }
.deliver-pick > .chip { justify-self: start; align-self: flex-start; }
.deliver-pick [hidden] { display: none; }

/* ---------- صفحة المتجر: تصميم الجوال العمودي (اعتمده مدير المشروع في 21 تشرين الأول) ----------
   على اللابتوب والتابلت لا يتغيّر شيء: عناصر m-only مخفية، وتظهر فقط مع is-phone بالوضع العمودي.
   --u معامل المقاسات: صفحة الجوال بعرض 880 تُعرض على شاشة بعرض ~390، فكل 1px في التصميم = 2.2px هنا. */
.m-only { display: none; }
.profile-sub svg { display: none; }
@media (orientation: portrait) {
  html.is-phone { --u: 2.2; --ub: calc(var(--u) / var(--mz)); }
  html.is-phone :where(.profile .m-only) { display: revert; } /* :where يُبقي الأولوية منخفضة فتغلبها قواعد كل عنصر */
  html.is-phone .profile svg.m-ico, html.is-phone .sfm svg, html.is-phone .sfm-dock svg, html.is-phone .sfm-owner svg, html.is-phone .sfm-cover-btn svg, html.is-phone .sfm-pen svg, html.is-phone .sfm-teaser svg, html.is-phone .profile-sub svg {
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  /* شريط صاحب المتجر */
  html.is-phone .sfm-owner { display: flex; align-items: center; gap: calc(8px * var(--u)); padding: calc(9px * var(--u)) calc(16px * var(--u)); background: var(--ink); color: #fff; font-size: calc(13px * var(--u)); }
  html.is-phone .sfm-owner svg { width: calc(17px * var(--u)); height: calc(17px * var(--u)); color: var(--orange); }
  html.is-phone .sfm-owner a { margin-inline-start: auto; color: var(--orange); font-weight: 700; text-decoration: none; }
  /* الغلاف بعرض الشاشة، والشعار والاسم على حافته */
  html.is-phone .profile-top > .wrap { padding-inline: 0; }
  html.is-phone .profile-cover { aspect-ratio: 16 / 9; max-height: none; border-radius: 0; }
  html.is-phone .profile-cover::after { content: ''; position: absolute; inset: 55% 0 0; pointer-events: none; background: linear-gradient(to top, rgba(26,21,18,.55), rgba(26,21,18,0)); }
  html.is-phone .profile-cover.is-default::after { opacity: 1; height: auto; }
  html.is-phone .sfm-cover-btn { position: absolute; z-index: 2; top: calc(12px * var(--u)); left: calc(12px * var(--u)); display: inline-flex; gap: calc(6px * var(--u)); align-items: center; padding: calc(7px * var(--u)) calc(12px * var(--u)); border-radius: 99px; background: rgba(26,21,18,.72); color: #fff; font-size: calc(12.5px * var(--u)); font-weight: 600; text-decoration: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  html.is-phone .sfm-cover-btn svg { width: calc(16px * var(--u)); height: calc(16px * var(--u)); }
  html.is-phone .profile-id { flex-wrap: nowrap; align-items: flex-start; gap: calc(12px * var(--u)); padding: 0 calc(16px * var(--u)); }
  html.is-phone .profile-avatar { width: calc(84px * var(--u)); height: calc(84px * var(--u)); margin-top: calc(-42px * var(--u)); border-radius: calc(22px * var(--u)); border-width: calc(4px * var(--u)); box-shadow: 0 calc(6px * var(--u)) calc(18px * var(--u)) calc(-6px * var(--u)) rgba(26,21,18,.45); }
  html.is-phone .profile-meta { flex: 1; min-width: 0; padding-top: calc(10px * var(--u)); }
  html.is-phone .profile-meta h1 { font-size: calc(22px * var(--u)); line-height: 1.25; display: flex; align-items: center; gap: calc(6px * var(--u)); }
  html.is-phone .profile-meta h1 .verified { font-size: calc(9px * var(--u)); }
  html.is-phone .sfm-pen { display: grid; place-items: center; width: calc(30px * var(--u)); height: calc(30px * var(--u)); border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); flex: none; }
  html.is-phone .sfm-pen svg { width: calc(15px * var(--u)); height: calc(15px * var(--u)); }
  html.is-phone .profile-stats, html.is-phone .profile-meta .medals, html.is-phone .profile-actions { display: none; }
  html.is-phone .profile-sub { display: flex; gap: calc(4px * var(--u)); align-items: flex-start; margin-top: calc(4px * var(--u)); font-size: calc(12.5px * var(--u)); line-height: 1.5; }
  html.is-phone .profile-sub svg { display: block; width: calc(14px * var(--u)); height: calc(14px * var(--u)); margin-top: calc(3px * var(--u)); }
  html.is-phone .profile-sub span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  /* الأرقام بسطر واحد، والأوسمة بسطر يُسحب، والإجراءات بأيقونات */
  html.is-phone .sfm-nums { margin: calc(16px * var(--u)) calc(16px * var(--u)) 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
  html.is-phone .sfm-nums div { padding: 0 calc(12px * var(--u)); border-inline-start: 1px solid var(--line); }
  html.is-phone .sfm-nums div:first-child { border: 0; padding-inline-start: 0; }
  html.is-phone .sfm-nums dt { font-size: calc(12px * var(--u)); color: var(--muted); }
  html.is-phone .sfm-nums dd { margin: calc(2px * var(--u)) 0 0; font: 700 calc(21px * var(--u))/1.1 var(--display); }
  html.is-phone .sfm-nums dd small { display: block; font: 500 calc(11.5px * var(--u)) var(--font); color: var(--orange-deep); margin-top: calc(2px * var(--u)); }
  html.is-phone .sfm-medals { margin-top: calc(14px * var(--u)); padding: 0 calc(16px * var(--u)); overflow-x: auto; scrollbar-width: none; }
  html.is-phone .sfm-medals::-webkit-scrollbar { display: none; }
  html.is-phone .sfm-medals .medals { flex-wrap: nowrap; margin: 0; zoom: calc(var(--u) * .82); }
  html.is-phone .sfm-qa { display: grid; grid-template-columns: repeat(var(--n), 1fr); margin: calc(16px * var(--u)) calc(8px * var(--u)) calc(4px * var(--u)); }
  html.is-phone .sfm-qa a, html.is-phone .sfm-qa button { display: grid; justify-items: center; gap: calc(6px * var(--u)); padding: calc(4px * var(--u)) 2px calc(8px * var(--u)); border: 0; background: none; color: var(--ink-2); font: 500 calc(12px * var(--u)) var(--font); text-decoration: none; text-align: center; cursor: pointer; }
  html.is-phone .sfm-qa span { width: calc(46px * var(--u)); height: calc(46px * var(--u)); border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); transition: background-color .15s; }
  html.is-phone .sfm-qa svg { width: calc(20px * var(--u)); height: calc(20px * var(--u)); }
  html.is-phone .sfm-qa a:active span, html.is-phone .sfm-qa button:active span { background: var(--orange-soft); color: var(--orange-deep); }
  /* التبويبات بعرض متساوٍ وخط برتقالي تحت المختار */
  html.is-phone .profile-tabs { gap: 0; margin: 0; padding: 0 calc(8px * var(--u)); border-top: 0; border-bottom: 1px solid var(--line); }
  html.is-phone .profile-tabs a { flex: 1; text-align: center; border-radius: 0; font-size: calc(14px * var(--u)); padding: calc(13px * var(--u)) 2px calc(11px * var(--u)); font-weight: 500; }
  html.is-phone .profile-tabs a span { display: none; }
  html.is-phone .profile-tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  html.is-phone .profile-tabs a[aria-current="page"]::after { inset-inline: 0; bottom: -1px; height: calc(3px * var(--u)); border-radius: 0; }
  /* المحتوى: المنتجات مباشرة بلا عمود جانبي (التفاصيل كاملة في تبويب «حول») */
  html.is-phone .profile-body { background: var(--white); padding-top: calc(6px * var(--u)); }
  html.is-phone .profile-grid .profile-side { display: none; }
  html.is-phone .profile-main > .pcard { box-shadow: none; padding: 0; background: none; }
  html.is-phone .profile-main > .pcard > .section-head { display: none; }
  html.is-phone .sfm-teaser { display: flex; align-items: center; gap: calc(12px * var(--ub)); padding: calc(12px * var(--ub)) calc(14px * var(--ub)); margin-bottom: calc(14px * var(--ub)); border-radius: calc(14px * var(--ub)); background: var(--ink); color: #fff; text-decoration: none; }
  html.is-phone .sfm-teaser .t-ico { width: calc(40px * var(--ub)); height: calc(40px * var(--ub)); border-radius: calc(12px * var(--ub)); display: grid; place-items: center; background: var(--orange); color: var(--ink); flex: none; }
  html.is-phone .sfm-teaser svg { width: calc(20px * var(--ub)); height: calc(20px * var(--ub)); }
  html.is-phone .sfm-teaser > svg { margin-inline-start: auto; transform: scaleX(-1); color: var(--orange); }
  html.is-phone .sfm-teaser b { display: block; font: 700 calc(14.5px * var(--ub)) var(--display); }
  html.is-phone .sfm-teaser small { display: block; font-size: calc(12px * var(--ub)); color: rgba(255,255,255,.75); margin-top: 2px; }
  html.is-phone .sfm-chips { display: flex; gap: calc(6px * var(--ub)); overflow-x: auto; scrollbar-width: none; margin-bottom: calc(12px * var(--ub)); }
  html.is-phone .sfm-chips::-webkit-scrollbar { display: none; }
  html.is-phone .sfm-chips button { flex: none; border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: calc(7px * var(--ub)) calc(13px * var(--ub)); font: 500 calc(13px * var(--ub)) var(--font); color: var(--ink-2); cursor: pointer; }
  html.is-phone .sfm-chips b { font: 700 calc(11px * var(--ub)) var(--display); color: var(--muted); margin-inline-start: 2px; }
  html.is-phone .sfm-chips button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
  html.is-phone .sfm-chips button.is-on b { color: var(--orange); }
  html.is-phone [data-cat-grid] > [hidden] { display: none; }
  /* شريط الإجراء أسفل الشاشة: في متناول الإبهام طوال التصفح */
  /* التقييمات و«حول»: تكبير موحّد حتى تصير نصوصهما بحجم بقية التصميم (zoom الجسم 1.32 × 1.6 ≈ 2.1) */
  html.is-phone #ratings, html.is-phone .about-grid { zoom: 1.6; }
  html.is-phone .about-grid { gap: 12px; }
  html.is-phone body:has(.sfm-dock) { padding-bottom: calc(76px * var(--u)); } /* حتى لا يغطي الشريط آخر الذيل */
  /* الخدمات: بطاقة بعرض الشاشة، ونصوص بحجم القراءة */
  html.is-phone .profile-main #services > p { font-size: calc(13.5px * var(--ub)); line-height: 1.7; }
  html.is-phone .svc-grid { grid-template-columns: minmax(0, 1fr); gap: calc(10px * var(--ub)); }
  html.is-phone .svc-card { padding: calc(14px * var(--ub)); border-radius: calc(16px * var(--ub)); background: var(--white); }
  html.is-phone .svc-card h3 { font-size: calc(15.5px * var(--ub)); }
  html.is-phone .svc-card p { font-size: calc(13px * var(--ub)); line-height: 1.65; }
  html.is-phone .svc-kind { font-size: calc(11px * var(--ub)); }
  html.is-phone .svc-foot .btn { font-size: calc(13.5px * var(--ub)); padding: calc(9px * var(--ub)) calc(16px * var(--ub)); }
  html.is-phone .svc-foot, html.is-phone .svc-price { font-size: calc(12.5px * var(--ub)); }
  html.is-phone .sfm-dock { position: fixed; z-index: 30; inset: auto 0 0; display: flex; gap: calc(8px * var(--u)); padding: calc(10px * var(--u)) calc(14px * var(--u)) calc(12px * var(--u) + env(safe-area-inset-bottom)); background: rgba(255,255,255,.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  html.is-phone .sfm-dock form { display: flex; margin: 0; }
  html.is-phone .sfm-dock a, html.is-phone .sfm-dock button { display: inline-flex; align-items: center; justify-content: center; gap: calc(7px * var(--u)); border-radius: calc(14px * var(--u)); font: 700 calc(15px * var(--u)) var(--font); text-decoration: none; cursor: pointer; padding: calc(13px * var(--u)); }
  html.is-phone .sfm-dock svg { width: calc(20px * var(--u)); height: calc(20px * var(--u)); }
  html.is-phone .sfm-dock .d-wa { flex: 1; background: var(--ok); color: #fff; }
  html.is-phone .sfm-dock .d-follow { width: calc(112px * var(--u)); border: 1.5px solid var(--ink); background: var(--white); color: var(--ink); }
  html.is-phone .sfm-dock .d-follow.is-on { background: var(--ink); color: #fff; }
  html.is-phone .sfm-dock .d-main { flex: 1; background: var(--orange); color: var(--ink); }
  html.is-phone .sfm-dock .d-sec { background: var(--surface); color: var(--ink); }
}

/* ---------- البحث: حالة المنتج والخدمات المطابقة (تحسين بطلب مدير المشروع، 22 تشرين الأول) ---------- */
.card-cond { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--ink); color: #fff; padding: 3px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700; }
.tag-cond.cond-used { background: var(--ink); color: #fff; }
.tag-cond.cond-new { background: var(--ok-soft); color: var(--ok); }
fieldset.cond-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.cond-pick legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.svc-hits { margin: 0 0 26px; }
.svc-hits h2 { font-size: 1.25rem; margin-bottom: 12px; }
.svc-hit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.svc-hit { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #FBFAF8; }
.svc-hit h3 { margin: 2px 0 0; font-size: 1.05rem; }
.svc-hit p { margin: 0; }
.svc-hit-store { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; text-decoration: none; font-size: .9rem; }
.svc-hit-store img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.svc-hit-store:hover span { color: var(--orange-deep); }
.toolbar form { flex-wrap: wrap; }
html.is-phone .card-cond { font-size: calc(.6rem * var(--m)); padding: calc(2px * var(--m)) calc(7px * var(--m)); top: 6px; inset-inline-end: 6px; }
html.is-phone .svc-hits h2 { font-size: calc(1.1rem * var(--m)); }
html.is-phone .svc-hit-grid { grid-template-columns: minmax(0, 1fr); }
html.is-phone .svc-hit { font-size: calc(.9rem * var(--m)); padding: calc(12px * var(--m)) calc(14px * var(--m)); border-radius: calc(12px * var(--m)); }
html.is-phone .svc-hit h3 { font-size: calc(1rem * var(--m)); }
html.is-phone .svc-hit .small { font-size: calc(.82rem * var(--m)); }
html.is-phone .svc-hit-store { font-size: calc(.88rem * var(--m)); gap: calc(8px * var(--m)); }
html.is-phone .svc-hit-store img { width: calc(30px * var(--m)); height: calc(30px * var(--m)); }
html.is-phone .svc-hit .svc-kind { font-size: calc(.72rem * var(--m)); }
html.is-phone .svc-hit .btn { font-size: calc(.88rem * var(--m)); padding: calc(7px * var(--m)) calc(14px * var(--m)); }

/* نافذة تثبيت المنصة (PWA) وشريط تفعيل الإشعارات الخارجية: بطاقة منبثقة أسفل الشاشة بهوية المنصة */
.pwa-banner { position: fixed; inset-inline: 0; bottom: 0; z-index: 90; display: flex; justify-content: center; padding: 14px; pointer-events: none; animation: pwaUp .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pwaUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pwa-card { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 460px; width: 100%; background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 16px 40px rgba(26,21,18,.35); border: 1px solid rgba(255,255,255,.08); }
.pwa-card img { width: 42px; height: 42px; border-radius: 10px; flex: none; }
.pwa-card .pwa-txt { flex: 1; min-width: 0; }
.pwa-card .pwa-txt b { display: block; font-size: .95rem; }
.pwa-card .pwa-txt span { display: block; color: #C9C0B3; font-size: .82rem; margin-top: 2px; }
.pwa-card .pwa-actions { display: flex; gap: 8px; flex: none; }
.pwa-card button { font: inherit; cursor: pointer; border-radius: 8px; padding: 8px 14px; font-size: .88rem; font-weight: 700; border: 0; }
.pwa-card .pwa-yes { background: var(--orange); color: var(--ink); }
.pwa-card .pwa-no { background: transparent; color: #C9C0B3; }
@media (max-width: 480px) { .pwa-card { flex-wrap: wrap; } .pwa-card .pwa-actions { width: 100%; justify-content: flex-end; } }
