html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "JetBrains Mono", monospace;
    font-size: 16px;
    line-height: 1.5;
    background-color: #fff;
    color: #333;

    display: flex;
    flex-direction: column;
}

*, *::before, *::after {
    box-sizing: border-box;
}

header {
    height: 92px;
    align-items: center;
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 4px solid #555;
    flex-shrink: 0;
    margin-bottom: 36px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
}
.logo a {
    text-decoration: none;
    color: inherit;
}
.logo a:hover {
    text-decoration: underline;
}

.tags {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 500;
}
.tags--header {
    margin-left: auto;
}
.tags a {
    text-decoration: none;
    color: inherit;
}
.tags a:hover {
    text-decoration: underline;
}
.tags__separator {
    width: 2px;
    height: 24px;
    background: #ccc;
}

footer {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 4px solid #555;
    text-align: center;
    padding: 24px 0;
    font-size: 12px;
    color: #888;
    margin-top: 36px;
}

main {
    flex-grow: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 40px;
}
.page-header__title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}
.page-header__description {
    margin: 8px 0 0 0;
    font-size: 14px;
}

.book-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 0;
    margin: 0;
}
.book-list > li {
    list-style: none;
}

.book-card__image img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, .15),
        0 1px 8px rgba(0, 0, 0, .15);
}
.book-card__caption {
    font-size: 14px;
    font-weight: 500;
}
.book-card__caption a {
    text-decoration: none;
    color: inherit;
}
.book-card__caption a:hover {
    text-decoration: underline;
}
.book-card__divider {
    color: #ccc;
}
.book-card__author {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
}
.book-card__author:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    vertical-align: middle;
    box-shadow: inset 0 -1px currentColor;
    opacity: .7;
}

.pagination {
    margin-top: 36px;
    margin-bottom: 36px;
}
.pagination ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 8px;
}
.pagination li {
    list-style: none;
}
.pagination a,
.pagination span {
    display: block;
    border-radius: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
}
.pagination a:hover {
    text-decoration: underline;
}
.pagination span {
    background: #eee;
    font-weight: bold;
}


.product {
    display: flex;
    gap: 40px;
}
.product__image {
    width: 360px;
    flex-shrink: 0;
}
.product__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, .15),
        0 1px 8px rgba(0, 0, 0, .15);
}
.product__caption {
    font-size: 20px;
    font-weight: 500;
}
.product__name {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
    display: inline;
}
.product__divider {
    color: #ccc;
}

.product__authors {
    margin-top: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
}
.product__authors:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    vertical-align: middle;
    box-shadow: inset 0 -1px currentColor;
    opacity: .7;
}

.product__description {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 16px;
}

.product__meta {
    background: #f2f2f2;
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin: 20px 0;
}
.product__meta li {
    list-style: none;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}
.product__meta li:last-child {
    margin-bottom: 0;
}
.product__meta li:before {
    content: '';
    display: block;
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: #ccc;
    top: 6px;
    left: 0;
}

.product__hashtags {
    margin: 20px 0 0 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}
.product__hashtags a {
    text-decoration: none;
    color: #0076C5;
}
.product__hashtags a:hover {
    text-decoration: underline;
}


.book-section {
    margin: 48px 0 36px 0;
}
.book-section__title {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 20px 0;
}


.all-tags {
    margin: 0 0 36px 0;
}
.all-tags__group {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    row-gap: 32px;
}
.all-tags__letter {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
}
.all-tags__list {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.7;
}
.all-tags a {
    text-decoration: none;
    color: inherit;
}
.all-tags a:hover {
    text-decoration: underline;
}