/* ============================================================
   edexcelbooks.com — Full Design System
   ============================================================ */

:root {
  --color-ial:       #9D00FF;
  --color-igcse:     #3B82F6;
  --color-iprimary:  #EF4444;
  --color-ilower:    #22C55E;
  --color-textbooks: #F59E0B;
  --color-cta:       #FACC15;
  --color-cta-text:  #1A1A2E;
  --color-brand:     #9D00FF;
  --bg-base:         #FFFFFF;
  --bg-subtle:       #F8F7FF;
  --bg-card:         #FFFFFF;
  --bg-muted:        #F3F4F6;
  --text-primary:    #0F0A1E;
  --text-secondary:  #4B5563;
  --text-muted:      #9CA3AF;
  --border:          #E5E7EB;
  --border-strong:   #D1D5DB;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;
  --shadow-card:  0 2px 8px rgba(157,0,255,0.08);
  --shadow-hover: 0 8px 24px rgba(157,0,255,0.16);
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-serif:   'Libre Baskerville', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text-primary); background: var(--bg-subtle); }
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1 { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.2; }
h2 { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.25; }
h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.3; }

/* NAV */
.site-nav { position: sticky; top: 0; z-index: 100; height: 64px; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { height: 64px; display: flex; align-items: center; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon { height: 32px; width: auto; }
.nav-logo-text { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }
.nav-logo-accent { color: var(--color-brand); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin-left: auto; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 6px 12px; border-radius: var(--radius-sm); transition: color 0.15s, background 0.15s; }
.nav-links a:hover { color: var(--color-brand); background: rgba(157,0,255,0.06); }
.btn-cta { background: var(--color-cta); color: var(--color-cta-text); font-family: var(--font-display); font-size: 15px; font-weight: 600; padding: 10px 20px; border-radius: var(--radius-pill); text-decoration: none; white-space: nowrap; transition: opacity 0.15s; margin-left: 8px; }
.btn-cta:hover { opacity: 0.88; }

/* HERO */
.hero { background: var(--bg-subtle); padding: 64px 0 0; }
.hero-top { padding-bottom: 40px; }
.hero h1 { font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px; white-space: nowrap; }
.hero h1 span { color: var(--color-brand); }
.hero-sub { font-size: 17px; color: var(--text-secondary); max-width: 860px; margin-bottom: 32px; line-height: 1.5; }
.btn-primary { background: var(--color-cta); color: var(--color-cta-text); font-family: var(--font-display); font-size: 18px; font-weight: 600; padding: 14px 28px; border-radius: var(--radius-pill); text-decoration: none; transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary { background: transparent; color: var(--color-brand); border: 2px solid var(--color-brand); font-family: var(--font-display); font-size: 18px; font-weight: 600; padding: 12px 28px; border-radius: var(--radius-pill); text-decoration: none; transition: all 0.15s; }
.btn-secondary:hover { background: var(--color-brand); color: #fff; }

/* Hero section pills */
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 0; }
.hero-pill { display: inline-block; font-size: 14px; font-weight: 700; padding: 9px 18px; border-radius: var(--radius-pill); text-decoration: none; border: 2px solid transparent; transition: all 0.18s; }
.hero-pill-ial     { background: var(--color-ial);       color: #fff; }
.hero-pill-ial:hover { opacity: 0.85; }
.hero-pill-igcse   { background: var(--color-igcse);     color: #fff; }
.hero-pill-igcse:hover { opacity: 0.85; }
.hero-pill-primary  { background: #EF4444; color: #fff; }
.hero-pill-primary:hover  { opacity: 0.85; }
.hero-pill-ilower   { background: #22C55E; color: #fff; }
.hero-pill-ilower:hover   { opacity: 0.85; }
.hero-pill-ial-tb   { background: #F97316; color: #fff; }
.hero-pill-ial-tb:hover   { opacity: 0.85; }
.hero-pill-igcse-tb { background: #06B6D4; color: #fff; }
.hero-pill-igcse-tb:hover { opacity: 0.85; }
.hero-pill-local    { background: #7C3AED; color: #fff; }
.hero-pill-local:hover    { opacity: 0.85; }

/* HERO BESTSELLER CARDS — 4 across desktop, 2x2 mobile */
.hero-cards-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 32px 0 48px; }
.hero-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; display: block; text-decoration: none; color: inherit; }
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.hero-card-top-pick-glow { box-shadow: 0 0 0 2px #FACC15, 0 8px 32px rgba(250,204,21,0.25); }
.hero-card-img-sq { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-muted); }
.hero-card-img-sq img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s; }
.hero-card:hover .hero-card-img-sq img { transform: scale(1.04); }
.hero-card-caption { padding: 12px 12px 14px; background: var(--bg-card); display: flex; flex-direction: column; gap: 8px; }
.hero-card-toppick   { position: absolute; top: 10px; left: 10px; background: #FACC15; color: #1A1A2E; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); z-index: 2; }
.hero-card-bestseller { position: absolute; top: 10px; left: 10px; background: #0F0A1E; color: #FACC15; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); z-index: 2; }
.hero-card-level { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; width: fit-content; }
.hero-card-level-iprimary { background: rgba(239,68,68,0.12); color: #EF4444; }
.hero-card-level-ilower    { background: rgba(34,197,94,0.12);  color: #22C55E; }
.hero-card-level-igcse     { background: rgba(59,130,246,0.12); color: #3B82F6; }
.hero-card-level-textbook  { background: rgba(245,158,11,0.12); color: #F59E0B; }
.hero-card-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin: 0; }
.hero-card-cta { display: block; background: var(--color-cta); color: var(--color-cta-text); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: var(--radius-pill); text-align: center; }
@media (max-width: 768px) {
  .hero-cards-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 0 32px; }
}

/* PRODUCT CARD IMAGE — square top half shows cover; solid caption section below */
.card-img-wrap { overflow: hidden; background: var(--bg-muted); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card-img-wrap .card-img-sq { aspect-ratio: 1/1; overflow: hidden; }
.card-img-wrap .card-img-sq img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s; display: block; }
.product-card:hover .card-img-sq img { transform: scale(1.04); }
.card-img-caption { padding: 12px 12px 14px; background: var(--bg-card); display: flex; flex-direction: column; gap: 8px; }
.card-img-caption .card-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin: 0; display: block; }
.card-img-caption .btn-buy-sm { display: block; background: var(--color-cta); color: var(--color-cta-text); font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: var(--radius-pill); text-align: center; text-decoration: none; }
.card-img-caption .btn-buy-sm:hover { opacity: 0.85; }
.isbn-chip { display: inline-block; font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; font-family: monospace; }
.author-chip { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }

/* SECTION HEADERS */
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--color-brand); margin-bottom: 8px; }
.preview-section { padding: 64px 0; }
.section-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.section-header h2 { margin: 0; }
.view-all-link { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--color-brand); text-decoration: none; white-space: nowrap; }
.view-all-link:hover { text-decoration: underline; }

/* LEVEL BADGES */
.level-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.level-ial      { background: rgba(157,0,255,0.12); color: #9D00FF; }
.level-igcse    { background: rgba(59,130,246,0.12); color: #3B82F6; }
.level-iprimary { background: rgba(239,68,68,0.12);  color: #EF4444; }
.level-ilower   { background: rgba(34,197,94,0.12);  color: #22C55E; }

/* PRODUCT CARDS */
.product-grid { display: grid; gap: 24px; }
.product-grid-4 { grid-template-columns: repeat(4, 1fr); }
.product-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img-link { display: block; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-muted); }
.card-img-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-img-link:hover img { transform: scale(1.04); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0; }
.card-body h3 a { color: var(--text-primary); text-decoration: none; }
.card-body h3 a:hover { color: var(--color-brand); }
.product-type { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.btn-buy { margin-top: auto; display: inline-block; font-size: 13px; font-weight: 700; color: var(--color-cta-text); background: var(--color-cta); padding: 8px 18px; border-radius: var(--radius-pill); text-decoration: none; text-align: center; transition: opacity 0.15s; }
.btn-buy:hover { opacity: 0.85; }

@media (max-width: 1024px) { .product-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .product-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* BESTSELLERS */
.bestsellers-section { padding: 64px 0; background: var(--bg-subtle); }
.bestseller-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.bestseller-card { position: relative; display: flex; flex-direction: row; gap: 24px; align-items: center; background: var(--bg-card); border-radius: var(--radius-xl); padding: 28px; text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow-card); }
.bestseller-card:hover { border-color: var(--color-brand); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(157,0,255,0.15); }
.bestseller-card img { width: 120px; height: 160px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; }
.bestseller-info { display: flex; flex-direction: column; gap: 8px; }
.bestseller-info h3 { font-size: 22px; font-weight: 700; margin: 0; }
.bestseller-info p { color: var(--text-secondary); font-size: 14px; margin: 0; }
.bestseller-cta { font-weight: 700; color: var(--color-brand); font-size: 15px; margin-top: 8px; }
.bs-badge { position: absolute; top: 16px; right: 16px; background: #FACC15; color: #000; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
@media (max-width: 768px) {
  .bestseller-grid { grid-template-columns: 1fr; }
  .bestseller-card { flex-direction: column; text-align: center; }
  .bestseller-card img { width: 100px; height: 133px; }
}

/* SHUFFLE SECTION */
.shuffle-section { padding: 64px 0; background: var(--bg-muted); }
.shuffle-btn { margin-left: auto; background: var(--color-brand); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; font-family: var(--font-body); }
.shuffle-btn:hover { opacity: 0.85; }

/* FILTER CHIPS */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-chip { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--radius-pill); padding: 6px 16px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: var(--font-body); }
.filter-chip:hover, .filter-chip.active { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }

/* BROADSHEET / SRI LANKA SECTION */
.broadsheet-section { background: #FFFFFF; padding: 64px 0; border-top: 3px solid #0A0A0A; font-family: 'Libre Baskerville', serif; }
.bs-header { margin-bottom: 40px; }
.bs-eyebrow { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #DC2626; margin-bottom: 12px; }
.broadsheet-section h2 { font-family: 'Libre Baskerville', serif; font-size: 30px; font-weight: 700; color: #0A0A0A; margin: 0 0 12px; }
.bs-intro { font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.7; color: #4B5563; max-width: 640px; margin: 0; }
.bs-rule { border: none; border-top: 1px solid #0A0A0A; margin: 16px 0; }
.bs-grid { display: grid; gap: 24px; }
.bs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.bs-grid-4 { grid-template-columns: repeat(4, 1fr); }
.bs-card { background: #FFFFFF; border: 1px solid #E5E7EB; border-top: 4px solid #0A0A0A; border-radius: 0; padding: 20px; }
.bs-card:hover { background: #F9FAFB; }
.bs-card-featured { border-top-color: #DC2626; }
.bs-card-eyebrow { font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #DC2626; margin-bottom: 4px; }
.broadsheet-section h3 { font-family: 'Libre Baskerville', serif; font-size: 18px; font-weight: 700; color: #0A0A0A; margin: 8px 0 10px; }
.bs-card p { font-family: 'Source Serif 4', serif; font-size: 14px; line-height: 1.6; color: #4B5563; margin: 0 0 12px; }
.bs-sources { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.bs-link { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: #DC2626; text-decoration: none; border-bottom: 1px solid #DC2626; padding-bottom: 1px; display: inline-block; width: fit-content; }
.bs-link:hover { color: #0A0A0A; border-bottom-color: #0A0A0A; }
.bs-term-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.bs-term-link { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: #0A0A0A; text-decoration: none; border: 1px solid #0A0A0A; padding: 6px 14px; border-radius: 0; transition: all 0.15s; }
.bs-term-link:hover { background: #0A0A0A; color: #FFFFFF; }
.bs-footer-link { margin-top: 32px; text-align: center; }
.bs-view-all { font-family: 'Libre Baskerville', serif; font-size: 16px; font-weight: 700; color: #0A0A0A; text-decoration: none; border-bottom: 2px solid #0A0A0A; padding-bottom: 3px; }
.bs-view-all:hover { color: #DC2626; border-bottom-color: #DC2626; }
.bs-section-label { font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #0A0A0A; display: block; margin-bottom: 8px; }
.bs-section-divider { margin: 48px 0 32px; border: none; border-top: 2px solid #0A0A0A; }
.bs-disclaimer { font-family: 'Source Serif 4', serif; font-size: 13px; color: #6B7280; border-top: 1px solid #E5E7EB; margin-top: 48px; padding-top: 24px; line-height: 1.6; }
@media (max-width: 900px) { .bs-grid-3 { grid-template-columns: repeat(2,1fr); } .bs-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .bs-grid-3, .bs-grid-4 { grid-template-columns: 1fr; } }

/* FOOTER */
.site-footer { background: var(--text-primary); color: #fff; padding: 48px 0 32px; }
.footer-inner { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* SUBJECT DETAIL PAGE */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-brand); }
.subject-hero { background: var(--bg-subtle); padding: 48px 0; }
.subject-hero-inner { display: flex; gap: 40px; align-items: flex-start; }
.subject-hero-text { flex: 1; }
.subject-hero-img { width: 180px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-hover); }
.subject-hero-img img { width: 100%; height: auto; }
.cta-block { padding: 32px 0; }
.cta-block a { display: block; background: var(--color-cta); color: var(--color-cta-text); font-family: var(--font-display); font-size: 20px; font-weight: 600; text-align: center; padding: 18px 32px; border-radius: var(--radius-pill); text-decoration: none; max-width: 480px; transition: opacity 0.15s; }
.cta-block a:hover { opacity: 0.88; }
.units-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.units-table th { background: var(--bg-muted); padding: 10px 14px; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); }
.units-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.related-section { padding: 48px 0; }

/* MOBILE NAV */
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; border-radius: 2px; transition: all 0.2s; }
.nav-drawer { display: none; position: fixed; inset: 0; background: #fff; z-index: 200; padding: 24px; flex-direction: column; gap: 16px; }
.nav-drawer.open { display: flex; }
.nav-drawer a { font-size: 18px; font-weight: 500; color: var(--text-primary); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--border); }
.nav-drawer-close { align-self: flex-end; background: none; border: none; font-size: 28px; cursor: pointer; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  h1 { font-size: 32px; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 32px; }
}
