/* WA3Y design system - dark, premium, minimal */
:root {
  --bg: #0b0b0c;
  --bg-2: #141312;
  --bg-3: #1d1b18;
  --ink: #f4eee2;
  --muted: #a89f8c;
  --line: rgba(244, 238, 226, 0.12);
  --accent: #dec896;
  --accent-ink: #141312;
  --danger: #e07856;
  --ok: #9dc08b;
  --radius: 14px;
  --font-ar: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Inter", "Segoe UI", Arial, sans-serif;
  --max: 1180px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-ar);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: var(--font-en); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 12, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.98rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; }
.lang-btn:hover { color: var(--ink); border-color: var(--ink); }
.burger { display: none; background: none; border: 0; color: var(--ink); font-size: 1.5rem; }
@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; inset-inline: 0; top: 68px;
    background: var(--bg-2); flex-direction: column; padding: 18px 22px; gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .burger { display: block; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 30px; font-size: 1rem; font-weight: 700;
  border: 1px solid transparent; transition: transform 0.15s, background 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* hero */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 2%, transparent 45%); }
.hero-in { position: relative; z-index: 2; text-align: center; padding: 90px 22px 120px; }
.kicker { color: var(--accent); letter-spacing: 0.35em; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; line-height: 1.25; }
.hero p.sub { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 560px; margin: 18px auto 30px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* countdown */
.countdown { display: flex; gap: 14px; justify-content: center; margin: 34px 0 6px; direction: ltr; }
.cd-cell { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); min-width: 84px; padding: 14px 10px; }
.cd-cell b { display: block; font-size: 2rem; font-variant-numeric: tabular-nums; }
.cd-cell span { color: var(--muted); font-size: 0.8rem; }
.cd-done { color: var(--accent); font-weight: 700; font-size: 1.2rem; margin-top: 20px; }

/* sections */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-2); }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
.sec-head p { color: var(--muted); max-width: 620px; margin: 12px auto 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.25s, border-color 0.25s; }
.card:hover { transform: translateY(-4px); border-color: rgba(222, 200, 150, 0.45); }
.card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.card .pad { padding: 20px; }
.card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card .price { color: var(--accent); font-weight: 700; }
.chip { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 0.78rem; color: var(--muted); margin: 2px; }

.feature { text-align: center; padding: 30px 22px; }
.feature .ic { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; color: var(--accent); }
.feature h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* empty state */
.empty { text-align: center; padding: 70px 22px; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { font-size: 1.4rem; margin-bottom: 10px; }
.empty p { color: var(--muted); max-width: 480px; margin: 0 auto 22px; }

/* forms */
.form { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; text-align: start; }
.field label { font-size: 0.9rem; color: var(--muted); }
.input, textarea.input, select.input {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 13px 16px; font-size: 1rem; font-family: inherit; width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); }
.consent input { margin-top: 4px; accent-color: var(--accent); }
.form-msg { border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; display: none; }
.form-msg.ok { display: block; background: rgba(157, 192, 139, 0.12); color: var(--ok); border: 1px solid rgba(157, 192, 139, 0.35); }
.form-msg.err { display: block; background: rgba(224, 120, 86, 0.1); color: var(--danger); border: 1px solid rgba(224, 120, 86, 0.35); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 60px 0 34px; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; margin-bottom: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-size: 0.95rem; margin-bottom: 14px; color: var(--ink); }
.foot-grid ul { list-style: none; display: grid; gap: 9px; }
.foot-grid a, .foot-grid li { color: var(--muted); font-size: 0.93rem; }
.foot-grid a:hover { color: var(--ink); }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: 0.2s; }
.socials a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.copy { text-align: center; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 26px; }

/* announcement bar */
.announce { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 0.88rem; font-weight: 700; padding: 8px 16px; }

/* cart drawer */
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(400px, 92vw); background: var(--bg-2); border-inline-start: 1px solid var(--line); z-index: 80; transform: translateX(105%); transition: transform 0.3s; display: flex; flex-direction: column; }
html[dir="rtl"] .drawer { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(105%); border-inline-start: 0; border-inline-end: 1px solid var(--line); }
.drawer.open { transform: translateX(0); }
.drawer header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer .items { flex: 1; overflow: auto; padding: 16px 20px; display: grid; gap: 14px; align-content: start; }
.drawer footer { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; }
.cart-item img { width: 58px; height: 70px; object-fit: cover; border-radius: 8px; }
.cart-item .rm { background: none; border: 0; color: var(--muted); font-size: 1.1rem; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 70; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; color: var(--ink); position: relative; }
.icon-btn .badge { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 0.7rem; min-width: 18px; height: 18px; display: grid; place-items: center; font-weight: 800; }

/* product page */
.pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 46px; align-items: start; }
@media (max-width: 860px) { .pd { grid-template-columns: 1fr; } }
.pd img.main { border-radius: var(--radius); border: 1px solid var(--line); }
.pd h1 { font-size: 2rem; margin-bottom: 8px; }
.pd .price { font-size: 1.5rem; color: var(--accent); font-weight: 800; margin: 10px 0 18px; }
.opt-row { margin: 16px 0; }
.opt-row .lbl { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.opt { border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 10px; padding: 8px 16px; margin-inline-end: 8px; margin-bottom: 8px; }
.opt.sel { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); margin-inline-end: 8px; padding: 0; }
.swatch.sel { border-color: var(--accent); }

/* admin */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-side { background: var(--bg-2); border-inline-end: 1px solid var(--line); padding: 26px 18px; }
.admin-side a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted); margin-bottom: 4px; }
.admin-side a.on, .admin-side a:hover { background: var(--bg-3); color: var(--ink); }
.admin-main { padding: 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 22px 0 34px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { font-size: 1.9rem; display: block; }
.stat span { color: var(--muted); font-size: 0.85rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th, .tbl td { text-align: start; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.tbl img { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.tag { font-size: 0.75rem; border-radius: 999px; padding: 2px 10px; }
.tag.pub { background: rgba(157, 192, 139, 0.15); color: var(--ok); }
.tag.draft { background: rgba(168, 159, 140, 0.15); color: var(--muted); }
.login-box { max-width: 380px; margin: 12vh auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 20px; text-align: center; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* toast */
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); background: var(--bg-3); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 12px 26px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
html[dir="rtl"] .toast { transform: translateX(50%); }
.toast.show { opacity: 1; }

/* very tall screens: keep hero proportionate */
@media (min-height: 1200px) { .hero { min-height: 760px; } }
