:root {
    --ink: #20231f;
    --muted: #777b70;
    --paper: #f5f4ef;
    --cream: #e8e2d3;
    --red: #a94b35;
    --line: #d8d8ce;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
.site-header {
    height: 78px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 6vw;
    gap: 55px;
    background: rgba(245, 244, 239, 0.92);
}
.logo {
    font:
        700 25px "Playfair Display",
        serif;
    display: flex;
    align-items: center;
    gap: 9px;
}
.logo-img {
    height: 42px;
}
.logo span {
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    height: 32px;
    width: 32px;
    text-align: center;
    line-height: 36px;
    font-style: italic;
}
.site-header nav {
    display: flex;
    gap: 29px;
    font-size: 14px;
    color: var(--muted);
}
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}
.cart-link b {
    background: var(--red);
    color: white;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 11px;
}
.button {
    border: 0;
    padding: 12px 19px;
    display: inline-block;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.button.dark {
    background: var(--ink);
    color: white;
}
.button.ghost {
    border: 1px solid var(--line);
    padding: 9px 13px;
}
.text-button {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
}
.flash {
    max-width: 1120px;
    margin: 22px auto 0;
    padding: 12px 17px;
    font-size: 14px;
}
.success {
    background: #e3eee1;
    color: #315f38;
}
.error {
    background: #f6dfda;
    color: #8d382b;
}
.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 95px 0 90px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    min-height: 490px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
}
.hero h1,
.simple-page h1,
.admin-page h1 {
    font:
        700 clamp(48px, 6vw, 78px)/1.03 "Playfair Display",
        serif;
    margin: 20px 0;
}
.hero h1 em,
.simple-page h1 em,
.admin-page h1 em {
    color: var(--red);
    font-style: normal;
}
.hero-copy {
    max-width: 420px;
    color: var(--muted);
    line-height: 1.7;
}
.search {
    margin-top: 31px;
    display: flex;
    max-width: 390px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 10px;
}
.search input {
    border: 0;
    background: none;
    flex: 1;
    font: inherit;
    outline: 0;
}
.search button {
    border: 0;
    background: none;
    font-size: 24px;
}
.hero-art {
    margin: auto;
    width: 250px;
    height: 280px;
    background: var(--cream);
    position: relative;
    transform: rotate(4deg);
    display: flex;
    align-items: end;
    justify-content: center;
    padding-bottom: 27px;
    color: var(--red);
    font: 700 24px/1 "Playfair Display";
    letter-spacing: 5px;
}
.sun {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--red);
    top: 25px;
    left: 50px;
    opacity: 0.9;
}
.hero-art span {
    z-index: 1;
}
.catalog,
.admin-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 65px 0 100px;
}
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}
.section-heading h2 {
    font: 700 35px "Playfair Display";
    margin: 8px 0;
}
.section-heading > span {
    font-size: 13px;
    color: var(--muted);
}
.catalog-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    padding-top: 35px;
}
aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
}
aside a {
    color: var(--muted);
}
aside a:first-of-type {
    color: var(--ink);
    font-weight: 700;
}
aside small {
    float: right;
}
.book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px 22px;
}
.cover {
    background: var(--cream);
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cover-img {
    max-width: 50px;
    max-height: 70px;
}
.cover span {
    font: 700 70px "Playfair Display";
    color: var(--red);
}
.book-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--red);
    margin: 16px 0 7px;
}
.book-card h3 {
    font: 600 19px "Playfair Display";
    margin: 0;
}
.author {
    color: var(--muted);
    font-size: 13px;
}
.book-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 17px;
    font-size: 14px;
}
.add-button {
    border: 1px solid var(--ink);
    background: none;
    border-radius: 50%;
    height: 27px;
    width: 27px;
    font-size: 20px;
    cursor: pointer;
}
.detail {
    max-width: 900px;
    margin: 80px auto;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 75px;
}
.detail-info h1 {
    font: 700 55px/1.05 "Playfair Display";
    margin: 18px 0;
}
.description {
    color: var(--muted);
    line-height: 1.7;
    margin: 35px 0;
}
.price {
    font-size: 21px;
    display: block;
    margin-bottom: 9px;
}
.stock {
    color: var(--red);
    font-size: 13px;
}
.simple-page {
    max-width: 940px;
    margin: 0 auto;
    padding: 100px 0;
    min-height: 570px;
}
.simple-page > p:not(.eyebrow) {
    max-width: 540px;
    color: var(--muted);
    line-height: 1.8;
}
.contact-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
}
.form-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #ebe9e0;
    padding: 28px;
}
.form-card input,
.form-card textarea,
.form-card select,
.cart-row input {
    padding: 13px;
    border: 1px solid var(--line);
    background: var(--paper);
    font: inherit;
}
.form-row {
    display: flex;
    gap: 12px;
}
.form-row > * {
    width: 50%;
}
.file-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
.file-field input {
    padding: 10px;
}
.file-field small {
    font-size: 11px;
}
.cover-preview {
    width: 120px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--cream);
}
.cart-row {
    display: grid;
    grid-template-columns: 70px 1fr 150px 140px 70px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.cart-cover {
    height: 85px;
}
.cart-row h3 {
    font: 18px "Playfair Display";
    margin: 0;
}
.cart-row .text-button {
    color: var(--red);
    font-size: 12px;
}
footer {
    border-top: 1px solid var(--line);
    padding: 30px 6vw;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}
footer strong {
    font: 18px "Playfair Display";
    color: var(--ink);
}
.admin-page h1 {
    font-size: 56px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 55px;
}
.stats > div {
    border-top: 3px solid var(--red);
    padding: 22px;
    background: #ebe9e0;
}
.stats small {
    display: block;
    color: var(--muted);
}
.stats strong {
    display: block;
    font: 52px "Playfair Display";
    margin: 20px 0;
}
.stats a {
    font-size: 13px;
}
.narrow {
    max-width: 700px;
}
.table-wrap {
    overflow: auto;
    background: #ebe9e0;
    margin-top: 30px;
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}
th,
td {
    text-align: left;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
th {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
}
td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}
.inline {
    display: inline;
}
.inline button,
td a {
    border: 0;
    background: none;
    color: var(--red);
    cursor: pointer;
    font: inherit;
    margin-left: 8px;
}
@media (max-width: 760px) {
    .site-header {
        padding: 0 20px;
        gap: 18px;
    }
    .site-header nav {
        display: none;
    }
    .header-actions {
        gap: 9px;
    }
    .hero,
    .catalog,
    .admin-page,
    .simple-page {
        padding: 55px 20px;
    }
    .hero {
        display: block;
    }
    .hero-art {
        margin: 55px auto 0;
    }
    .catalog-layout,
    .contact-page,
    .detail {
        display: block;
    }
    .catalog aside {
        margin-bottom: 30px;
    }
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px 14px;
    }
    .detail {
        margin: 45px 20px;
    }
    .detail-cover {
        max-width: 280px;
        margin: auto;
    }
    .detail-info {
        margin-top: 35px;
    }
    .detail-info h1 {
        font-size: 42px;
    }
    .cart-row {
        grid-template-columns: 55px 1fr;
        gap: 10px;
    }
    .cart-row form,
    .cart-row > strong {
        grid-column: 2;
    }
    footer {
        display: block;
        padding: 25px 20px;
    }
    footer > * {
        display: block;
        margin: 7px 0;
    }
    .stats {
        grid-template-columns: 1fr;
    }
    .admin-page h1 {
        font-size: 44px;
    }
}
