/* Nurse Hacks — book brand palette. Light is default. */
:root, [data-theme="light"] {
  --navy: #0F2851;
  --dusty: #6187AE;
  --teal: #70D6DD;
  --coral: #F59BB5;
  --alert: #F05A63;
  --yellow: #FFF7C6;
  --pastel: #EEF8F8;
  --pastel-pink: #FDECF1;
  --bg: #ffffff;
  --bg-soft: #F7FBFC;
  --text: #0F2851;
  --muted: #4E6A86;
  --card: #ffffff;
  --line: #D5E3EE;
  --header: rgba(255,255,255,.92);
  --footer: #0F2851;
  --footer-text: #E8F7F8;
  --announcement: #0F2851;
  --announcement-text: #fff;
  --shadow: 0 12px 40px rgba(15,40,81,.10);
  --graph: rgba(15,40,81,.06);
  --btn-text: #0F2851;
  --invert: #ffffff;
}
[data-theme="dark"] {
  --bg: #08142B;
  --bg-soft: #0B1A36;
  --text: #E8F4F8;
  --muted: #A9C2D6;
  --card: #0F2042;
  --line: #1C355C;
  --header: rgba(8,20,43,.92);
  --footer: #061022;
  --footer-text: #D7EEF2;
  --announcement: #04101F;
  --announcement-text: #70D6DD;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --graph: rgba(112,214,221,.08);
  --pastel: #12283F;
  --pastel-pink: #2A1C33;
  --yellow: #3D3720;
  --btn-text: #08142B;
  --invert: #0F2042;
  --navy: #E8F4F8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Tajawal", "Cairo", "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: background .25s, color .25s;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--graph) 1px, transparent 1px),
    linear-gradient(90deg, var(--graph) 1px, transparent 1px);
  background-size: 28px 28px;
}
.wrap, header, footer, .drawer, .modal { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }

/* Announcement */
.announce {
  background: var(--announcement);
  color: var(--announcement-text);
  font-size: 14px;
  text-align: center;
  padding: 9px 16px;
  letter-spacing: .02em;
}
/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; gap: 16px;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: #0F2851; color: #70D6DD;
  display: grid; place-items: center; font-family: Cairo, sans-serif;
  font-weight: 800; letter-spacing: -.04em;
  box-shadow: inset 0 0 0 2px #70D6DD;
}
[data-theme="dark"] .brand-mark { background: #70D6DD; color: #08142B; box-shadow: none; }
.brand-name { font-family: Cairo, sans-serif; font-size: 18px; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
nav.desk { display: flex; gap: 16px; margin-inline-start: auto; flex-wrap: wrap; }
nav.desk a { font-weight: 700; font-size: 14px; color: var(--text); opacity: .86; }
nav.desk a:hover { color: #0A8F94; opacity: 1; }
[data-theme="dark"] nav.desk a:hover { color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: 8px; }
.icon-btn, .toggle-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px;
}
.icon-btn { width: 40px; justify-content: center; padding: 0; position: relative; }
.icon-btn .badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  background: var(--alert); color: #fff; border-radius: 99px;
  font-size: 10px; min-width: 16px; height: 16px; display: grid; place-items: center;
}
.menu-btn { display: none; }
.mobile-nav {
  display: none; flex-direction: column; gap: 10px;
  padding: 8px 16px 16px; border-top: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-weight: 700; }

/* Hero */
.hero {
  padding: 56px 0 28px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.kicker {
  display: inline-block; background: var(--yellow); color: #0F2851;
  font-weight: 800; font-size: 13px; border-radius: 999px; padding: 4px 12px;
}
.hero h1 {
  font-family: Cairo, sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12; margin: 12px 0 8px; letter-spacing: -.03em;
}
.hero h1 em { font-style: normal; color: #1AA7B0; }
[data-theme="dark"] .hero h1 em { color: var(--teal); }
.sub { font-size: 18px; color: var(--muted); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font-weight: 800; border: 2px solid transparent;
  cursor: pointer; transition: .15s transform, .15s background;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #0F2851; color: #fff; }
[data-theme="dark"] .btn-primary { background: var(--teal); color: #08142B; }
.btn-ghost { background: transparent; border-color: var(--dusty); color: var(--text); }
.btn-coral { background: var(--coral); color: #0F2851; }
.btn-teal { background: var(--teal); color: #0F2851; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 10px; text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 20px; font-family: Cairo, sans-serif; }
.stat span { font-size: 12px; color: var(--muted); }
.cover-wrap {
  background: linear-gradient(180deg, var(--pastel), var(--card));
  border: 1px solid var(--line); border-radius: 28px; padding: 22px;
  box-shadow: var(--shadow);
}
.cover-wrap img {
  margin: 0 auto; width: min(360px, 100%); border-radius: 6px;
  box-shadow: 0 18px 50px rgba(15,40,81,.25);
}

/* Sections */
section { padding: 56px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
h2 { font-family: Cairo, sans-serif; font-size: clamp(26px, 3vw, 36px); margin: 0 0 8px; letter-spacing: -.02em; }
.lede { color: var(--muted); margin: 0; }
.product {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow);
}
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  border: 2px solid var(--line); background: var(--bg); color: var(--text);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: 14px;
}
.chip.active { border-color: #0F2851; background: #0F2851; color: #fff; }
[data-theme="dark"] .chip.active { border-color: var(--teal); background: var(--teal); color: #08142B; }
.price { font-size: 32px; font-weight: 800; font-family: Cairo, sans-serif; margin: 8px 0; }
.price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.toc details {
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--bg-soft); margin: 8px 0;
}
.toc summary { cursor: pointer; font-weight: 800; }
.toc-body { color: var(--muted); font-size: 14px; padding-top: 6px; }
.styles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.style-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; text-align: center; font-weight: 800; box-shadow: var(--shadow);
}
.style-card span { display: block; font-size: 28px; margin-bottom: 6px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.book-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.book-card .thumb { height: 230px; background: var(--pastel); display: grid; place-items: center; overflow: hidden; }
.book-card .thumb img { height: 100%; width: auto; object-fit: contain; }
.book-card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag { display: inline-block; background: var(--yellow); color: #0F2851; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 8px; }
.tag.soon { background: var(--pastel-pink); }
.about, .free, .faq, .contact, .legal {
  background: var(--bg-soft); border-radius: 0;
}
.about-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow);
}
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.field span { font-weight: 700; font-size: 14px; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--bg); color: var(--text);
}
.form-ok { color: #1b7a4a; font-weight: 700; }
[data-theme="dark"] .form-ok { color: #70D6DD; }

footer {
  background: var(--footer); color: var(--footer-text); padding: 40px 0 24px; margin-top: 20px;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
footer a { color: var(--footer-text); opacity: .85; display: block; margin: 6px 0; }
.legal-mini { opacity: .7; font-size: 13px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; }

/* Drawer + modal */
.overlay { position: fixed; inset: 0; background: rgba(8,20,43,.45); z-index: 70; display: none; }
.overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%);
  background: var(--card); color: var(--text); z-index: 80; transform: translateX(110%);
  transition: transform .25s ease; box-shadow: var(--shadow); padding: 20px; overflow: auto;
}
html[dir="rtl"] .drawer { transform: translateX(-110%); }
.drawer.open, html[dir="rtl"] .drawer.open { transform: none; }
.modal {
  position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px;
  background: rgba(8,20,43,.55);
}
.modal.open { display: grid; }
.modal-card {
  width: min(920px, 100%); background: var(--card); color: var(--text);
  border-radius: 20px; padding: 16px; max-height: 90vh; overflow: auto;
}
.look-imgs { display: grid; grid-template-columns: 1fr; gap: 12px; }
.look-imgs img { border-radius: 10px; border: 1px solid var(--line); }
.cart-item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; gap: 8px; align-items: center; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress > span { display: block; height: 100%; background: var(--teal); width: 0; }

.notice {
  background: var(--yellow); color: #0F2851; border-radius: 14px; padding: 12px 14px; margin: 10px 0; font-weight: 700;
}
.page { display: none; padding: 36px 0 20px; }
.page.active { display: block; }

@media (max-width: 900px) {
  nav.desk { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-grid, .product, .about-grid, .contact-grid, .grid, .styles, .stats, .foot-grid {
    grid-template-columns: 1fr;
  }
  .stats { grid-template-columns: 1fr 1fr; }
  .header-row { min-height: 64px; }
}
