/* ============================================================
   Jessi & Samba Publication — Storefront
   Modernised blue brand. Bootstrap 5.3 companion stylesheet.
   ============================================================ */

:root {
    --js-blue: #0d6efd;
    --js-blue-600: #0b5ed7;
    --js-blue-800: #084298;
    --js-blue-900: #062c66;
    --js-gold: #ffd966;
    --js-ink: #0f172a;
    --js-body: #475569;
    --js-line: #e6ebf3;
    --js-surface: #ffffff;
    --js-tint: #f5f8fd;
    --js-radius: 16px;
    --js-radius-sm: 10px;
    --js-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
    --js-shadow-md: 0 8px 24px rgba(13, 110, 253, .10), 0 2px 6px rgba(15, 23, 42, .06);
    --js-shadow-lg: 0 22px 48px rgba(8, 66, 152, .18);
}

* { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--js-body);
    background: var(--js-surface);
    padding-top: 74px;
    /* Inter's default figures are proportional, which makes a column of prices
       jitter. Tabular figures line the decimal points up. */
    font-variant-numeric: tabular-nums;
    letter-spacing: -.005em;
}

h1, h2, h3, h4, h5, h6, .fw-bold { color: var(--js-ink); }

/* Headings in the serif, at display optical size. The negative tracking stops
   a large serif looking loose; the tighter leading keeps a three-line headline
   as one block rather than three sentences. */
h1, h2, h3, .section-title, .js-hero h1 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-optical-sizing: auto;
    letter-spacing: -.018em;
}

/* Small headings stay in the sans: a serif at 14px in a card title reads as a
   mistake rather than a choice. */
h4, h5, h6 {
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -.01em;
}
a { text-decoration: none; }

.section { padding: 76px 0; }
.section-tint { background: var(--js-tint); }

.eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--js-blue);
    background: rgba(13, 110, 253, .08);
    border-radius: 999px;
    padding: .35rem .85rem;
    margin-bottom: 1rem;
}

.section-title { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; }
.section-sub { color: var(--js-body); max-width: 620px; }

/* ---------- Navbar ---------- */
.js-navbar {
    background: rgba(9, 18, 36, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background .25s ease, box-shadow .25s ease;
}
.js-navbar.is-stuck { background: rgba(9, 18, 36, .97); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

.js-brand { display: flex; align-items: center; gap: .65rem; color: #fff; }
.js-brand__mark {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--js-blue), var(--js-blue-800));
    color: #fff; font-weight: 700; font-size: 1rem;
    box-shadow: 0 6px 16px rgba(13, 110, 253, .45);
}
.js-brand__name { font-weight: 700; line-height: 1.1; font-size: 1.02rem; color: #fff; }
.js-brand__tag { display: block; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 500; }

.js-navbar .nav-link { color: rgba(255, 255, 255, .78); font-weight: 500; font-size: .94rem; padding: .5rem .9rem; border-radius: 8px; }
.js-navbar .nav-link:hover, .js-navbar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .08); }

.js-cart-btn { position: relative; color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; padding: .45rem .85rem; font-weight: 500; }
.js-cart-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.js-cart-count {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
    border-radius: 999px; background: var(--js-gold); color: #3b2f00;
    font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px;
}

/* ---------- Hero ---------- */
.js-hero {
    position: relative;
    background: linear-gradient(135deg, #0b5ed7 0%, var(--js-blue-800) 55%, var(--js-blue-900) 100%);
    color: #fff;
    padding: 92px 0 104px;
    overflow: hidden;
}
.js-hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(600px 320px at 12% 0%, rgba(255, 255, 255, .16), transparent 70%),
        radial-gradient(520px 300px at 88% 100%, rgba(255, 217, 102, .18), transparent 70%);
}
.js-hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
}
.js-hero > .container { position: relative; z-index: 2; }
.js-hero h1 { color: #fff; font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.35rem); line-height: 1.12; letter-spacing: -.025em; }
.js-hero h1 span { color: var(--js-gold); }
.js-hero p.lead { color: rgba(255, 255, 255, .82); font-size: 1.06rem; max-width: 560px; }

.js-hero__pill {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
    color: #fff; border-radius: 999px; padding: .4rem 1rem; font-size: .82rem; font-weight: 500;
}

.btn-gold { background: var(--js-gold); color: #3b2f00; font-weight: 600; border: none; }
.btn-gold:hover { background: #ffcf3d; color: #3b2f00; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .4); color: #fff; font-weight: 500; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.js-hero__stats { display: flex; flex-wrap: wrap; gap: 2.4rem; margin-top: 2.6rem; }
.js-hero__stat strong { display: block; font-size: 1.7rem; font-weight: 700; color: #fff; line-height: 1; }
.js-hero__stat span { font-size: .82rem; color: rgba(255, 255, 255, .65); }

/* ---------- Floating book stack in the hero ----------
   What makes a rectangle read as a book is not the colour: it is the spine
   catching light on one edge, the page block on the other, and the cover
   lifting very slightly away from the boards. Each is one gradient here — no
   images, so nothing extra to load and every title still generated from the
   catalogue.
   ---------------------------------------------------- */
.js-stack { position: relative; height: 340px; perspective: 1400px; }

.js-stack__book {
    position: absolute; width: 158px; height: 222px;
    /* Spine edge square, fore-edge rounded — the way a bound book sits. */
    border-radius: 3px 10px 10px 3px;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 17px 15px 15px 22px;
    color: #fff; font-size: .74rem;
    background-blend-mode: overlay, normal;
    /* Layered: contact shadow, mid shadow, then the cast. A single large blur
       looks like a sticker; three make it sit in space. */
    box-shadow:
        0 1px 2px rgba(3, 18, 44, .34),
        0 10px 20px rgba(3, 18, 44, .28),
        0 30px 60px rgba(3, 18, 44, .34);
    animation: jsFloat 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* The spine: a dark hinge, then a narrow highlight where the cover turns. */
.js-stack__book::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 15px;
    border-radius: 3px 0 0 3px;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, .40) 0%,
            rgba(0, 0, 0, .26) 42%,
            rgba(255, 255, 255, .16) 78%,
            rgba(0, 0, 0, .12) 100%);
}

/* The page block on the fore-edge — stacked paper, not a white stripe. */
.js-stack__book::after {
    content: ""; position: absolute; right: 0; top: 5px; bottom: 5px; width: 7px;
    border-radius: 0 3px 3px 0;
    background:
        repeating-linear-gradient(90deg,
            #fdfdfb 0 1px, #e7e2d6 1px 2px);
    box-shadow: inset -1px 0 2px rgba(0, 0, 0, .22);
}

.js-stack__book b { font-size: .95rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.js-stack__book i { font-style: normal; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; opacity: .82; }

/* A link should say so. Lifting one book out of the stack is enough. */
a.js-stack__book { text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
a.js-stack__book:hover {
    z-index: 5;
    box-shadow:
        0 2px 4px rgba(3, 18, 44, .36),
        0 16px 30px rgba(3, 18, 44, .30),
        0 42px 80px rgba(3, 18, 44, .38);
}
/* Position, tilt and turn per book.
   Held in custom properties so the shared transform below can compose them —
   set transform directly on each and :hover would have to repeat all five
   rules to avoid snapping every book back to square. --turn is a rotation in
   Y: a few degrees is enough to show the spine and read as a solid object. */
.js-stack__book:nth-child(1) { left: 2%;  top: 30px;  --rot: -9deg; --turn:  10deg; animation-delay: 0s; }
.js-stack__book:nth-child(2) { left: 31%; top: 0;     --rot:  2deg; --turn:  -4deg; animation-delay: .8s; z-index: 3; }
.js-stack__book:nth-child(3) { left: 61%; top: 44px;  --rot: 10deg; --turn: -12deg; animation-delay: 1.6s; }
.js-stack__book:nth-child(4) { left: 18%; top: 170px; --rot:  5deg; --turn:   7deg; animation-delay: 2.4s; }
.js-stack__book:nth-child(5) { left: 50%; top: 192px; --rot: -7deg; --turn:  -8deg; animation-delay: 3.2s; }

.js-stack__book {
    transform: rotate(var(--rot, 0deg)) rotateY(var(--turn, 0deg)) scale(var(--lift, 1));
}

a.js-stack__book:hover { --lift: 1.06; }

/* The float is a translate so it cannot fight the transform above. */
@keyframes jsFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

@media (prefers-reduced-motion: reduce) {
    .js-stack__book { animation: none; }
    a.js-stack__book:hover { --lift: 1; }
}

/* ---------- Trust strip ---------- */
.js-trust { background: #fff; border-bottom: 1px solid var(--js-line); }
.js-trust__item { display: flex; align-items: center; gap: .85rem; padding: 22px 0; }
.js-trust__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(13, 110, 253, .09); color: var(--js-blue); font-size: 1.05rem; flex: none; }
.js-trust__item strong { display: block; font-size: .92rem; color: var(--js-ink); }
.js-trust__item span { font-size: .78rem; }

/* ---------- Category chips / tiles ---------- */
.js-cat {
    display: block; border: 1px solid var(--js-line); border-radius: var(--js-radius);
    padding: 22px 20px; background: #fff; transition: .22s ease; height: 100%;
}
.js-cat:hover { transform: translateY(-4px); border-color: rgba(13, 110, 253, .35); box-shadow: var(--js-shadow-md); }
.js-cat__ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; margin-bottom: 14px; background: linear-gradient(135deg, var(--js-blue), var(--js-blue-800)); }
.js-cat h6 { font-weight: 600; margin-bottom: 4px; color: var(--js-ink); }
.js-cat p { font-size: .82rem; margin: 0; color: var(--js-body); }

.js-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--js-line); background: #fff; color: var(--js-body);
    border-radius: 999px; padding: .42rem 1rem; font-size: .85rem; font-weight: 500;
    transition: .18s ease;
}
.js-chip:hover { border-color: var(--js-blue); color: var(--js-blue); }
.js-chip.is-active { background: var(--js-blue); border-color: var(--js-blue); color: #fff; }

/* ---------- Product card ---------- */
.js-card {
    position: relative; height: 100%; background: #fff;
    border: 1px solid var(--js-line); border-radius: var(--js-radius);
    overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    display: flex; flex-direction: column;
}
.js-card:hover { transform: translateY(-5px); box-shadow: var(--js-shadow-md); border-color: rgba(13, 110, 253, .3); }

.js-cover {
    position: relative; aspect-ratio: 3 / 3.4; display: flex; flex-direction: column;
    justify-content: space-between; padding: 18px 16px; color: #fff; overflow: hidden;
}
.js-cover::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0));
}
.js-cover__spine { position: absolute; right: -34px; bottom: 46px; transform: rotate(-90deg); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; opacity: .65; }
.js-cover__class { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; opacity: .9; }
.js-cover__title { font-size: 1rem; font-weight: 600; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.js-cover__code { font-size: .68rem; opacity: .75; letter-spacing: .06em; }
.js-cover__logo { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 600; }

.js-card__body { padding: 16px; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.js-card__title { font-size: .95rem; font-weight: 600; color: var(--js-ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.js-card__title:hover { color: var(--js-blue); }
.js-card__meta { font-size: .76rem; color: #94a3b8; }
.js-price { font-size: 1.22rem; font-weight: 700; color: var(--js-ink); letter-spacing: -.01em; }
.js-price small { font-size: .74rem; font-weight: 500; color: #94a3b8; }

.js-badge {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    font-size: .66rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    border-radius: 999px; padding: .28rem .6rem; backdrop-filter: blur(6px);
}
.js-badge--in { background: rgba(22, 163, 74, .92); color: #fff; }
.js-badge--low { background: rgba(234, 88, 12, .92); color: #fff; }
.js-badge--out { background: rgba(100, 116, 139, .92); color: #fff; }
.js-badge--order { background: rgba(13, 110, 253, .92); color: #fff; }

.js-stock { font-size: .76rem; font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; }
.js-stock--in { color: #16a34a; }
.js-stock--low { color: #ea580c; }
.js-stock--out { color: #64748b; }
.js-stock--order { color: var(--js-blue); }
.js-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Filters ---------- */
.js-panel { background: #fff; border: 1px solid var(--js-line); border-radius: var(--js-radius); padding: 20px; }
.js-panel h6 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; font-weight: 600; margin-bottom: .85rem; }
.js-panel + .js-panel { margin-top: 16px; }

.form-control, .form-select { border-color: var(--js-line); border-radius: var(--js-radius-sm); padding: .58rem .85rem; font-size: .92rem; }
.form-control:focus, .form-select:focus { border-color: var(--js-blue); box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12); }
.form-label { font-size: .84rem; font-weight: 500; color: var(--js-ink); margin-bottom: .35rem; }

.js-search { position: relative; }
.js-search .form-control { padding-left: 2.6rem; height: 48px; }
.js-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--js-radius-sm); font-weight: 500; }
.btn-primary { background: var(--js-blue); border-color: var(--js-blue); }
.btn-primary:hover { background: var(--js-blue-600); border-color: var(--js-blue-600); }
.btn-lg { padding: .78rem 1.7rem; }
.btn-soft { background: rgba(13, 110, 253, .09); color: var(--js-blue); border: none; font-weight: 600; }
.btn-soft:hover { background: rgba(13, 110, 253, .16); color: var(--js-blue-800); }

/* ---------- Cart / checkout ---------- */
.js-line-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--js-line); }
.js-line-item:last-child { border-bottom: none; }
.js-line-cover { width: 66px; height: 88px; border-radius: 5px 9px 9px 5px; flex: none; box-shadow: var(--js-shadow-sm); position: relative; overflow: hidden; }
.js-line-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: rgba(0, 0, 0, .22); }

.js-qty { display: inline-flex; align-items: center; border: 1px solid var(--js-line); border-radius: var(--js-radius-sm); overflow: hidden; }
.js-qty button { border: none; background: #fff; width: 34px; height: 38px; color: var(--js-body); font-size: .95rem; }
.js-qty button:hover { background: var(--js-tint); color: var(--js-blue); }
.js-qty input { border: none; width: 52px; height: 38px; text-align: center; font-weight: 600; color: var(--js-ink); font-size: .9rem; }
.js-qty input:focus { outline: none; }

.js-summary { background: #fff; border: 1px solid var(--js-line); border-radius: var(--js-radius); padding: 24px; position: sticky; top: 96px; }
.js-summary__row { display: flex; justify-content: space-between; padding: .45rem 0; font-size: .92rem; }
.js-summary__total { display: flex; justify-content: space-between; padding-top: .9rem; margin-top: .6rem; border-top: 1px dashed var(--js-line); font-size: 1.16rem; font-weight: 700; color: var(--js-ink); }

.js-steps { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .82rem; }
.js-steps span { display: inline-flex; align-items: center; gap: .4rem; color: #94a3b8; }
.js-steps span.is-done { color: #16a34a; }
.js-steps span.is-active { color: var(--js-blue); font-weight: 600; }
.js-steps .sep { color: var(--js-line); }

/* ---------- Page header (inner pages) ---------- */
.js-pagehead {
    background: linear-gradient(135deg, var(--js-blue-800), var(--js-blue-900));
    color: #fff; padding: 52px 0 46px; position: relative; overflow: hidden;
}
.js-pagehead::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px 260px at 85% 0%, rgba(255, 217, 102, .16), transparent 70%); }
.js-pagehead > .container { position: relative; z-index: 2; }
.js-pagehead h1 { color: #fff; font-weight: 700; font-size: clamp(1.55rem, 3.2vw, 2.2rem); letter-spacing: -.02em; }
.js-pagehead p { color: rgba(255, 255, 255, .78); margin: 0; }
.js-pagehead .breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .4); margin: 0 0 .5rem; }
.js-pagehead .breadcrumb a { color: rgba(255, 255, 255, .7); }
.js-pagehead .breadcrumb a:hover { color: #fff; }
.js-pagehead .breadcrumb-item.active { color: rgba(255, 255, 255, .95); }

/* ---------- Prose (policy pages) ---------- */
.js-prose { max-width: 780px; }
.js-prose h2 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 .75rem; }
.js-prose h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.js-prose p, .js-prose li { font-size: .95rem; line-height: 1.75; }
.js-prose ul { padding-left: 1.15rem; }

/* ---------- Empty state ---------- */
.js-empty { text-align: center; padding: 68px 20px; }
.js-empty__ico { width: 78px; height: 78px; border-radius: 24px; background: var(--js-tint); color: var(--js-blue); display: grid; place-items: center; font-size: 1.9rem; margin: 0 auto 18px; }

/* ---------- Footer ---------- */
.js-footer { background: #0b1220; color: rgba(255, 255, 255, .72); font-size: .9rem; padding-top: 60px; }
.js-footer h5 { color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.1rem; }
.js-footer a { color: rgba(255, 255, 255, .68); }
.js-footer a:hover { color: var(--js-gold); }
.js-footer ul { list-style: none; padding: 0; margin: 0; }
.js-footer li { margin-bottom: .55rem; }
.js-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .09); margin-top: 46px; padding: 20px 0; font-size: .84rem; color: rgba(255, 255, 255, .5); }
.js-social { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; margin-right: .5rem; }
.js-social:hover { background: var(--js-blue); color: #fff; }

/* ---------- Toast ---------- */
.js-toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    body { padding-top: 66px; }
    .js-hero { padding: 66px 0 74px; }
    .js-stack { display: none; }
    .js-navbar .navbar-nav { padding: .75rem 0; }
    .js-summary { position: static; }
}
