/* ==========================================================================
   base.css — تنسيقات عناصر HTML الأساسية (Element base styles)
   شركة السرعة المطلقة | Absolute Speed Company
   عناصر HTML فقط — لا فئات (classes). كل القيم من tokens.css.
   متجر عربي RTL — موبايل أولاً.
   يجب تحميل tokens.css قبل هذا الملف.
   ========================================================================== */

/* استيراد خط تجوّل من Google Fonts (Tajawal) */
/* @import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap"); */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('../fonts/subset-DINNextLTArabic-Regular.woff2') format('woff2'),
    url('../fonts/subset-DINNextLTArabic-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* عناوين الأبطال (Zain) — تسجيل الدخول/التسجيل/الرمز */
@font-face {
  font-family: 'Zain Mob Long800';
  src: url('../fonts/zain-mob-long800-Regular.woff2') format('woff2'),
    url('../fonts/zain-mob-long800-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* star-railsaudi-- أيقونة الريال السعودي */
@font-face {
  font-family: "saudi_riyal";
  src: url('../fonts/sar/saudi_riyal.woff2') format('woff2'),
    url('../fonts/sar/saudi_riyal.woff') format('woff'),
    url('../fonts/sar/saudi_riyal.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

.icon-saudi_riyal::before {
  content: "\e900";
  font-family: "saudi_riyal" !important;
  color: inherit;
  font-size: 1em;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* إعادة الضبط (Reset) */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* الجذر (html) */
html {
  font-size: var(--fs-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
  /* يمنع الـ scroll الأفقي الناتج عن الدرج الجانبي المثبّت خارج الشاشة (position:fixed + translateX).
     clip بدل hidden: يمنع التمرير الأفقي دون إنشاء حاوية تمرير تُعطّل position:sticky للأبناء. */
  overflow-x: clip;
}

/* شريط الاسكرول — Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  transition: opacity 0.3s ease;
  opacity: 0.7;
}

::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  box-shadow: 0 0 8px rgba(125, 24, 34, 0.45);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* الجسم (body) */
body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* يمنع الـ scroll الأفقي الناتج عن الدرج الجانبي المخفي خارج الشاشة (translateX).
     clip بدل hidden — يحافظ على عمل position:sticky (لا حاوية تمرير). */
  overflow-x: clip;
}

/* العناوين (Headings) */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--lh-tight);
  margin-bottom: var(--space-16);
}

h1,
h2 {
  font-weight: var(--fw-black);
}

h3,
h4,
h5,
h6 {
  font-weight: var(--fw-bold);
}

h1 {
  font-size: var(--fs-hero);
}

h2 {
  font-size: var(--fs-4xl);
}

h3 {
  font-size: var(--fs-3xl);
}

h4 {
  font-size: var(--fs-2xl);
}

h5 {
  font-size: var(--fs-xl);
}

h6 {
  font-size: var(--fs-lg);
}

/* عنوان الصفحة (Page title) — الـ <h1> الافتراضي أعلاه (fs-hero + fw-black)
   مقصود لعناوين هيرو كبيرة، وليس عنوان صفحة داخلية عادي (السلة/الدفع/
   حسابي/الصفحات الثابتة). page.php يطبّق هذا الكلاس على كل صفحة موحّدًا،
   بدل ما كل صفحة تعرّف نسخة خاصة بيها فتتوه (زي .cart__title/.checkout__title
   السابقين، اللي كانا يكرّرا نفس القيم بالظبط). */
.page-title {
  margin-block-end: var(--space-24);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  text-align: start; /* start = يمين في RTL */
}
@media (min-width: 768px) {
  .page-title {
    font-size: var(--fs-3xl);
  }
}

/* الفقرات (Paragraphs) */
p {
  line-height: var(--lh-base);
  margin-bottom: var(--space-16);
}

/* الروابط (Links) */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

/* القوائم (Lists) */
ul,
ol {
  list-style: none;
}

/* الوسائط (Media) */
img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* عناصر النماذج (Form elements normalization) */
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* الجداول (Tables) */
table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: start;
}

/* تنسيقات نصية عامة (Text-level) */
strong,
b {
  font-weight: var(--fw-bold);
}

small {
  font-size: var(--fs-2xs);
}

/* الفاصل الأفقي (Horizontal rule) */
hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
}

/* العناصر الزائفة (Pseudo-elements) */
::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-text-invert);
}

:focus {
  outline: none;
}

/* مساعدات تخطيط — Utility */
.p-0 {
  padding: 0 !important;
}