@charset "UTF-8";
/* ── Fonts ──────────────────────────────────────────────── */
@font-face {
    font-family: 'Cinzel';
    src: url('https://www.kerss.nl/home/fonts/Cinzel-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('https://www.kerss.nl/home/fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('https://www.kerss.nl/home/fonts/CormorantGaramond-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ── Design Tokens ──────────────────────────────────────── */
:root {
    --bg:             #f0ead8;
    --bg-texture:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    --surface:        #fffef9;
    --surface-warm:   #fdf8ee;
    --surface-mid:    #f7f0e0;
    --border:         #ddd3be;
    --border-strong:  #c9b99e;
    --border-accent:  #a07840;

    --text:           #1e1710;
    --text-soft:      #3a2e22;
    --muted:          #6b5e4c;
    --muted-soft:     #8a7b69;

    --accent:         #8b3a2a;
    --accent-dark:    #6e2d1f;
    --accent-gold:    #b8892a;
    --accent-gold-lt: #d4a83e;

    --shadow-card:    0 2px 8px rgba(30,23,16,.06), 0 8px 28px rgba(30,23,16,.08);
    --shadow-hover:   0 6px 20px rgba(30,23,16,.12), 0 20px 48px rgba(30,23,16,.10);
    --shadow-inset:   inset 0 1px 3px rgba(30,23,16,.06);

    --radius:         16px;
    --radius-sm:      10px;
    --container:      1380px;

    --rule: linear-gradient(90deg, transparent, var(--border-accent) 20%, var(--border-accent) 80%, transparent);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    background-image: var(--bg-texture);
    color: var(--text);
    font-family: 'Cormorant Garamond', Georgia, serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

/* ── Page Layout ────────────────────────────────────────── */
.catalog-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    position: relative;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.4vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--text);
    text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

.hero p {
    margin: 6px auto 0;
    max-width: 720px;
    font-size: 0.98rem;
    line-height: 1.45;
    color: var(--muted);
    font-style: italic;
}

/* ── Controls Shell ─────────────────────────────────────── */
.controls-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    margin-bottom: 22px;
    position: relative;
}

.controls-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Search Form ────────────────────────────────────────── */
.search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.search-field {
    position: relative;
}

.search-field input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
    color: var(--text);
    padding: 0 18px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    outline: none;
    box-shadow: var(--shadow-inset);
    transition: border-color .2s, box-shadow .2s;
}

.search-field input::placeholder {
    color: var(--muted-soft);
    font-style: italic;
}

.search-field input:focus {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-inset), 0 0 0 3px rgba(184,137,42,.12);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    height: 52px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    padding: 0 22px;
    background: var(--surface-warm);
    color: var(--text-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(30,23,16,.06);
}

.btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(30,23,16,.10);
}

.btn-primary {
    background: var(--text);
    color: #f5ead0;
    border-color: var(--text);
    letter-spacing: 0.1em;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #f5ead0;
}

/* ── Toolbar ────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-count {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text);
}

.result-query {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.sort-wrap,
.view-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-label {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    color: var(--muted);
    white-space: nowrap;
    text-transform: uppercase;
}

.toolbar select {
    appearance: none;
    height: 44px;
    min-width: 200px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
    color: var(--text);
    padding: 0 38px 0 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 18px,
        calc(100% - 10px) 18px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-inset);
    transition: border-color .2s;
}

.toolbar select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-inset), 0 0 0 3px rgba(184,137,42,.12);
}

/* ── Back link (onderwerpen) ────────────────────────────── */
.topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.back-link {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--muted);
}

.back-link:hover {
    color: var(--accent-dark);
}

/* ── View Toggle ────────────────────────────────────────── */
.view-toggle {
    display: inline-flex;
    background: var(--surface-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    box-shadow: var(--shadow-inset);
}

.view-toggle button {
    border: 0;
    background: transparent;
    color: var(--muted);
    min-width: 42px;
    height: 36px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1rem;
    transition: all .18s ease;
}

.view-toggle button[aria-pressed="true"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 5px rgba(30,23,16,.08);
}

.view-toggle button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184,137,42,.18);
}

/* ── Grid / List containers ─────────────────────────────── */
.grid,
.list {
    display: none;
}

.grid.active,
.list.active {
    display: block;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    gap: 22px;
    justify-content: center;
    justify-items: center;
    align-items: stretch;
}

.grid-container .book-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
}

/* ── Book Card ──────────────────────────────────────────── */
.book-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    position: relative;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.8) 30%, rgba(255,255,255,.8) 70%, transparent);
    z-index: 1;
    pointer-events: none;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-accent);
}

.book-card a,
.book-row a {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* ── Cover wrap ─────────────────────────────────────────── */
.book-cover {
    position: relative;
}

.grid .cover-wrap {
    aspect-ratio: 3 / 4;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.grid .cover-wrap::after {
    display: none;
}

.grid .cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    filter: none;
    box-shadow: none;
    transition: none;
}

.book-card:hover .cover-wrap img {
    transform: none;
    filter: none;
}

/* ── Image count badge ──────────────────────────────────── */
.image-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(30,23,16,.72);
    backdrop-filter: blur(4px);
    color: #f5ead0;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    padding: 5px 9px;
    border-radius: 999px;
    z-index: 3;
    pointer-events: none;
}

/* ── Card body ──────────────────────────────────────────── */
.card-body {
    padding: 18px 18px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.32rem;
    line-height: 1.16;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.grid .title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.4em;
}

.author,
.meta,
.note {
    font-family: 'Cormorant Garamond', serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-variant: normal !important;
}

.author {
    font-style: italic;
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.grid .author {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.meta {
    font-size: 0.94rem;
    color: var(--muted-soft);
    line-height: 1.4;
    margin-bottom: 4px;
    font-style: normal;
}

.grid .meta {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.description {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.98rem;
    line-height: 1.52;
    color: #504335;
}

.grid .description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    min-height: 6.1em;
}

/* ── Card footer ────────────────────────────────────────── */
.card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.price {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-dark);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.booknumber,
.isbn {
    font-size: 0.84rem;
    color: var(--muted-soft);
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
}

.booknumber {
    text-align: right;
}

/* ── List view ──────────────────────────────────────────── */
.list.active {
    display: grid;
    gap: 18px;
}

.book-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.book-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-accent);
}

.book-row a {
    display: grid;
    grid-template-columns: 180px 1fr;
    flex: unset;
    flex-direction: unset;
}

.book-row .book-thumb .cover-wrap {
    height: 100%;
    min-height: 250px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.book-row .book-thumb .cover-wrap::after {
    display: none;
}

.book-row .book-thumb img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
    filter: none;
    box-shadow: none;
    transition: none;
}

.book-row:hover .book-thumb img {
    transform: none;
}

.row-body {
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.list .title {
    font-size: 1.7rem;
    line-height: 1.1;
    margin-bottom: 4px;
}

.list .author {
    font-size: 1rem;
    margin-bottom: 6px;
}

.list .meta {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 10px;
}

.list .description {
    font-size: 1rem;
    line-height: 1.55;
    max-width: 90ch;
}

.note {
    margin-top: 10px;
    padding: 4px 0 4px 10px;
    background: transparent;
    border: 0;
    border-left: 2px solid #d8ccb4;
    border-radius: 0;
    color: #8a7b69;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.42;
    max-width: 90%;
}

.row-footer {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.row-left,
.row-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: center;
    padding: 70px 22px;
}

.empty-state::before {
    content: '✦';
    display: block;
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 14px;
}

.empty-state h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    font-size: 1rem;
    font-style: italic;
}

.empty-state .actions {
    margin-top: 22px;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination-block {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    transition: all .18s ease;
    box-shadow: 0 1px 3px rgba(30,23,16,.05);
}

.pagination a:hover {
    border-color: var(--accent-gold);
    color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30,23,16,.10);
}

.pagination a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184,137,42,.18);
}

.pagination .current {
    background: var(--text);
    color: #f5ead0;
    border-color: var(--text);
    font-weight: 700;
}

.page-arrow {
    font-size: 1.2rem !important;
}

.page-status {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    color: var(--muted);
}

/* ── Accessibility ──────────────────────────────────────── */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 980px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .book-row a {
        grid-template-columns: 1fr;
    }

    .book-row .book-thumb .cover-wrap {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        min-height: 280px;
    }

    .note {
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    .catalog-page {
        padding: 20px 14px 50px;
    }

    .controls-shell {
        padding: 14px 16px;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .card-body {
        padding: 14px 14px 13px;
    }

    .title {
        font-size: 1.22rem;
    }

    .toolbar-right {
        gap: 12px;
    }

    .sort-wrap,
    .view-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar select {
        min-width: 0;
        width: 100%;
    }

    .list .title {
        font-size: 1.45rem;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }

    .btn {
        width: 100%;
    }

    .search-form {
        gap: 10px;
    }

    .card-footer,
    .row-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .booknumber {
        text-align: left;
    }

    .row-body {
        padding: 16px 16px 18px;
    }

    .list .description {
        max-width: none;
    }
}
.cover-wrap {
    position: relative;
}

.cover-hover-cta {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%) translateY(6px);
    background: rgba(30,23,16,.78);
    color: #f5ead0;
    padding: 8px 12px;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 4;
}

.book-card:hover .cover-hover-cta {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.row-cta {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    transform: translateY(4px);
    transition: all .18s ease;
}

.book-row:hover .row-cta {
    opacity: 1;
    transform: translateY(0);
    color: var(--accent-dark);
}