/* ============================================================
   ًں§± main.css â€” ط§ظ„طھط®ط·ظٹط· ظˆط§ظ„ظ…ظƒظˆظ†ط§طھ ط§ظ„ط£ط³ط§ط³ظٹط©
   ULTRAS STORE  |  RTL  |  Mobile-first
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- 2. ط£ط¯ظˆط§طھ ط§ظ„طھط®ط·ظٹط· (Layout helpers) ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-inline-start: var(--space-md);
}

.section-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 1.1em;
  background: var(--primary-color);
  border-radius: var(--radius-pill);
}

.text-muted {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. ط§ظ„ط£ط²ط±ط§ط± (Buttons) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7em 1.4em;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform var(--transition-fast), filter var(--transition-fast),
    background-color var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-ghost {
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-surface-2);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.9em 2em;
  font-size: 1.05rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-pill);
  position: relative;
}

.btn-icon:hover {
  background: var(--bg-surface-2);
}

/* ط´ط§ط±ط© ط§ظ„ط¹ط¯ظ‘ط§ط¯ (ظ„ظ„ط³ظ„ط©/ط§ظ„ط£ظ…ظ†ظٹط§طھ) */
.count-badge {
  position: absolute;
  top: -2px;
  inset-inline-start: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--primary-color);
  color: var(--primary-contrast);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ---------- 4. ط§ظ„ظ‡ظٹط¯ط± (Header) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.brand__logo {
  height: 42px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand__name b {
  color: var(--primary-color);
}

/* ط´ط±ظٹط· ط§ظ„ط¨ط­ط« ظپظٹ ط§ظ„ظ‡ظٹط¯ط± */
.header-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.45em 1em;
}

.header-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-inline-start: auto;
}

/* ظ…ط¨ط¯ظ‘ظ„ ط§ظ„ظ†ط§ط¯ظٹ (Club switcher) */
.club-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.3em 0.4em 0.3em 0.9em;
}

.club-switcher label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.club-switcher select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.35em 0.8em;
  outline: none;
  cursor: pointer;
  max-width: 160px;
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4rem, 10vw, 8rem);
  background: 
    linear-gradient(to right, rgba(14, 15, 17, 0.95) 0%, rgba(14, 15, 17, 0.4) 100%),
    url('../design/hero_bg_ai.jpg') center/cover no-repeat;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero__content {
  max-width: 620px;
  position: relative;
  z-index: 2;
}

.hero h1, .hero p {
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero__title span {
  color: var(--primary-color);
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ---------- 6. ط´ط±ظٹط· ط§ظ„ظ…ظٹط²ط§طھ (Trust bar) ---------- */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  padding-block: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.trust-item__icon {
  font-size: 1.6rem;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--primary-color);
}

.trust-item h4 {
  font-size: 0.95rem;
}

.trust-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- 7. ط§ظ„ظپظˆطھط± (Footer) ---------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding-block: var(--space-2xl) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-col p,
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- 8. Toast (ط¥ط´ط¹ط§ط±ط§طھ) ---------- */
.toast-stack {
  position: fixed;
  bottom: var(--space-lg);
  inset-inline-start: var(--space-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-inline-start: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 0.8em 1.2em;
  box-shadow: var(--shadow-md);
  min-width: 240px;
  max-width: 340px;
  font-size: 0.9rem;
  animation: toast-in 0.3s ease;
}

.toast--success {
  border-inline-start-color: var(--success);
}
.toast--error {
  border-inline-start-color: var(--danger);
}
.toast--info {
  border-inline-start-color: var(--info);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 9. ط§ظ„طھط¬ط§ظˆط¨ (Responsive) ---------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-search {
    display: none;
  }
  .club-switcher label {
    display: none;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 64px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand__name { display: none; } }

/* ---------- 10. Drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity var(--transition-base); backdrop-filter: blur(4px); }
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; right: -300px; width: 280px; background: var(--bg-surface); z-index: 1001; box-shadow: var(--shadow-lg); transition: right var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.drawer.is-open { right: 0; }
.drawer__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg); border-bottom: 1px solid var(--border-color); }
.drawer__content { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); overflow-y: auto; }
.drawer__item { display: flex; flex-direction: column; gap: var(--space-sm); }
.drawer__item label { font-weight: bold; color: var(--text-muted); font-size: 0.9rem; }
.club-switcher { flex-direction: column; align-items: flex-start; background: none; border: none; padding: 0; }
.club-switcher select { width: 100%; max-width: none; background: var(--bg-surface-2); padding: 0.8em; font-weight: bold; }


