/*
Theme Name: AVA Books
Description: Κατάλογος βιβλίων AVA Books (Βιβλιοφόρος).
Version: 0.1.0
Text Domain: avabooks
*/

/* ponytail: one stylesheet. Split it when it stops fitting on a screen. */

:root {
    --ava-text: #222;
    --ava-muted: #555;
    --ava-rule: #9a9a9a;
    --ava-page: #fff;
    --ava-hero-fallback: #f5a623;
    --ava-col: 940px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ava-page);
    color: var(--ava-text);
    font: 15px/1.55 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* The header and footer run edge to edge; the content column between them carries the
   vertical rules. Matches the Figma, where the outer lines are just the browser frame. */

.wrap { max-width: var(--ava-col); margin: 0 auto; padding: 0 28px; }

.site-main {
    /* flex: 1 pins the footer to the bottom on short pages and runs the column rules down to it. */
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--ava-col);
    margin: 0 auto;
    border-left: 1px solid var(--ava-rule);
    border-right: 1px solid var(--ava-rule);
}

/* ---- header ---- */

.site-header { border-bottom: 1px solid var(--ava-rule); }

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-logo { display: block; text-decoration: none; }
.site-logo img { width: 110px; height: auto; }

.site-nav ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.site-nav a { text-decoration: none; }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { font-weight: 700; }

/* ---- shared band ---- */

.band { padding: 26px 28px; border-bottom: 1px solid var(--ava-rule); }
.site-main > :last-child { border-bottom: 0; }

/* ---- hero ---- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    border-bottom: 1px solid var(--ava-rule);
}

.hero-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
    background: var(--ava-hero-fallback);
}

.hero-cover img { max-height: 340px; width: auto; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }

.hero-body {
    padding: 30px 34px;
    font-size: 13.5px;
    color: var(--ava-muted);
}

.hero-body p { margin: 0 0 14px; }

/* ---- buttons ---- */

.btn {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #bdbdbd;
    background: #fff;
    color: var(--ava-text);
    font-size: 12.5px;
    text-decoration: none;
}

.btn:hover { border-color: #8a8a8a; }

.hero-body .actions { margin: auto 0 0; text-align: right; }
.hero-body { display: flex; flex-direction: column; }

/* ---- catalog rows ---- */

.catalog-row {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    border-bottom: 1px solid var(--ava-rule);
}

/* ---- single book details ---- */

.book-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; font-size: 13px; }
.book-meta dl { margin: 0; }
.book-meta div { display: flex; gap: 6px; margin-bottom: 4px; }
.book-meta dt { font-weight: 700; }
.book-meta dd { margin: 0; color: var(--ava-muted); }
.book-meta .woocommerce-Price-amount { color: inherit; }

.pagination { display: flex; gap: 16px; font-size: 13px; }

/* ---- carousel of covers ---- */
/* ponytail: native overflow scrolling + scroll-snap. No JS, no carousel library.
   Add arrow buttons only if the owner asks — the swipe/trackpad gesture is already there. */

.cover-row {
    display: flex;
    gap: 14px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--ava-rule);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 28px;
    scrollbar-width: thin;
}

.cover-row a {
    display: block;
    flex: 0 0 calc((100% - 5 * 14px) / 6);
    padding: 10px;
    background: var(--ava-hero-fallback);
    scroll-snap-align: start;
}

.cover-row img { width: 100%; }

/* ---- newsletter ---- */

/* The rule belongs to the newsletter, not to the block above it, so the free space sits
   above the line rather than between the line and the input. */
.newsletter { margin-top: auto; border-top: 1px solid var(--ava-rule); padding-top: 18px; }
.site-main > :has(+ .newsletter) { border-bottom: 0; }
.newsletter > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.newsletter p { margin: 0 auto 10px; font-size: 13px; }
.newsletter b { font-weight: 700; }
.newsletter input[type="email"] {
    display: block;
    width: 100%;
    padding: 9px 11px;
    font: inherit;
    font-size: 13px;
    border: 1px solid #bdbdbd;
    background: #fff;
}

/* ---- MailerLite form, restyled to the design ---- */
/* Figma shows a bare field, but a visible submit is a deliberate departure — most visitors
   won't think to press Enter. The label stays hidden; the heading above the field does its job. */

.newsletter .mailerlite-form-title,
.newsletter .mailerlite-form-description:empty { display: none; }

.newsletter .mailerlite-form-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.newsletter .mailerlite-subscribe-button-container { margin-top: 10px; }

.newsletter .mailerlite-subscribe-submit {
    padding: 7px 16px;
    border: 1px solid #bdbdbd;
    background: #fff;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.newsletter .mailerlite-form-loader,
.newsletter .mailerlite-form-response { font-size: 13px; color: var(--ava-muted); }
.newsletter .mailerlite-form-response h4 { font-size: 13px; font-weight: 400; margin: 0; }
.newsletter .mailerlite-form-response p { margin: 0; }
.newsletter .mailerlite-form-error { display: block; margin-top: 6px; font-size: 12px; color: #c0392b; }
.newsletter .consent { margin: 12px 0 0; font-size: 11.5px; color: var(--ava-muted); }

/* ---- page ---- */

.page-body h1 { font-size: 15px; margin: 0 0 16px; }
.page-body p { margin: 0 0 14px; font-size: 13.5px; color: var(--ava-muted); }
.page-illustration img { margin-left: auto; max-width: 240px; }

/* ---- 404 ---- */

.not-found h1 { font-size: 17px; margin: 0 0 10px; }
.not-found p { margin: 0 0 14px; font-size: 13.5px; color: var(--ava-muted); }
.not-found .actions { display: flex; gap: 12px; margin: 20px 0 0; }

/* ---- footer ---- */

.site-footer { border-top: 1px solid var(--ava-rule); padding: 26px 0 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.footer-links ul { margin: 0; padding: 0; list-style: none; text-align: right; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: 11px; color: var(--ava-muted); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; font-size: 11px; line-height: 1.5; color: var(--ava-muted); margin: 12px 0 16px; }
.site-footer .imprint { font-size: 11px; color: var(--ava-muted); margin: 0; }

@media (max-width: 800px) {
    .hero, .catalog-row, .book-meta { grid-template-columns: 1fr; }
    .site-footer .wrap { flex-direction: column; gap: 20px; }
    .footer-links ul { text-align: left; }
    .cover-row a { flex-basis: calc((100% - 2 * 14px) / 3); }
}
