:root {
  --brand: #1d9a9c;
  --brand-2: #158385;
  --brand-dark: #0d4f51;
  --accent: #efbe3a;
  --accent-soft: #fcf1d2;
  --cream: #f4f9f9;
  --paper: #ffffff;
  --ink: #15292a;
  --muted: #5f7173;
  --line: #dbe8e8;
  --red: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 79, 81, .12);
  --font: "Tajawal", system-ui, sans-serif;
  --display: "Tajawal", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}
body.lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; cursor: pointer; transition: .2s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-gold { background: var(--accent); color: var(--brand-dark); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Topbar & header */
.topbar { background: var(--brand); color: var(--accent-soft); text-align: center; font-size: 14px; padding: 8px 16px; }
.topbar b { color: var(--accent); letter-spacing: 1px; }
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 246, 238, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.logo-mark { width: 54px; height: auto; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 22px; font-weight: 800; color: var(--brand); }
.logo-text small { font-size: 10px; font-weight: 700; letter-spacing: 2.5px; color: var(--brand); opacity: .75; direction: ltr; text-align: right; }
.search { flex: 1; display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search input { flex: 1; border: 0; padding: 12px 20px; outline: none; background: transparent; min-width: 0; }
.search button { border: 0; background: transparent; padding: 0 16px; color: var(--brand); cursor: pointer; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--brand); cursor: pointer; transition: .2s;
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn svg { display: block; margin: auto; }
.badge {
  position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--brand-dark); font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}
.badge.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.4); } }

/* Hero */
.hero { background: radial-gradient(circle at 15% 50%, #e3f4f4 0, transparent 50%), var(--cream); padding: 64px 0 40px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--brand-dark); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.35; margin: 18px 0; color: var(--brand-dark); position: relative; z-index: 0; }
.hero h1 span {
  color: var(--brand);
  background: linear-gradient(transparent 64%, rgba(239, 190, 58, .5) 64%, rgba(239, 190, 58, .5) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero p { color: var(--muted); font-size: 18px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; margin: 28px 0; flex-wrap: wrap; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 36px; }
.hero-stats b { display: block; font-size: 24px; color: var(--brand); }
.hero-stats span { color: var(--muted); font-size: 14px; }
.hero-books { position: relative; height: 400px; }
.hero-books .cover { position: absolute; width: 190px; box-shadow: 0 25px 50px rgba(0,0,0,.25); transition: .5s; }
.hero-books .cover:nth-child(1) { right: 4%; top: 40px; transform: rotate(8deg); }
.hero-books .cover:nth-child(2) { right: calc(50% - 95px); top: 0; z-index: 2; transform: rotate(-3deg); }
.hero-books .cover:nth-child(3) { left: 4%; top: 60px; transform: rotate(-11deg); }
.hero-books:hover .cover:nth-child(1) { transform: rotate(12deg) translateX(-10px); }
.hero-books:hover .cover:nth-child(3) { transform: rotate(-15deg) translateX(10px); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -10px; }
.feature { display: flex; gap: 14px; align-items: center; background: var(--paper); padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); }
.feature span { font-size: 28px; }
.feature b { display: block; color: var(--brand); }
.feature small { color: var(--muted); }

/* Sections */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-size: 34px; margin: 0; color: var(--brand); }
.section-head p { margin: 0; color: var(--muted); }

/* Book cover (generated) */
.cover {
  aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 18px 16px 16px;
  color: #fff; text-align: center; box-shadow: inset -8px 0 12px rgba(0,0,0,.18);
}
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: rgba(0,0,0,.18); }
.cover::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; pointer-events: none; }
.cover .c-orn { font-size: 26px; opacity: .85; }
.cover .c-title { font-family: var(--display); font-size: 1.35em; line-height: 1.35; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.cover .c-author { font-size: .8em; opacity: .9; }

/* Grid & cards */
.toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  cursor: pointer; font-weight: 500; transition: .2s;
}
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.toolbar-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.price-filter { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.price-filter input { accent-color: var(--brand); width: 170px; }
select { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line);
  padding: 14px; display: flex; flex-direction: column; transition: .25s; position: relative;
  animation: fadeUp .4s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .cover { cursor: pointer; font-size: 14px; transition: .3s; }
.card:hover .cover { transform: scale(1.02); }
.card-tag {
  position: absolute; top: 22px; right: 22px; z-index: 2; background: var(--red); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.card-tag.new { background: var(--accent); color: var(--brand-dark); }
.fav-btn {
  position: absolute; top: 20px; left: 20px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 17px; color: #bbb; transition: .2s;
}
.fav-btn.on { color: var(--red); }
.fav-btn:hover { transform: scale(1.1); }
.card-body { padding-top: 12px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: 12px; color: var(--brand-2); font-weight: 700; }
.card-title { font-weight: 800; margin: 2px 0; font-size: 16px; cursor: pointer; }
.card-title:hover { color: var(--brand-2); }
.card-author { color: var(--muted); font-size: 14px; }
.rating { color: var(--accent); font-size: 14px; margin: 4px 0; }
.rating small { color: var(--muted); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.price { font-weight: 800; color: var(--brand); font-size: 18px; }
.price del { color: var(--muted); font-weight: 400; font-size: 13px; margin-inline-start: 6px; }
.add-btn {
  border: 0; background: var(--brand); color: #fff; border-radius: 10px; padding: 9px 14px;
  cursor: pointer; font-weight: 700; transition: .2s; white-space: nowrap;
}
.add-btn:hover { background: var(--brand-dark); }
.add-btn:disabled { background: #cfdcdc; color: var(--muted); cursor: not-allowed; }
.add-btn.added { background: var(--accent); color: var(--brand-dark); }

.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 230px); gap: 22px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.carousel .card { scroll-snap-align: start; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }

.loading { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px; }
.empty { text-align: center; padding: 48px; color: var(--muted); font-size: 18px; }

/* Newsletter & footer */
.newsletter { background: var(--brand); color: #fff; margin-top: 72px; padding: 48px 0; }
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.newsletter h2 { font-family: var(--display); color: var(--accent); margin: 0; font-size: 32px; }
.newsletter p { margin: 4px 0 0; opacity: .85; }
.newsletter-form { display: flex; gap: 8px; flex: 1; max-width: 460px; }
.newsletter-form input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; border: 0; outline: none; }
.footer { background: #0a3d3f; color: #cfe3e3; padding: 48px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer .logo-text strong, .footer .logo-text small { color: #fff; }
.footer .logo-mark .sq { fill: #3cc1c3; }
.footer h4 { color: #fff; margin: 0 0 12px; }
.footer-grid a:not(.logo) { display: block; margin-bottom: 8px; opacity: .8; }
.footer-grid a:hover { opacity: 1; color: var(--accent); }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; font-size: 14px; opacity: .7; text-align: center; }

/* Drawer */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(420px, 100%); background: var(--paper); z-index: 60;
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s ease;
  box-shadow: 10px 0 40px rgba(0,0,0,.15);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; color: var(--brand); }
.close-btn { border: 0; background: var(--cream); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); background: var(--cream); }
.line-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.line-item .cover { padding: 6px; font-size: 6px; }
.line-item .cover .c-orn, .line-item .cover .c-author { display: none; }
.line-item h5 { margin: 0; font-size: 15px; }
.line-item small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 6px; }
.qty button { border: 0; background: none; width: 30px; height: 30px; cursor: pointer; font-size: 16px; color: var(--brand); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.remove { border: 0; background: none; color: var(--red); cursor: pointer; font-size: 13px; }
.line-total { text-align: left; font-weight: 800; color: var(--brand); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); }
.summary-row.total { color: var(--ink); font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.summary-row.discount { color: #2a8a57; }
.coupon { display: flex; gap: 8px; margin-bottom: 14px; }
.coupon input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.coupon button { padding: 10px 16px; border-radius: 10px; }
.ship-progress { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.ship-bar { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin-top: 6px; }
.ship-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.drawer-empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.drawer-empty div { font-size: 56px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.5); animation: fade .2s; }
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper); border-radius: 20px; width: min(880px, 100%); max-height: 92vh; overflow-y: auto;
  padding: 32px; position: relative; animation: pop .25s;
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.modal-card .close-btn { position: absolute; top: 16px; left: 16px; }
.detail { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.detail .cover { font-size: 17px; box-shadow: var(--shadow); }
.detail h2 { font-family: var(--display); font-size: 32px; margin: 4px 0; color: var(--brand); }
.detail .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.detail .meta div { background: var(--cream); border-radius: 10px; padding: 10px; text-align: center; }
.detail .meta b { display: block; color: var(--brand); }
.detail .meta small { color: var(--muted); }
.detail-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.detail .price { font-size: 28px; }

/* Checkout */
.checkout h2 { font-family: var(--display); color: var(--brand); margin: 0 0 4px; }
.steps { display: flex; gap: 8px; margin: 14px 0 22px; }
.steps span { flex: 1; height: 5px; border-radius: 9px; background: var(--line); }
.steps span.on { background: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; font: inherit;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.field .err { color: var(--red); font-size: 12px; min-height: 0; }
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-option { border: 2px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; font-weight: 700; transition: .2s; }
.pay-option input { display: none; }
.pay-option:has(input:checked) { border-color: var(--brand); background: #eaf6f6; }
.pay-option div { font-size: 24px; }
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.order-box { background: var(--cream); border-radius: 14px; padding: 18px; align-self: start; }
.order-box h4 { margin: 0 0 10px; color: var(--brand); }
.mini-item { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.success { text-align: center; padding: 24px 0; }
.success .check { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; background: #e3f3ea; color: #2a8a57; font-size: 44px; display: grid; place-items: center; animation: pop .4s; }
.success h2 { font-family: var(--display); color: var(--brand); }
.order-id { display: inline-block; background: var(--cream); padding: 8px 18px; border-radius: 10px; font-weight: 800; letter-spacing: 1px; }

/* ===== Educational store additions ===== */
.muted { color: var(--muted); }
.form-error { color: var(--red); font-size: 14px; margin: 6px 0; }
.full { grid-column: 1 / -1; }
.hint { background: var(--accent-soft); color: #7a5600; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.text-btn { border: 1px solid var(--line); background: var(--paper); color: var(--brand-dark); border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.text-btn:hover { border-color: var(--brand); }
.hero-sub { font-size: 18px; }

.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.level-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: .2s; font: inherit;
}
.level-tile span { font-size: 34px; }
.level-tile b { font-size: 18px; color: var(--brand-dark); }
.level-tile small { color: var(--muted); }
.level-tile:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }

.cover-img { padding: 0; background: var(--cream); }
.cover-img::before, .cover-img::after { display: none; }
.cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .c-orn { font-size: .75em; font-weight: 700; }

.modal-card.wide { width: min(980px, 100%); }
.detail { grid-template-columns: 340px 1fr; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main { border-radius: 12px; overflow: hidden; background: var(--cream); }
.gallery-main img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; display: block; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: 0 0 64px; height: 84px; border: 2px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag { background: #e3f4f4; color: var(--brand-2); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.specs div { background: var(--cream); border-radius: 10px; padding: 8px 12px; }
.specs dt { color: var(--muted); font-size: 12px; }
.specs dd { margin: 0; font-weight: 700; }
.specs .ok { color: #1d7a4e; }
.specs .out { color: var(--red); }

.checkout fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.checkout legend { font-weight: 800; color: var(--brand-dark); margin-bottom: 10px; font-size: 16px; }
.field small { font-weight: 400; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt { display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { font-weight: 700; }
.seg-opt small { color: var(--brand-2); font-weight: 700; }
.seg-opt:has(input:checked) { border-color: var(--brand); background: #eaf6f6; }
.seg-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--accent-soft); }
.office-info { font-size: 14px; color: var(--muted); }
.pay-fixed { background: #e2f4ec; color: #1d5e3e; border-radius: 12px; padding: 12px 16px; }
.order-box { position: sticky; top: 0; }

.steps-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps-list li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: s; display: flex; flex-direction: column; gap: 4px; }
.steps-list li::before { content: counter(s); width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.steps-list b { color: var(--brand-dark); }
.steps-list span { color: var(--muted); font-size: 14px; }
.policies { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.policy { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.policy h3 { margin: 0 0 6px; color: var(--brand-dark); font-size: 17px; }
.policy p { margin: 0; color: var(--muted); white-space: pre-line; }

.track-card { background: var(--cream); border-radius: 14px; padding: 16px; margin-top: 16px; }
.status-now { color: var(--brand-dark); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.track-steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.track-steps li { padding-inline-start: 26px; position: relative; color: var(--muted); }
.track-steps li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.track-steps li.done { color: var(--ink); font-weight: 700; }
.track-steps li.done::before { background: var(--brand); border-color: var(--brand); }

.wa-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 45; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: .2s;
}
.wa-fab[hidden] { display: none; }
.wa-fab:hover { transform: scale(1.06); }

@media (max-width: 960px) {
  .levels, .steps-list { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .gallery { max-width: 360px; margin: 0 auto; width: 100%; }
  .order-box { position: static; }
}
@media (max-width: 680px) {
  .text-btn { padding: 9px 12px; font-size: 14px; }
  .policies, .seg { grid-template-columns: 1fr; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-card, .modal-card.wide { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .detail .cover { width: auto; }
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px); z-index: 90;
  background: var(--brand); color: #fff; padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .3s; font-weight: 500; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-books { height: 300px; }
  .hero-books .cover { width: 150px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .header-actions { margin-inline-start: auto; }
  .hero { padding-top: 36px; }
  .hero-stats { gap: 20px; }
  .features { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { padding: 10px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .detail { grid-template-columns: 1fr; }
  .detail .cover { width: 200px; margin: auto; }
  .modal-card { padding: 22px 18px; }
  .form-grid, .pay-options { grid-template-columns: 1fr; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; }
}
