:root {
  --re-orange-600: #f05a22;
  --re-orange-700: #d94b15;
  --re-purple-800: #43206b;
  --re-purple-950: #241033;
  --re-ink: #201a24;
  --re-muted: #6d6670;
  --re-canvas: #f7f6f8;
  --re-surface: #fff;
  --re-border: #e7e2e9;
  --re-success: #16835b;
  --re-warning: #a66400;
  --re-danger: #c93642;
  --re-info: #2b5f8a;
  --re-success-bg: #e7f7f0;
  --re-warning-bg: #fff3dc;
  --re-danger-bg: #fdecee;
  --re-info-bg: #e8f1f8;
  --re-radius-sm: 0.6rem;
  --re-radius-md: 1rem;
  --re-radius-lg: 1.5rem;
  --re-shadow: 0 12px 32px rgba(36, 16, 51, 0.08);
  --re-font: Inter, "Noto Sans Arabic", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--re-ink);
  background: var(--re-canvas);
  font: 16px/1.5 var(--re-font);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.03em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: 1.15rem; }

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  border-radius: var(--re-radius-sm);
  background: var(--re-orange-600);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: var(--re-surface);
  border-bottom: 1px solid var(--re-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--re-orange-600), var(--re-purple-800));
}

.nav,
.utility-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-field {
  display: flex;
  flex: 1 1 18rem;
  min-width: min(100%, 16rem);
  align-items: stretch;
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: var(--re-surface);
  overflow: hidden;
}
.search-field input {
  border: 0;
  margin: 0;
  border-radius: 0;
  width: auto;
  flex: 1;
}
.search-field .button {
  border-radius: 0;
  padding-inline: 1.1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-block: 1rem;
  font-weight: 700;
}
.field input,
.field select,
.field textarea,
label > input,
label > select,
label > textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--re-ink);
  background: #fff;
  border: 1px solid var(--re-border);
  border-radius: var(--re-radius-sm);
}
label { display: grid; gap: 0.35rem; margin-block: 1rem; font-weight: 700; }
.choice { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.choice input { width: auto; }

.compact-select {
  min-width: 7.5rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: var(--re-canvas);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 0.8rem;
  padding: 0.72rem 1rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: #fff; background: var(--re-orange-600); }
.button-primary:hover { background: var(--re-orange-700); }
.button-secondary { color: #fff; background: var(--re-purple-800); }
.button-ghost:hover { background: var(--re-canvas); }
.button-secondary:hover { filter: brightness(1.08); }
.icon-button {
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0.4rem;
  border-radius: 999px;
}

.shell { max-width: 1200px; margin: auto; padding: clamp(1.2rem, 4vw, 3rem); }
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: var(--re-radius-lg);
  color: #fff;
  background: linear-gradient(120deg, var(--re-purple-950), var(--re-purple-800));
  box-shadow: var(--re-shadow);
}
.hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3.6rem); }
.eyebrow {
  color: #ffc4a9;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem;
}
.workspace .eyebrow { color: var(--re-orange-600); }

.category-bar {
  display: flex;
  gap: 0.6rem;
  overflow: auto;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--re-surface);
  border-bottom: 1px solid var(--re-border);
}
.category-bar a {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--re-canvas);
  text-decoration: none;
  font-weight: 700;
}
.category-bar a:hover,
.category-bar a:focus-visible { background: color-mix(in srgb, var(--re-orange-600) 16%, white); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--re-surface);
  border: 1px solid var(--re-border);
  border-radius: var(--re-radius-md);
  padding: 1.2rem;
  box-shadow: var(--re-shadow);
}
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--re-muted); }

.product-card { display: grid; gap: 0.7rem; padding: 0.85rem; }
.product-media {
  aspect-ratio: 1.15;
  border-radius: 0.85rem;
  background: linear-gradient(160deg, #fde4d6, #eadcf5);
}
.price { font-weight: 850; color: var(--re-orange-700); }
.price-note { font-size: 0.85rem; }

.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 1rem;
  overflow: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x mandatory;
}
.carousel > * { scroll-snap-align: start; }

.trust-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.promo-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem;
  border-radius: var(--re-radius-lg);
  background: #fff;
  border: 1px solid var(--re-border);
}

.metric { font-size: 2rem; font-weight: 900; color: var(--re-purple-800); }
.kpi-label { margin: 0; font-weight: 700; }

.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  padding: 1.5rem;
  color: #fff;
  background: var(--re-purple-950);
}
.sidebar .brand { color: #fff; }
.sidebar a {
  display: block;
  margin: 0.35rem 0;
  padding: 0.7rem;
  border-radius: 0.65rem;
  text-decoration: none;
}
.sidebar a[aria-current="page"] { background: var(--re-orange-600); color: #fff; }
.workspace { min-width: 0; background: var(--re-canvas); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-success { background: var(--re-success-bg); color: var(--re-success); }
.badge-warning { background: var(--re-warning-bg); color: var(--re-warning); }
.badge-danger { background: var(--re-danger-bg); color: var(--re-danger); }
.badge-info { background: var(--re-info-bg); color: var(--re-info); }
.status { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 99px; background: var(--re-success-bg); color: var(--re-success); font-weight: 700; }

.table-wrap { overflow: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--re-surface);
}
.data-table th,
.data-table td {
  text-align: start;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--re-border);
}
.data-table th { font-size: 0.85rem; color: var(--re-muted); }

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--re-radius-sm);
  background: var(--re-info-bg);
  color: var(--re-info);
}
.empty-state { text-align: center; padding: 2rem 1rem; }
.bars { display: grid; gap: 0.65rem; }
.bar-row { display: grid; grid-template-columns: 6rem 1fr 3rem; gap: 0.6rem; align-items: center; }
.bar-track { height: 0.7rem; background: var(--re-canvas); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--re-orange-600); border-radius: 99px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[data-message][data-error="true"] { color: var(--re-danger); font-weight: 700; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--re-orange-600) 45%, white); outline-offset: 3px; }

.site-footer {
  background: var(--re-purple-950);
  color: #fff;
  margin-top: 2rem;
}
.site-footer a { text-decoration: none; }
.site-footer .muted { color: #d7cfe0; }
.mobile-menu summary { cursor: pointer; font-weight: 750; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }

@media (max-width: 960px) {
  .grid-4, .trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .promo-banner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero, .layout, .grid, .grid-2 { grid-template-columns: 1fr; }
  .sidebar { padding: 0.8rem; }
  .sidebar nav { display: flex; overflow: auto; }
  .sidebar a { white-space: nowrap; }
  .mobile-menu { display: block; }
  .desktop-utilities { display: none; }
  .data-table thead { display: none; }
  .data-table tr {
    display: block;
    margin-bottom: 0.8rem;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius-md);
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 0;
  }
  .data-table td::before { content: attr(data-label); font-weight: 700; color: var(--re-muted); }
}

