/* Strategy X Shop — نظيف، RTL، بدون اعتماد على styles.css الضخم */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap");

:root {
  --bg-deep: #0b1120;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --danger: #f87171;
  --nav-h: 64px;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-family: "Cairo", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(34, 197, 94, 0.12), transparent),
    radial-gradient(800px 400px at 90% 0%, rgba(59, 130, 246, 0.1), transparent),
    linear-gradient(180deg, #0f172a 0%, var(--bg-deep) 45%, #020617 100%);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ——— Top bar ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #15803d);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex !important;
  }
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: var(--bg-card);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-cart {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-weight: 700;
  font-size: 0.88rem;
}

.badge-cart span {
  position: absolute;
  top: -6px;
  left: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.92rem;
  transition: transform 0.12s ease, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #052e16;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer a {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-weight: 600;
}

/* ——— Layout ——— */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero {
  display: grid;
  gap: 28px;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 48px;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.25;
}

.hero p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-visual {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.12), rgba(59, 130, 246, 0.08));
  padding: 28px;
  box-shadow: var(--shadow);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.stat-pill {
  flex: 1;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.stat-pill strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent);
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.65rem;
}

.section-sub {
  margin: 0 0 24px;
  color: var(--muted);
}

/* ——— Cards / Grid ——— */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin: 4px 0;
}

.card .desc {
  flex: 1;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ——— Alerts / flashes ——— */
.flash {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.flash-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.flash-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

/* ——— Forms ——— */
.form-card {
  max-width: 440px;
  margin: 0 auto;
}

.label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 16px;
}

.input:focus {
  outline: 2px solid rgba(34, 197, 94, 0.45);
  outline-offset: 0;
}

/* ——— Tables / checkout ——— */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.simple {
  width: 100%;
  border-collapse: collapse;
}

table.simple th,
table.simple td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

table.simple th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.88rem;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 48px;
  background: rgba(2, 6, 23, 0.6);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-inner h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-inner a {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.footer-inner a:hover {
  color: var(--text);
}

.copyright {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 28px;
}

/* ——— Legal prose ——— */
.prose h2 {
  margin-top: 1.5em;
  font-size: 1.1rem;
}

.prose p {
  color: #cbd5e1;
}

.inline-form {
  display: inline;
}

/* ——— دفع بالبطاقة (صفحة checkout) ——— */
.pay-card-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pay-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.pay-field-full {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .pay-form-grid {
    grid-template-columns: 1fr;
  }
}

