@charset "UTF-8";

:root {
    --color-bg: #cccccc;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text: #1a1a1a;
    --color-gray: #bdbdbd;
    --color-cream: #f8ebde;
    --color-accent: #a10404;
    --color-accent-border: #8c2c07;
    --color-accent-hover: #cf435b;
    --color-accent-hover-border: #a42037;
    --color-input-bg: #f9f8f8;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    --font-base: Georgia, serif;
    --fs-xs: 0.85rem;
    --fs-sm: 0.9rem;
    --fs-base: 1rem;
    --fs-md: 1.1rem;
    --fs-lg: 1.2rem;
    --fs-xl: 1.5rem;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-black);
    font-family: var(--font-base);
    font-size: var(--fs-base);
    overflow-wrap: break-word;
}

img {
    border: 0;
}

a {
    color: var(--color-black);
    text-decoration: none;
}

.page {
    width: 1320px;
    max-width: 100%;
    margin: 0 auto;
    background-color: var(--color-bg);
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    min-height: 90px;
    padding: 8px 16px;
    background: var(--color-bg) url("../../img/море4.jpg") center / cover no-repeat;
}

.header-brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-photo {
    flex: 0 0 auto;
}

.header-photo img {
    display: block;
    box-sizing: border-box;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid #f8ebde8a;
}

.header-title {
    color: var(--color-white);
    font-family: var(--font-base);
}

.header-title h1 {
    margin: 0;
    font-size: x-large;
    font-weight: normal;
    line-height: 1.2;
    color: var(--color-cream);
}

.header-subtitle {
    margin: 4px 0 0;
    color: var(--color-white);
    font-size: var(--fs-sm);
}

.header-links {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    display: flex;
    gap: 1.5em;
    font-size: var(--fs-sm);
    font-style: italic;
}

.header-links a {
    color: var(--color-white);
}

.site-nav {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.site-nav li {
    position: relative;
}

.site-nav a,
.site-nav .nav-txt {
    color: var(--color-white);
}

.site-nav .dot {
    margin: 0 0.35em;
    font-family: var(--font-base);
    color: var(--color-white);
}

.site-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    min-width: 250px;
    padding: 0;
    background-color: var(--color-bg);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
}

.site-nav .submenu li {
    display: block;
    white-space: nowrap;
}

.site-nav .submenu a {
    display: block;
    padding: 10px 16px;
    color: var(--color-text);
    transition: background-color 0.12s ease, color 0.12s ease;
}

.site-nav .submenu a:hover,
.site-nav .submenu a:focus {
    background-color: var(--color-gray);
    color: var(--color-black);
}

.site-nav li:hover > .submenu,
.site-nav li:focus-within > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.intro {
    box-sizing: border-box;
    width: 100%;
    max-width: 709px;
    margin: 0 auto;
    padding: 0 40px;
    font-family: var(--font-base);
    font-size: var(--fs-lg);
}

.intro p {
    margin: 0 0 12px;
    text-indent: 3em;
    text-align: justify;
}

.intro .intro__signature {
    margin-top: 24px;
    font-style: italic;
}

.books {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    width: 100%;
    margin: 60px auto 0;
    background-color: var(--color-bg);
    border: 4px solid var(--color-bg);
}

.books img {
    width: 100%;
}

.book {
    min-width: 0;
}

.book-cover {
    display: block;
    max-width: 100%;
}

.book-title {
    display: block;
    margin-top: 10px;
    color: #090909;
}

.book-name {
    display: block;
}

.book-genre {
    display: block;
    margin-top: 12px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 8px !important;
}

.mb-2 {
    margin-bottom: 16px !important;
}

.mb-3 {
    margin-bottom: 24px !important;
}

.mb-4 {
    margin-bottom: 32px !important;
}

.ti-0 {
    text-indent: 0 !important;
}

.content-center {
    margin: 0 auto;
    text-align: justify;
}

img.content-center {
    display: block;
    max-width: 100%;
    height: auto;
}

.text-center {
    text-align: center !important;
}

b.text-center {
    display: block;
}

.fs-large {
    font-size: var(--fs-xl);
}

.text-underline {
    text-decoration: underline;
}

footer {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 16px 12px;
    border-top: 3px solid var(--color-black);
    font-size: var(--fs-sm);
    text-align: left;
}

footer p {
    margin: 4px 0;
}

footer a {
    color: var(--color-black);
}

main {
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: 24px 40px;
    line-height: 1.6;
}

main h2 {
    margin: 0 0 16px;
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 122px;
}

main h3 {
    margin: 24px 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

main p {
    margin: 0 0 8px;
    text-align: justify;
}

main p:last-child {
    margin-bottom: 0;
}

main ul {
    margin: 0 0 12px;
    padding-left: 24px;
}

main a {
    color: #1a4b8c;
}

.comment-form {
    max-width: 600px;
    margin: 0 auto 24px;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-base);
    font-size: var(--fs-base);
    padding: 8px;
    border: 1px solid var(--color-gray);
}

.comment-form textarea {
    resize: vertical;
}

.comment-form input[type="submit"] {
    font-family: var(--font-base);
    font-size: var(--fs-base);
    padding: 10px 24px;
    background-color: var(--color-input-bg);
    color: var(--color-accent);
    border: 1px solid var(--color-accent-border);
    cursor: pointer;
}

.comment-form input[type="submit"]:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover-border);
    color: var(--color-white);
}

article hr {
    border: none;
    border-top: 1px solid #dcdcdc;
    margin: 16px 0;
}

.layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.content-fw {
    max-width: none;
    margin: 0;
}

.sidebar {
    position: sticky;
    top: 122px;
    background-color: var(--color-bg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar a {
    display: block;
    padding: 10px 16px;
    color: var(--color-text);
    line-height: 1.35;
}

.sidebar a:hover,
.sidebar a:focus {
    background-color: var(--color-gray);
    color: var(--color-black);
}

article {
    box-sizing: border-box;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 45px;
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.product {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 360px 1fr;
    column-gap: 0;
    row-gap: 24px;
    align-items: start;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-cover img,
.product-cover-img,
.product-spread {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.product-name {
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.3;
}

.product-price {
    font-weight: 600;
}

.product-action {
    text-align: center;
}

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

    .product-images {
        max-width: 360px;
        margin: 0 auto;
    }

    .product-right {
        max-width: 100%;
    }
}

.poem {
    font-family: var(--font-base);
    white-space: pre-wrap;
    line-height: 1.6;
    margin: 0;
}

.poem-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poem-inner p {
    text-align: justify;
}

.btn-ens-style,
.book-buy-btn {
    font-family: var(--font-base) !important;
    font-size: var(--fs-base) !important;
    padding: 10px 24px !important;
    background-color: var(--color-input-bg) !important;
    color: var(--color-accent) !important;
    border: 1px solid var(--color-accent-border) !important;
    cursor: pointer !important;
    display: inline-block;
}

.btn-ens-style:hover,
.btn-ens-style:focus,
.book-buy-btn:hover,
.book-buy-btn:focus {
    background-color: var(--color-accent-hover) !important;
    border-color: var(--color-accent-hover-border) !important;
    color: var(--color-white) !important;
}

@media (max-width: 900px) {
    header {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .header-brand {
        width: 100%;
        justify-content: center;
    }

    .header-links {
        align-self: auto;
        margin-top: 8px;
    }

    .site-nav {
        align-self: auto;
        width: 100%;
    }

    .site-nav > ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav li {
        padding: 4px 0;
    }

    .site-nav .dot {
        display: none;
    }

    .site-nav .submenu {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        min-width: 0;
        margin-top: 4px;
        padding: 0;
        background: none;
        box-shadow: none;
        overflow: visible;
    }

    .site-nav .submenu a {
        padding: 0;
        color: var(--color-white);
    }

    .site-nav .submenu a:hover,
    .site-nav .submenu a:focus {
        background: none;
    }

    main h2 {
        scroll-margin-top: 0;
    }

    .intro {
        padding: 0 16px;
    }

    .sidebar {
        position: static;
        top: auto;
    }

    main {
        padding: 20px 16px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    article {
        padding: 24px;
    }

    .books {
        margin-top: 40px;
    }
}

@media (max-width: 640px) {
    .books {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }
}

#easynetshop-cart-default {
    display: none;
}

div#enscart_wrapper {
    top: 140px;
    right: 50px;
}

@media (max-width: 768px) {
    div#enscart_wrapper {
        top: auto;
        right: 16px;
        bottom: 16px;
    }

    .easynetshop-bodyhide .easynetshop-modalcontainer {
        display: flex !important;
    }

    .easynetshop-modalcontainer .easynetshop-modal {
        margin: auto;
        width: calc(100% - 20px);
        max-width: 600px;
    }
}

.book-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(420px, 1fr) minmax(0, 280px);
    column-gap: 24px;
    align-items: start;
}

.book-side,
.book-card {
    min-width: 0;
}

.book-side .book-cover img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
}

.book-card {
    background-color: var(--color-white);
    padding: 24px;
}

.book-title {
    margin: 0 0 8px;
    font-size: var(--fs-md);
    font-weight: normal;
    line-height: 1.3;
}

.book-card p {
    margin: 0 0 8px;
    text-align: justify;
}

.book-card p:last-child {
    margin-bottom: 0;
}

.book-essays p {
    text-indent: 1.5em;
    text-align: justify;
}

.book-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.book-card li {
    margin: 0 0 6px;
    line-height: 1.4;
    font-size: var(--fs-sm);
}

.book-card ul ul {
    padding-left: 18px;
    margin-top: 6px;
}

.book-card ul ul li {
    font-size: var(--fs-xs);
}

.book-card .book-link {
    display: block;
    margin: 0 0 12px;
    font-size: var(--fs-xs);
    color: #555555;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.book-end {
    margin: 20px 0 0;
    font-style: italic;
}

.top-link {
    margin: 24px 0 8px;
    text-align: left;
}

.top-link a {
    color: var(--color-black);
    text-decoration: underline;
}

.book-card p,
.book-card li {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.book-product {
    max-width: 322px;
}

.book-product-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.book-buy-list {
    display: flex;
    gap: 4px;
    margin-top: 16px;
}

.book-buy {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 16px 8px;
    text-align: center;
}

.book-buy:first-child {
    background-color: #e5e5e5;
}

.book-buy:last-child {
    background-color: #d8d8d8;
}

.book-buy-price {
    font-size: var(--fs-lg);
    font-weight: 600;
}

@media (max-width: 900px) {
    .book-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 400px) {
    .book-card {
        padding: 16px;
    }
}
