/* antiqbook.theme.css */
/* Based on Antiqbook Design Handoff v1.0 (Mar 2026) */

html {
    overflow-y: scroll;
}

/* Hide the floating reCAPTCHA v3 badge — it overlapped form submit buttons
   bottom-right. Compliance preserved by the inline "protected by reCAPTCHA"
   notice we emit from recaptcha-v3-form-script.phtml on every form. */
.grecaptcha-badge {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   1) Design Tokens (CSS variables)
   ========================================================================== */

:root {
    /* Brand */
    --navy: #1B3454;
    --navy-light: #2D4A6E;
    --navy-dark: #0F2340;

    --bordeaux: #7B152A;
    --bordeaux-lt: #9A2E42;
    --bordeaux-dk: #5C0E1E;

    /* Neutrals */
    --slate: #455B74;

    --text: #333333;
    --text-light: #5A5A5A;
    --text-muted: #7A7A7A;

    /* Surfaces */
    --cream: #FAFAF5;
    --warm-white: #FFFFFF;
    --paper-bg: #F5F3ED;
    --card-bg: #FFFFFF;

    /* Borders */
    --border: #D9D3C7;
    --border-light: #E8E3D9;

    /* Accents */
    --gold: #B8943E;
    --gold-light: #E8D9A8;

    --green: #2E7D32;
    --green-bg: #E8F5E9;

    --red: #B71C1C;

    --bs-body-font-weight: 450;
}

/* ==========================================================================
   2) Base / Resets
   ========================================================================== */

body {
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Georgia, "PT Serif", serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

body > main {
    flex: 1 0 auto;
}

body > footer {
    flex-shrink: 0;
}

input,
select,
textarea {
    font-family: "Source Sans 3", sans-serif;
}

a {
    color: var(--bordeaux);
}

a:hover {
    color: var(--bordeaux-lt);
}

.ab-search-panel {
    padding: 18px 22px;
}

.ab-search-panel .form-label {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.ab-search-panel .form-control,
.ab-search-panel .form-select {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.ab-search-panel__primary {
    margin-bottom: 12px;
}

.ab-search-panel__primary .ab-btn {
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
    overflow-wrap: normal;
    align-self: stretch;
}

.ab-search-panel__details {
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
}

.ab-search-panel__details summary {
    cursor: pointer;
    list-style: none;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ab-search-panel__details summary::-webkit-details-marker {
    display: none;
}

.ab-search-panel__details summary::before {
    content: "+";
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: var(--bordeaux);
    font-size: 0.9rem;
    line-height: 1;
}

.ab-search-panel__details[open] summary::before {
    content: "-";
}

.ab-search-panel__details-body {
    margin-top: 10px;
}

.ab-search-panel__advanced-link {
    margin-bottom: 8px;
}

@media (max-width: 767.98px) {
    .ab-search-panel {
        padding: 16px;
    }

    .ab-search-panel__primary {
        flex-direction: column;
    }

    .ab-currency-alt {
        display: none;
    }

    .ab-show-currency-alt .ab-currency-alt {
        display: inline;
    }
}

/* ==========================================================================
   3) Layout Utilities
   ========================================================================== */

/* Containers (spec: 1080 / 1180 + padding 28px) */
.ab-container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.ab-container-wide {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

/* Full bleed sections */
.ab-fullbleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ==========================================================================
   4) Header / Navigation
   ========================================================================== */

/* Breadcrumb (shared across category, author, dealer pages) */
.ab-authors-breadcrumb {
    font-size: 0.95rem;
    margin: 0 0 1rem;
    color: var(--text-light);
}

.ab-authors-breadcrumb span {
    margin: 0 0.35rem;
    color: var(--text-muted);
}

.ab-authors-summary {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

/* Navbar (sticky) */
.ab-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--warm-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 4px rgba(27, 52, 84, 0.06);
}

.ab-navbar__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.ab-navbar .navbar-brand img {
    height: 64px;
    width: auto;
}

.ab-navbar__controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ab-navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--warm-white);
    color: var(--navy);
    padding: 0;
    line-height: 1;
}

.ab-navbar-toggle:hover {
    background: rgba(27, 52, 84, 0.04);
}

.ab-navbar-toggle__label {
    display: none;
}

.ab-navbar-toggle__icon {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.ab-navbar-toggle__icon span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.ab-navbar__menu {
    flex: 1 1 auto;
}

.ab-navbar__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.ab-navbar__links,
.ab-navbar__actions,
.ab-navbar__secondary {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Navbar links */
.ab-navlink {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--slate);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.ab-navlink:hover {
    background: rgba(27, 52, 84, 0.04);
    color: var(--navy);
}

.ab-navlink.active,
.ab-navlink[aria-current="page"] {
    color: var(--bordeaux);
    background: rgba(123, 21, 42, 0.04);
    font-weight: 600;
}

/* Navbar divider */
.ab-nav-divider {
    width: 1px;
    height: 28px;
    background: var(--border-light);
    margin: 0 10px;
}

/* Cart icon badge */
.ab-cart {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--warm-white);
    color: var(--navy);
    text-decoration: none;
}

.ab-cart:hover {
    background: rgba(27, 52, 84, 0.04);
    color: var(--navy);
}

.ab-cart i {
    font-size: 16px;
}

.ab-cart .ab-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--bordeaux);
    color: #fff;
    font-family: "Source Sans 3", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.ab-cart--mobile {
    display: none;
}

.ab-seller-menu {
    padding: 24px 28px;
}

.ab-seller-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ab-seller-menu__toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--warm-white);
    color: var(--navy);
    padding: 8px 10px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.ab-seller-menu__toggle:hover {
    background: rgba(27, 52, 84, 0.04);
}

.ab-seller-menu__toggle i {
    transition: transform 0.2s ease;
}

.ab-seller-menu__toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

.ab-seller-menu__title {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.ab-seller-menu__section {
    margin-bottom: 16px;
}

.ab-seller-menu__section--last {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .ab-navbar__inner {
        min-height: 64px;
        gap: 10px;
    }

    .ab-navbar .navbar-brand img {
        height: 48px;
    }

    .ab-navbar-toggle {
        display: inline-flex;
    }

    .ab-navbar__menu {
        flex-basis: 100%;
        width: 100%;
    }

    .ab-navbar__nav,
    .ab-navbar__links,
    .ab-navbar__secondary,
    .ab-navbar__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .ab-navbar__nav {
        margin-top: 0;
        padding: 8px 0 10px;
        border-top: 1px solid var(--border-light);
        background: var(--warm-white);
    }

    .ab-navlink {
        display: block;
        padding: 10px 0;
        border-radius: 0;
    }

    .ab-nav-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }

    .ab-cart--desktop {
        display: none;
    }

    .ab-cart--mobile {
        display: grid;
    }

    .ab-navbar__actions .ab-cart {
        align-self: flex-start;
        margin-top: 10px;
    }

    .ab-seller-menu {
        padding: 18px 18px 10px;
    }

    .ab-seller-menu__header {
        margin-bottom: 0;
    }

    .ab-seller-menu__toggle {
        display: inline-flex;
    }

    .ab-seller-menu__panel {
        padding-top: 14px;
        border-top: 1px solid var(--border-light);
        margin-top: 14px;
    }
}

@media (min-width: 992px) {
    .ab-navbar__menu {
        display: block !important;
    }

    .ab-seller-menu__panel {
        display: block !important;
    }
}

@media (max-width: 575.98px) {
    .ab-container,
    .ab-container-wide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ab-navbar .navbar-brand img {
        height: 42px;
    }

    .ab-navbar-toggle {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   5) Hero
   ========================================================================== */

.ab-home-hero {
    background: var(--navy);
    min-height: 440px;
    padding: 156px 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: -1rem;
}

/* The engraving covers the whole band (as the category hero's photo does), so its
   edges never show up, whatever the viewport width. */
.ab-home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/bg.jpg") center top / cover no-repeat;
    opacity: 0.9;
}

.ab-home-hero__inner {
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .ab-home-hero {
        min-height: auto;
        padding: 36px 20px 24px;
    }

    .ab-home-hero::before {
        display: none;
    }
}

@media (min-width: 992px) {
    .ab-home-hero {
        margin-top: -1.5rem;
    }
}

.ab-hero-logo {
    height: 56px;
    width: auto;
    filter: brightness(1.8) contrast(0.9);
}

.ab-hero-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 36px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    color: var(--border-light); /* spec: light on dark hero */
}

@media (min-width: 992px) {
    .ab-hero-title {
        font-size: 36px;
    }
}

.ab-hero-sub {
    font-family: "Source Sans 3", sans-serif;
    font-size: 17px;
    color: rgba(232, 227, 217, 0.7);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.ab-home-hero .ab-hero-examples,
.ab-home-hero .ab-hero-examples a {
    color: rgba(255, 255, 255, 0.75);
}

.ab-home-hero .ab-hero-examples a:hover {
    color: rgba(255, 255, 255, 0.92);
}

/* Hero search */
.ab-hero-search {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 26px;
    display: flex;
    align-items: stretch;
    background: var(--warm-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.ab-hero-search input {
    flex: 1;
    border: none;
    padding: 18px 22px;
    font-size: 16px;
    font-family: "Source Sans 3", sans-serif;
    border-radius: 0;
    background: transparent;
    color: var(--text);
}

.ab-hero-search input::placeholder {
    color: #9aa2ad;
}

.ab-hero-search select {
    width: 160px;
    border: none;
    border-left: 1px solid var(--border-light);
    border-radius: 0;
    padding: 18px 42px 18px 18px;
    font-size: 14px;
    font-family: "Source Sans 3", sans-serif;
    color: #444;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: transparent;
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 12px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23455B74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

.ab-hero-search input:focus,
.ab-hero-search select:focus {
    outline: none;
}

.ab-hero-search button {
    background: var(--bordeaux);
    color: #fff;
    border: none;
    padding: 18px 34px;
    min-width: 132px;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.ab-hero-search button:hover {
    background: var(--bordeaux-lt);
}

@media (max-width: 576px) {
    .ab-hero-search {
        flex-direction: column;
        border-radius: 14px;
    }

    .ab-hero-search select {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-light);
        background-position: right 18px center;
    }

    .ab-hero-search button {
        width: 100%;
        min-width: 0;
    }
}

/* ==========================================================================
   6) Typography Helpers / Content Blocks
   ========================================================================== */

.ab-kv {
    display: grid;
    grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
    gap: 6px 12px;
}

.ab-kv dt {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    color: var(--text);
}

.ab-kv dd {
    margin: 0;
    color: var(--text-muted);
    overflow-wrap: break-word;
}

.ab-page-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
}

.ab-section-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
}

.ab-section-sub {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    color: var(--text-muted);
}

.ab-section-accent {
    width: 48px;
    height: 3px;
    background: var(--bordeaux);
    margin-top: 10px;
}

/* Alphabet buttons */
.ab-alpha-btn {
    font-family: "Source Sans 3", sans-serif;
    font-size: 13px;
    font-weight: 500;
    background: var(--warm-white);
    color: var(--slate);
    border: 1px solid var(--border-light);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ab-alpha-btn:hover {
    background: rgba(27, 52, 84, 0.04);
    color: var(--navy);
}

.ab-alpha-btn.ab-alpha-btn--active {
    background: rgba(123, 21, 42, 0.08);
    border-color: rgba(123, 21, 42, 0.22);
    color: var(--bordeaux);
    font-weight: 600;
}

.ab-alpha-btn.ab-alpha-btn--all {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    font-weight: 600;
}

/* ==========================================================================
   7) Components
   ========================================================================== */

/* Cards */
.ab-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(27, 52, 84, 0.05);
}

/* Legacy compatibility (after removing antiqbook-classic-3.css) */
.ab-item {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(27, 52, 84, 0.05);
    padding: 24px 28px;
}

.ab-sidebox {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(27, 52, 84, 0.05);
    padding: 24px 28px;
}

.ab-sidebox-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
}

.ab-meta {
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    color: var(--text-muted);
}

.ab-price {
    font-family: "Source Sans 3", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.btn-ab-primary {
    background: var(--bordeaux);
    color: #fff;
    border-color: var(--bordeaux);
}

.btn-ab-primary:hover {
    background: var(--bordeaux-lt);
    border-color: var(--bordeaux-lt);
    color: #fff;
}

.btn-ab-outline {
    background: transparent;
    color: var(--bordeaux);
    border-color: var(--bordeaux);
}

.btn-ab-outline:hover {
    background: rgba(123, 21, 42, 0.06);
    color: var(--bordeaux);
    border-color: var(--bordeaux);
}

.ab-card.ab-card-hover:hover {
    box-shadow: 0 8px 20px rgba(27, 52, 84, 0.10);
    transition: box-shadow 0.2s;
}

/* Homepage author avatar (initial-letter placeholder, no portrait photos yet) */
.ab-author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    background: var(--paper-bg);
    border: 2px solid var(--border-light);
}

.ab-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Homepage "Newly added" card image — stretches the shared 60x60 list
   thumbnail (BookThumbnailHelper) to fill a hero-style card top; the
   helper hardcodes its own width/height/border, so overriding needs
   !important, same pattern already used in dealer-card.phtml. */
.ab-newlyadded-thumb {
    height: 200px;
    background: var(--paper-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
}

.ab-newlyadded-thumb img {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    object-fit: contain !important;
}

/* Badges */
.ab-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.ab-badge--bordeaux {
    background: #7B152A10;
    color: var(--bordeaux);
    border-color: #7B152A28;
}

.ab-badge--gold {
    background: #B8943E14;
    color: var(--gold);
    border-color: #B8943E30;
}

.ab-badge--green {
    background: var(--green-bg);
    color: var(--green);
    border-color: #2E7D3230;
}

.ab-badge--navy {
    background: #1B34540C;
    color: var(--navy);
    border-color: #1B345420;
}

/* Dealer card affiliation badges */
.affiliation-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.affiliation-badges .badge-image {
    max-height: 72px;
    width: auto;
    display: block;
}

/* Buttons */
.ab-btn {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.ab-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Button sizes */
.ab-btn--sm {
    font-size: 13px;
    padding: 8px 16px;
}

.ab-btn--md {
    font-size: 15px;
    padding: 11px 22px;
}

.ab-btn--lg {
    font-size: 16px;
    padding: 13px 28px;
}

/* Button variants */
.ab-btn--primary {
    background: var(--bordeaux);
    color: #fff;
}

.ab-btn--primary:hover {
    background: var(--bordeaux-lt);
    color: #fff;
}

.ab-btn--primary:active {
    background: var(--bordeaux-dk);
    color: #fff;
}

.ab-btn--navy {
    background: var(--navy);
    color: #fff;
}

.ab-btn--navy:hover {
    background: var(--navy-light);
}

.ab-btn--navy:active {
    background: var(--navy-dark);
}

.ab-btn--secondary {
    background: #fff;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.ab-btn--secondary:hover {
    background: var(--paper-bg);
}

.ab-btn--gold {
    background: var(--gold);
    color: #fff;
}

.ab-btn--gold:hover {
    filter: brightness(1.05);
}

.ab-btn--danger {
    background: var(--red);
    color: #fff;
}

.ab-btn--success {
    background: var(--green);
    color: #fff;
}

.ab-btn--ghost {
    background: transparent;
    color: var(--slate);
    border: none;
    padding-left: 0;
    padding-right: 0;
}

.ab-btn--ghost:hover {
    color: var(--navy);
    text-decoration: underline;
}

/* Forms */
.ab-label {
    font-family: "Source Sans 3", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.ab-required::after {
    content: " *";
    color: var(--bordeaux);
    font-weight: 700;
}

.ab-input,
.ab-select,
.ab-textarea {
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--warm-white);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 11px 14px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ab-input::placeholder,
.ab-textarea::placeholder {
    color: var(--text-muted);
}

.ab-textarea {
    min-height: 110px;
}

.ab-input:focus,
.ab-select:focus,
.ab-textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 52, 84, 0.09);
}

/* Select chevron (SVG) */
.ab-select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23455B74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

.ab-check {
    width: 18px;
    height: 18px;
    accent-color: var(--bordeaux);
}

/* Form errors */
.ab-input.is-invalid,
.ab-select.is-invalid,
.ab-textarea.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.12);
}

.ab-error-text {
    margin-top: 6px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    color: var(--red);
}

/* Sidebar links */
.ab-sidelink {
    display: block;
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    color: var(--text-light);
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
}

.ab-sidelink:hover {
    background: rgba(27, 52, 84, 0.04);
    color: var(--navy);
}

.ab-sidelink.active {
    color: var(--bordeaux);
    background: rgba(123, 21, 42, 0.06);
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    border-color: var(--border);
    color: var(--slate);
}

.pagination .page-link:hover {
    background: rgba(27, 52, 84, 0.04);
    border-color: var(--border);
    color: var(--navy);
}

.pagination .page-item.active .page-link {
    background: rgba(123, 21, 42, 0.08);
    border-color: rgba(123, 21, 42, 0.22);
    color: var(--bordeaux);
    font-weight: 600;
}

.ab-book-breadcrumb {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.ab-book-breadcrumb a {
    color: var(--link);
    text-decoration: none;
}

.ab-book-breadcrumb a:hover {
    color: var(--bordeaux);
    text-decoration: underline;
}

.ab-book-breadcrumb span {
    margin: 0 0.35rem;
    color: var(--text-muted);
}

.ab-book-breadcrumb strong {
    color: var(--text);
    font-weight: 600;
}

/* Tables */
.ab-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    color: var(--text);
}

.ab-table thead th {
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: var(--text-light);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.ab-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.ab-table tbody tr:last-child td {
    border-bottom: 0;
}

.ab-table tbody tr:hover {
    background: rgba(27, 52, 84, 0.025);
}

.ab-table--clickable tbody tr {
    cursor: pointer;
}

/* Book image gallery (book detail page) + fullscreen lightbox.
   The stage has a fixed height so switching between portrait and landscape
   images doesn't make the page jump. */
.ab-gallery__stage {
    position: relative;
    height: 420px;
    background: var(--paper-bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
}

.ab-gallery__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.ab-gallery__track::-webkit-scrollbar {
    display: none;
}

.ab-gallery__track:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.ab-gallery__slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    cursor: zoom-in;
}

.ab-gallery__slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(27, 52, 84, 0.15);
}

.ab-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ab-gallery__nav:hover {
    background: #FFFFFF;
    border-color: var(--bordeaux);
    color: var(--bordeaux);
}

.ab-gallery__nav:focus-visible,
.ab-gallery__thumb:focus-visible,
.ab-lightbox__close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.ab-gallery__nav--prev {
    left: 10px;
}

.ab-gallery__nav--next {
    right: 10px;
}

.ab-gallery__pill {
    position: absolute;
    bottom: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(15, 35, 64, 0.78);
    color: #FFFFFF;
    font-family: "Source Sans 3", sans-serif;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

.ab-gallery__pill--count {
    left: 10px;
}

.ab-gallery__pill--zoom {
    right: 10px;
}

/* One scrollable row; the padding keeps the focus outline inside the scroller. */
.ab-gallery__thumbs {
    position: relative;
    display: flex;
    gap: 8px;
    margin: 8px -4px 0;
    padding: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.ab-gallery__thumb {
    flex: 0 0 64px;
    scroll-snap-align: start;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    background: var(--paper-bg);
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ab-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-gallery__thumb:hover {
    opacity: 1;
}

.ab-gallery__thumb.is-active {
    border-color: var(--bordeaux);
    opacity: 1;
}

@media (max-width: 575.98px) {
    .ab-gallery__stage {
        height: 320px;
    }
}

.ab-lightbox .modal-content {
    background: #111418;
    color: #FFFFFF;
    border: 0;
}

.ab-lightbox__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
}

.ab-lightbox__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ab-lightbox__count {
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ab-lightbox__close {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ab-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ab-lightbox__body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

/* margin:auto instead of justify-content keeps a zoomed image's left and
   top edges reachable by scrolling. */
.ab-lightbox__viewport {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 8px 72px 20px;
    overflow: hidden;
}

.ab-lightbox__img {
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    transition: opacity 0.15s ease;
}

.ab-lightbox__viewport.can-zoom .ab-lightbox__img {
    cursor: zoom-in;
}

.ab-lightbox__viewport.is-zoomed {
    padding: 0;
    overflow: auto;
}

.ab-lightbox__viewport.is-zoomed .ab-lightbox__img {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

.ab-lightbox__viewport.is-dragging .ab-lightbox__img {
    cursor: grabbing;
}

.ab-lightbox__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    margin: -1rem 0 0 -1rem;
    pointer-events: none;
}

.ab-lightbox__body.is-loading .ab-lightbox__img {
    opacity: 0.35;
}

.ab-lightbox__body.is-loading .ab-lightbox__spinner {
    display: block;
}

.ab-lightbox__thumbs {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 16px 12px;
}

/* Centres the strip while it fits, without clipping its start once it scrolls. */
.ab-lightbox__thumbs > :first-child {
    margin-left: auto;
}

.ab-lightbox__thumbs > :last-child {
    margin-right: auto;
}

.ab-lightbox__thumbs .ab-gallery__thumb {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
}

.ab-lightbox__thumbs .ab-gallery__thumb.is-active {
    border-color: var(--gold);
}

.ab-lightbox .ab-gallery__nav {
    width: 48px;
    height: 48px;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 18px;
}

.ab-lightbox .ab-gallery__nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.ab-lightbox .ab-gallery__nav--prev {
    left: 14px;
}

.ab-lightbox .ab-gallery__nav--next {
    right: 14px;
}

@media (max-width: 575.98px) {
    .ab-lightbox__viewport {
        padding: 8px 8px 72px;
    }

    .ab-lightbox .ab-gallery__nav {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .ab-lightbox .ab-gallery__nav--prev {
        left: calc(50% - 60px);
    }

    .ab-lightbox .ab-gallery__nav--next {
        right: calc(50% - 60px);
    }
}

/* ==========================================================================
   8) Separators
   ========================================================================== */

hr,
.ab-hr {
    border: 0;
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
}

/* ==========================================================================
   9) Motion / Animations
   ========================================================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ab-fadeup {
    animation: fadeUp 0.35s ease both;
}

.ab-stagger > * {
    animation: fadeUp 0.35s ease both;
}

.ab-stagger > *:nth-child(1) {
    animation-delay: 0.00s;
}

.ab-stagger > *:nth-child(2) {
    animation-delay: 0.06s;
}

.ab-stagger > *:nth-child(3) {
    animation-delay: 0.12s;
}

.ab-stagger > *:nth-child(4) {
    animation-delay: 0.18s;
}

.ab-stagger > *:nth-child(5) {
    animation-delay: 0.24s;
}

.ab-stagger > *:nth-child(6) {
    animation-delay: 0.30s;
}

/* ==========================================================================
   10) Info content pages (antiqbook.info article body)
   ========================================================================== */

/* Most info pages are hand-authored legacy HTML: bare text separated by
   <br> with no <p> tags, so line-height/spacing carries most of the
   readability burden here rather than paragraph margins. */
.ab-content {
    line-height: 1.75;
}

.ab-content h1,
.ab-content h2,
.ab-content h3,
.ab-content h4 {
    font-family: "Merriweather", Georgia, serif;
    color: var(--navy);
    line-height: 1.3;
    margin: 1.5em 0 0.6em;
}

.ab-content > h1:first-child,
.ab-content > h2:first-child,
.ab-content > h3:first-child,
.ab-content > br:first-child + h1,
.ab-content > br:first-child + h2,
.ab-content > br:first-child + h3 {
    margin-top: 0;
}

.ab-content h3,
.ab-content h4 {
    padding-bottom: 0.35em;
    border-bottom: 1px solid var(--border-light);
}

.ab-content b,
.ab-content strong {
    color: var(--navy);
}

/* Legacy interview-style content blocks (id="ititle"/"quote"/etc.) are
   reused across bio, interview, and prize pages alike -- not just pages
   using the .ab-interview two-column layout -- so style them generically. */
.ab-content #ititle {
    font-family: "Merriweather", Georgia, serif;
    color: var(--bordeaux);
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
}

.ab-content #by {
    font-family: "Source Sans 3", sans-serif;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 0 14px;
}

.ab-content #quote {
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1em;
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 3px solid var(--gold);
}

.ab-content #question {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    color: var(--bordeaux);
    margin: 24px 0 8px;
}

.ab-content #answer,
.ab-content #introduction {
    margin: 0 0 16px;
}

/* A great many bio/bibliography pages fake paragraph breaks with a blank
   line via two consecutive <br>; give that pattern real vertical rhythm. */
.ab-content br + br {
    display: block;
    margin-top: 0.6em;
    content: "";
}

.ab-content #introduction img,
.ab-content img.midden {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(27, 52, 84, 0.1);
}

/* ==========================================================================
   Category hub (main categories with editorial content, see CategoryHub)
   ========================================================================== */

.ab-category-hero {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    margin-top: -1rem;
    padding: 36px 28px 92px;
}

@media (min-width: 992px) {
    .ab-category-hero {
        margin-top: -1.5rem;
        padding: 44px 28px 100px;
    }
}

@media (max-width: 767px) {
    .ab-category-hero {
        padding: 28px 20px 84px;
    }
}

/* Right half: the category's photo when it has one, else the house engraving. */
.ab-category-hero__image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* A long fade from the flat navy into the photo, so the photo has no left edge. */
.ab-category-hero__image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--navy) 0%,
        rgba(27, 52, 84, 0.92) 18%,
        rgba(27, 52, 84, 0.6) 38%,
        rgba(27, 52, 84, 0.2) 62%,
        rgba(27, 52, 84, 0.1) 100%
    );
}

.ab-category-hero--engraving .ab-category-hero__image {
    background-image: url("../img/bg.jpg");
    background-size: auto 170%;
    opacity: 0.9;
}

@media (max-width: 991px) {
    .ab-category-hero__image {
        display: none;
    }
}

.ab-category-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1024px;
    margin: 0 auto;
}

.ab-category-hero__text {
    max-width: 560px;
}

.ab-category-hero .ab-authors-breadcrumb,
.ab-category-hero .ab-authors-breadcrumb a,
.ab-category-hero .ab-authors-breadcrumb strong {
    color: rgba(255, 255, 255, 0.75);
}

.ab-category-hero__title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--warm-white);
    margin: 10px 0 12px;
}

.ab-category-hero__tagline {
    font-family: "Merriweather", Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--border-light);
    max-width: 640px;
    margin: 0 0 12px;
}

.ab-category-hero__intro {
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(232, 227, 217, 0.85);
    max-width: 640px;
    margin: 0;
}

/* The search panel sits across the hero's bottom edge, as on the homepage. */
.ab-category-hero__search {
    position: relative;
    z-index: 1;
    margin-top: -60px !important;
    box-shadow: 0 8px 24px rgba(27, 52, 84, 0.12);
}

.ab-hub-card {
    padding: 22px 24px;
    color: inherit;
    text-decoration: none;
}

.ab-hub-card__title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.ab-hub-card__text {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
}

.ab-hub-card__link {
    display: block;
    margin-top: 10px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--bordeaux);
    text-decoration: none;
}

.ab-hub-usp {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.ab-hub-usp li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    color: var(--text);
}

.ab-hub-usp li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--bordeaux);
    font-weight: 700;
}

/* Hero search bar: icon, wide input, navy button, quick links underneath. */
.ab-hub-search {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.ab-hub-search__icon {
    align-self: center;
    font-size: 22px;
    color: var(--navy);
    margin-left: 6px;
}

.ab-hub-search__input.form-control {
    flex: 1 1 auto;
    min-height: 54px;
    font-size: 16px;
}

.ab-hub-search__button.ab-btn {
    min-width: 140px;
    padding-inline: 28px;
    font-size: 16px;
    background: var(--navy);
    border-color: var(--navy);
}

.ab-hub-search__button.ab-btn:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
}

.ab-hub-search__popular {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin: 16px 0 4px 6px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
}

.ab-hub-search__popular span {
    color: var(--text-muted);
}

.ab-hub-search__popular a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.ab-hub-search__popular a i {
    font-size: 12px;
    margin-left: 4px;
}

@media (max-width: 575px) {
    .ab-hub-search {
        flex-wrap: wrap;
    }

    .ab-hub-search__icon {
        display: none;
    }

    .ab-hub-search__button.ab-btn {
        width: 100%;
    }
}

/* Hub sections and tiles */
.ab-hub-section {
    margin: 48px 0;
}

.ab-hub-section__title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 27px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 8px;
}

.ab-hub-section__intro {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 0 22px;
}

.ab-hub-tile {
    background: var(--paper-bg);
    border-radius: 10px;
    padding: 26px 28px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ab-hub-tile:hover {
    box-shadow: 0 8px 20px rgba(27, 52, 84, 0.10);
    transform: translateY(-2px);
    color: inherit;
}

.ab-hub-tile__icon {
    font-size: 34px;
    color: var(--navy);
    margin-bottom: 18px;
}

.ab-hub-tile__title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.ab-hub-tile__text {
    font-family: "Source Sans 3", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-light);
}

.ab-hub-tile--media {
    gap: 20px;
    align-items: flex-start;
    padding: 20px 22px;
}

.ab-hub-tile__media {
    flex: 0 0 110px;
    height: 110px;
    border-radius: 8px;
    background: var(--warm-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-hub-tile__media img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Full-width band (authors) */
.ab-hub-band {
    background: var(--paper-bg);
    padding: 36px 28px;
    /* Only the vertical margins: the horizontal ones come from .ab-fullbleed. */
    margin-top: 48px;
    margin-bottom: 48px;
}

/* The author band's thumbnail: a crop of the category's hero photo. */
.ab-hub-band__thumb {
    flex: 0 0 120px;
    height: 84px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 8px rgba(27, 52, 84, 0.12);
}

@media (max-width: 767px) {
    .ab-hub-band__thumb {
        display: none;
    }
}

.ab-hub-band__inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px 32px;
}

.ab-hub-band__text {
    flex: 0 1 250px;
}

.ab-hub-band__text .ab-hub-section__intro {
    margin-bottom: 0;
}

.ab-hub-band__authors {
    flex: 1 1 480px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 14px;
}

.ab-hub-author {
    width: 84px;
    text-align: center;
    color: var(--text);
    text-decoration: none;
    font-family: "Source Sans 3", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.ab-hub-author .ab-author-avatar {
    width: 68px;
    height: 68px;
    margin-bottom: 8px;
}

.ab-hub-band__more {
    margin-top: 0;
    white-space: nowrap;
}
