:root {
    --cream-50: #fbf7ef;
    --cream-100: #f5eee0;
    --cream-200: #ebdfc7;
    --cream-300: #ddcca9;
    --ink: #2f2a21;
    --ink-soft: #776b59;
    --border: #e4d6b8;
    --gold: #c19a49;
    --terracotta: #bf6a4d;
    --olive: #74804f;
    --deep-ink: #241f18;
    --surface: #fffdf8;
    --shadow: 0 10px 30px -12px rgba(47, 42, 33, 0.18);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--cream-100);
    color: var(--ink);
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    flex: 1;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--deep-ink);
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    gap: 28px;
    font-weight: 500;
}

.main-nav a {
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover {
    color: var(--terracotta);
    border-color: var(--terracotta);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* ---------- Shared page hero ---------- */
.books-hero {
    text-align: center;
    padding: 24px 0 48px;
}

.books-hero__eyebrow {
    display: inline-block;
    color: var(--terracotta);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.books-hero__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--deep-ink);
    margin: 0 0 12px;
    font-weight: 800;
}

.books-hero__subtitle {
    color: var(--ink-soft);
    margin: 0 auto;
    max-width: 52ch;
}

/* ---------- Shared pill button ---------- */
.buy-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--terracotta);
    color: #fff;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 999px;
    box-shadow: 0 12px 24px -10px rgba(191, 106, 77, 0.6);
    margin-top: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.buy-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.buy-button:hover {
    background: #a8593e;
    transform: translateY(-2px);
}

.buy-button--outline {
    background: transparent;
    color: var(--terracotta);
    border: 1.5px solid var(--terracotta);
    box-shadow: none;
}

.buy-button--outline:hover {
    background: var(--cream-200);
    color: var(--terracotta);
}

.payment-note {
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin: 6px 0 0;
}

.payment-error {
    color: #a8342a;
    background: #fbe6e2;
    border: 1px solid #eac2ba;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin: 0 0 4px;
}

/* Generic content on non-redesigned pages */
main h1 {
    font-size: 2rem;
    color: var(--deep-ink);
}

main p {
    color: var(--ink-soft);
    max-width: 70ch;
}
