/* Notes Bazar 2026 front end. Concept: a student's notebook - ink-blue writing on ruled paper, highlighter for what matters.
   Light, single theme on purpose (it is paper). Bootstrap 5 provides the grid; everything visual is defined here. */
:root {
  --ink: #14306b;          /* fountain-pen blue: headings, header, primary buttons */
  --ink-2: #1f4aa8;
  --text: #1f2633;
  --muted: #5b6475;
  --paper: #fffdf7;        /* page */
  --sheet: #ffffff;        /* cards */
  --rule: #dfe7f6;         /* ruled lines */
  --margin: #f08a8a;       /* notebook margin line */
  --mark: #ffe066;         /* highlighter */
  --mark-2: #ffd23f;
  --ok: #1e8e4e;
  --line: #e6e9f2;
  --display: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --body: "Mukta", "Segoe UI", system-ui, sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --r: 16px;
  --shadow: 0 1px 2px rgba(20, 48, 107, .06), 0 8px 24px rgba(20, 48, 107, .08);
  color-scheme: light;
}
html { scroll-behavior: smooth; }
body.nb { background: var(--paper); color: var(--text); font: 17px/1.6 var(--body); margin: 0; }
.nb h1, .nb h2, .nb h3, .nb h4 { font-family: var(--display); color: var(--ink); line-height: 1.15; text-wrap: balance; font-weight: 700; }
.nb a { color: var(--ink-2); }
.nb :focus-visible { outline: 3px solid var(--mark-2); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 16px; }
.mark { background: linear-gradient(transparent 55%, var(--mark) 55%, var(--mark) 92%, transparent 92%); padding: 0 .1em; }
.hand { font-family: var(--hand); color: var(--ink-2); }
.eyebrow { font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #c0392b; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- buttons */
.btn-ink, .btn-mark, .btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font: 700 16px/1 var(--body);
  padding: 13px 22px; border: 2px solid transparent; text-decoration: none !important; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; white-space: nowrap; }
.btn-ink { background: var(--ink); color: #fff !important; }
.btn-ink:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-mark { background: var(--mark-2); color: var(--ink) !important; }
.btn-mark:hover { background: var(--mark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-line { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn-line:hover { background: #eef3ff; }
.btn-sm-nb { padding: 9px 16px; font-size: 15px; }
.btn-ink[disabled], .btn-mark[disabled] { opacity: .6; cursor: default; }

/* ---------- header */
.nb-top { background: var(--ink); color: #dfe8ff; font-size: 14px; }
.nb-top .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; flex-wrap: wrap; }
.nb-top a { color: #fff; text-decoration: none; font-weight: 600; }
.nb-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1030; background: rgba(255, 253, 247, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nb-head .wrap { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.nb-logo img { height: 42px; width: auto; display: block; }
.nb-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nb-nav > a, .nb-nav .dd > button { font: 600 16px/1 var(--body); color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; }
.nb-nav > a:hover, .nb-nav .dd > button:hover { background: #eef3ff; color: var(--ink); }
.nb-nav > a.btn-ink { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; }
.nb-nav > a.btn-ink:hover { background: var(--ink-2); color: #fff; }
.nb-nav .dd { position: relative; }
.nb-nav .dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: none; }
.nb-nav .dd.open .dd-menu { display: block; }
.dd-menu .grp { font: 700 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.dd-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.dd-menu a:hover { background: #f4f7ff; }
.dd-menu a b { color: var(--ink); white-space: nowrap; }
.nb-cart { position: relative; }
.nb-cart .count { position: absolute; top: 0; right: 0; background: #e4572e; color: #fff; font: 700 11px/18px var(--body); min-width: 18px; height: 18px; border-radius: 9px; text-align: center; padding: 0 4px; }
.nb-burger { display: none; margin-left: auto; background: none; border: 0; padding: 10px; font-size: 24px; color: var(--ink); }
@media (max-width: 900px) {
  .nb-burger { display: block; }
  .nb-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nb-head.open .nb-nav { display: flex; }
  .nb-nav .dd-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 6px 8px; min-width: 0; }
  .nb-nav .dd > button { display: none; }
  .nb-nav > a { padding: 12px 8px; }
}

/* ---------- alerts (works with old Bootstrap 4 markup too) */
.nb .alert { border-radius: 12px; border: 0; padding: 12px 16px; margin: 12px 0; }
.nb .alert-success { background: #e7f6ec; color: #155c34; }
.nb .alert-danger { background: #fdecec; color: #8f1d1d; }
.nb .alert-warning { background: #fff6d6; color: #6b4e00; }
.nb .alert .close { display: none; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; background:
    linear-gradient(90deg, transparent 0 56px, var(--margin) 56px 58px, transparent 58px),
    repeating-linear-gradient(var(--paper) 0 35px, var(--rule) 35px 36px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-block: 56px 64px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); margin: 10px 0 14px; }
.hero p.lead-nb { font-size: 20px; color: #39404f; max-width: 34ch; margin: 0 0 22px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--muted); font-size: 15px; }
.hero .facts b { color: var(--ink); font-size: 18px; display: block; font-family: var(--display); }
.hero .note-stack { position: relative; height: 380px; }
.hero .note-stack img { position: absolute; width: 58%; border-radius: 10px; box-shadow: 0 16px 40px rgba(20, 48, 107, .22); background: #fff; border: 6px solid #fff; }
.hero .note-stack img:nth-child(1) { left: 2%; top: 30px; transform: rotate(-8deg); }
.hero .note-stack img:nth-child(2) { left: 22%; top: 0; transform: rotate(2deg); z-index: 2; }
.hero .note-stack img:nth-child(3) { left: 40%; top: 46px; transform: rotate(9deg); }
.hero .sticky { position: absolute; z-index: 3; right: 0; bottom: 6px; background: var(--mark); padding: 14px 16px; transform: rotate(-4deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .12); font-family: var(--hand); font-size: 19px; color: #3a2f00; max-width: 220px; line-height: 1.3; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 36px 40px; } .hero .note-stack { height: 280px; } }
@media (max-width: 1260px) { .hero { background: repeating-linear-gradient(var(--paper) 0 35px, var(--rule) 35px 36px); } }
@media (max-width: 480px) { .hero .note-stack { height: 220px; } .hero .facts { gap: 12px 18px; } }

/* ---------- sections */
.sec { padding-block: 56px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 6px 0 0; }
.sec-head p { color: var(--muted); margin: 6px 0 0; max-width: 60ch; }
.sec.alt { background: #f3f6fd; }

/* class chips */
.chips-nb { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-nb { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--sheet); border: 1.5px solid var(--line); font-weight: 700; color: var(--ink); text-decoration: none; }
.chip-nb:hover, .chip-nb.on { border-color: var(--ink); background: #eef3ff; }
.chip-nb small { color: var(--muted); font-weight: 600; }

/* note pack cards */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.pack { position: relative; display: flex; flex-direction: column; background: var(--sheet); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.pack:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 48, 107, .06), 0 16px 34px rgba(20, 48, 107, .14); }
.pack .cover { position: relative; display: block; aspect-ratio: 4 / 3; background: repeating-linear-gradient(#f7f9ff 0 23px, var(--rule) 23px 24px); }
.pack .cover img { position: absolute; inset: 16px 22%; width: 56%; height: calc(100% - 32px); object-fit: cover; border-radius: 6px; box-shadow: 0 10px 24px rgba(20, 48, 107, .25); transform: rotate(-2deg); }
.pack .off { position: absolute; top: 12px; left: 12px; background: #e4572e; color: #fff; font: 800 14px/1 var(--body); padding: 7px 10px; border-radius: 999px; }
.pack .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack .tag { font-size: 14px; font-weight: 700; color: var(--muted); }
.pack h3 { font-size: 21px; margin: 0; }
.pack h3 a { color: var(--ink); text-decoration: none; }
.pack .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 6px; }
.price .now { font: 800 28px/1 var(--display); color: var(--ink); }
.price .was { color: var(--muted); text-decoration: line-through; font-size: 17px; }
.pack .actions { display: flex; gap: 8px; }
.pack .actions > * { flex: 1; }
.pack .actions form { display: flex; }
.pack .actions form button { flex: 1; }
.stars { color: #f5a623; letter-spacing: 1px; }

/* steps + reasons */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
.step { background: var(--sheet); border-radius: var(--r); padding: 22px; border: 1px solid var(--line); }
.step .n { font: 800 34px/1 var(--display); color: var(--mark-2); -webkit-text-stroke: 1.5px var(--ink); }
.step h3 { font-size: 20px; margin: 10px 0 6px; }
.step p { margin: 0; color: var(--muted); }
.reason { display: flex; gap: 14px; align-items: flex-start; }
.reason i { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #eef3ff; color: var(--ink); display: grid; place-items: center; font-size: 19px; }
.reason h3 { font-size: 19px; margin: 0 0 4px; }
.reason p { margin: 0; color: var(--muted); font-size: 16px; }

/* sample peek */
.peek { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
.peek .paper { background: var(--sheet); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; transform: rotate(-1.5deg); }
.peek .paper img { width: 100%; border-radius: 6px; display: block; }
@media (max-width: 860px) { .peek { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font: 700 18px/1.3 var(--display); color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--ink-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: #3d4556; }

/* CTA band */
.band { background: var(--ink); color: #e4ebff; border-radius: 22px; padding: 34px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); }
.band p { margin: 0; }

/* ---------- note (product) page */
.crumbs { font-size: 14px; color: var(--muted); padding-block: 14px 0; }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 380px 1fr; gap: 40px; padding-block: 20px 40px; align-items: start; }
.product .gallery { position: sticky; top: 90px; }
.product .gallery .cover { background: repeating-linear-gradient(#f7f9ff 0 23px, var(--rule) 23px 24px); border-radius: var(--r); padding: 28px; border: 1px solid var(--line); }
.product .gallery img { width: 100%; border-radius: 8px; box-shadow: 0 14px 30px rgba(20, 48, 107, .25); display: block; }
.product h1 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 10px; }
.product .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.product .tags span { background: #eef3ff; color: var(--ink); font-weight: 700; font-size: 14px; padding: 5px 12px; border-radius: 999px; }
.buybox { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); margin: 18px 0; }
.buybox .price .now { font-size: 40px; }
.buybox .save { color: var(--ok); font-weight: 700; }
.buybox .row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.buybox .row-btns form { display: contents; }
.buybox .assure { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.buybox .assure i { color: var(--ok); margin-right: 4px; }
.chapters { counter-reset: ch; list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.chapters li { counter-increment: ch; break-inside: avoid; padding: 8px 0 8px 40px; position: relative; border-bottom: 1px dashed var(--rule); }
.chapters li::before { content: counter(ch, decimal-leading-zero); position: absolute; left: 0; top: 8px; font: 700 15px/1.6 var(--display); color: #c0392b; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } .product .gallery { position: static; max-width: 360px; } .chapters { columns: 1; } }
.features-nb { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.features-nb li { padding-left: 30px; position: relative; }
.features-nb li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800; }
.sample-frame { width: 100%; height: min(78vh, 900px); border: 0; border-radius: 12px; background: #eef1f7; }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: var(--sheet); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); display: none; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -6px 20px rgba(20, 48, 107, .1); }
.buybar .now { font: 800 24px/1 var(--display); color: var(--ink); }
@media (max-width: 900px) { .buybar { display: flex; } body.has-buybar { padding-bottom: 76px; } }

/* ---------- cart */
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; padding-block: 24px 48px; }
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.cart-item img { width: 84px; height: 100px; object-fit: cover; border-radius: 6px; }
.cart-item h3 { font-size: 18px; margin: 0 0 4px; }
.cart-item .rm { color: #b42318; font-size: 14px; font-weight: 700; text-decoration: none; }
.summary-nb { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.summary-nb .line { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-nb .total { border-top: 2px dashed var(--rule); margin-top: 8px; padding-top: 12px; font: 800 24px/1 var(--display); color: var(--ink); }

/* ---------- forms / auth */
.auth { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 40px 16px; background: repeating-linear-gradient(var(--paper) 0 35px, var(--rule) 35px 36px); }
.auth-card { width: 100%; max-width: 460px; background: var(--sheet); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 28px; }
.auth-card h1 { font-size: 32px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 18px; }
.nb .form-label { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.nb .form-control { border-radius: 12px; border: 1.5px solid #cfd6e6; padding: 11px 14px; font-size: 17px; }
.nb .form-control:focus { border-color: var(--ink-2); box-shadow: 0 0 0 4px rgba(31, 74, 168, .14); }
.field { margin-bottom: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 1.5px solid #cfd6e6; border-radius: 999px; padding: 11px; background: #fff; color: var(--text) !important; font-weight: 700; text-decoration: none !important; }
.google-btn:hover { background: #f6f8fc; }
.auth-foot { margin-top: 16px; text-align: center; color: var(--muted); }

/* ---------- footer */
.nb-foot { background: #0f2350; color: #c9d5f2; margin-top: 40px; }
.nb-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding-block: 40px 24px; }
.nb-foot h4 { color: #fff; font-size: 18px; margin: 0 0 10px; }
.nb-foot a { color: #fff; text-decoration: none; }
.nb-foot a:hover { text-decoration: underline; }
.nb-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.nb-foot .legal { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.nb-foot .legal .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 14px; grid-template-columns: none; }
@media (max-width: 760px) { .nb-foot .wrap { grid-template-columns: 1fr; } }
.wa { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1025; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff !important; display: grid; place-items: center; font-size: 30px; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); text-decoration: none !important; }
@media (max-width: 900px) { body.has-buybar .wa { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); } }

/* old pages that still use legacy class names */
.nb .container-fluid.legacy { max-width: 1160px; }
.nb .login { background: var(--sheet) !important; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 24px !important; }
.nb .footer, .nb .footerNoteHeading { display: none; }

/* older content pages (privacy, terms, refund...) keep their Bootstrap rows; keep them inside the page width */
.nb-main > .row, .nb-main > div:not(.wrap):not(.auth):not(.mynotes) > .row { margin-inline: auto; max-width: 1160px; padding-inline: 16px; }
.nb .btn-primary, .nb .btn-success, .nb .btn-danger { color: #fff; }
.nb .mynotes .chap .btns a { padding: 8px 14px; font-size: 14px; }
