.store-header {
    position: relative;
    z-index: 20;
}

.main-menu a.is-active {
    color: #f2c15b;
    border-bottom-color: #f2c15b;
}

.store-title-bar {
    padding-top: 16px;
    padding-bottom: 18px;
    background: #0f3b2e;
    color: #ffffff;
    text-align: center;
}

.store-title-bar h1 {
    margin: 0;
    color: #f2c15b;
    font-size: 34px;
    line-height: 1.15;
}

.store-content {
    min-height: 58vh;
}

.store-message {
    padding: 28px;
    border-radius: 14px;
    background: #ffffff;
    color: #12382d;
    text-align: center;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}

.store-message-error {
    border-left: 5px solid #a52a2a;
    color: #7a2020;
}

.featured-book {
    width: 100%;
}

.featured-book-main {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.8fr);
    gap: 54px;
    align-items: start;
    padding: 0;
}

.featured-cover {
    position: sticky;
    top: 24px;
    text-align: center;
}

.featured-image-link {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 12px;
    cursor: zoom-in;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.featured-image-link img {
    display: block;
    width: auto;
    max-width: 100%;
    min-height: 200px;
    max-height: 480px;
    border-radius: 12px;
    object-fit: contain;
}

.image-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    border-radius: 30px;
    background: rgba(15, 59, 46, 0.9);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.cover-placeholder,
.card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e4da;
    color: #6f6758;
    font-weight: 700;
}

.cover-placeholder {
    width: 100%;
    min-height: 320px;
    border-radius: 12px;
}

.featured-details h2 {
    margin-bottom: 8px;
    text-align: left;
}

.featured-author {
    margin-bottom: 18px;
    color: #6c6253;
    font-size: 21px;
    font-style: italic;
}

.book-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 30px;
    margin: 0;
}

.book-facts > div {
    display: grid;
    grid-template-columns: minmax(125px, 0.8fr) minmax(0, 1.2fr);
    gap: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #e7e2d7;
}

.book-facts .fact-wide {
    grid-column: 1 / -1;
    grid-template-columns: minmax(125px, 0.37fr) minmax(0, 1.63fr);
}

.book-facts dt {
    color: #5f594e;
    font-weight: 700;
}

.book-facts dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.availability {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
}

.is-available {
    background: #dff1e6;
    color: #176038;
}

.is-unavailable {
    background: #f5dede;
    color: #8b2525;
}

.genre-value {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 30px;
    background: #fff1b8;
    color: #6d5600;
    font-weight: 600;
}

.goodreads-link {
    color: #245c44;
    font-weight: 700;
    text-underline-offset: 3px;
}

.goodreads-link:hover {
    color: #e67e22;
}

.price-box {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f3efe6;
}

.price-values,
.store-actions {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}

.price-label {
    color: #12382d;
    font-size: 18px;
    font-weight: 700;
}

.regular-price {
    position: relative;
    color: #12382d;
    font-size: 28px;
    font-weight: 700;
}

.regular-price.has-new-price::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -4%;
    width: 108%;
    height: 3px;
    border-radius: 2px;
    background: #c62828;
    transform: rotate(-7deg);
}

.new-price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    color: #c45f0a;
    font-size: 28px;
    font-weight: 800;
}

.new-price small {
    color: #6c6253;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.store-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 176px;
    min-height: 46px;
    padding: 12px 24px;
    border-radius: 40px;
    background: #f47c18;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-action-button:hover,
.store-action-button:focus-visible {
    background: #f69236;
    outline: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
    transform: translateY(-2px);
}

.book-gallery {
    margin-top: 32px;
    padding: 12px 0 0;
    border-top: 1px solid #e2ddd2;
    background: transparent;
}

.gallery-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 3px 3px 12px;
    scrollbar-color: #948b77 #e5dfd2;
}

.gallery-thumbnail {
    position: relative;
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 9px;
    background: #ffffff;
    cursor: zoom-in;
}

.gallery-thumbnail:hover,
.gallery-thumbnail:focus-visible {
    border-color: #e67e22;
    outline: none;
}

.gallery-thumbnail.is-main-image {
    border-color: #8b6f2d;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnail span {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 3px 6px;
    border-radius: 20px;
    background: rgba(15, 59, 46, 0.92);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.other-books {
    margin-top: 62px;
}

.other-books h2 {
    margin-bottom: 30px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.book-card {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 14px;
    min-height: 235px;
    padding: 15px;
    border: 1px solid rgba(15, 59, 46, 0.13);
    border-radius: 13px;
    background: #ffffff;
    color: #1f1f1f;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.book-card:hover,
.book-card:focus-visible {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card-image-wrap {
    display: block;
    width: 105px;
    height: 140px;
    overflow: hidden;
    border-radius: 8px;
    background: #e8e4da;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    padding: 8px;
    font-size: 12px;
    text-align: center;
}

.card-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.card-copy strong {
    margin-bottom: 7px;
    color: #12382d;
    font-size: 18px;
    line-height: 1.25;
}

.card-copy span {
    color: #6c6253;
    line-height: 1.35;
}

.card-prices {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
    font-size: 18px;
}

.card-copy .card-regular-price {
    position: relative;
    color: #12382d;
    font-weight: 700;
}

.card-copy .card-regular-price.has-new-price::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -4%;
    width: 108%;
    height: 2px;
    border-radius: 2px;
    background: #c62828;
    transform: rotate(-7deg);
}

.card-copy .card-new-price {
    color: #c45f0a;
    font-weight: 800;
}

.card-copy .card-price-unavailable {
    color: #c45f0a;
    font-weight: 700;
}

.card-additional-text {
    display: -webkit-box;
    grid-column: 1 / -1;
    min-height: calc(3 * 1.4em);
    max-height: calc(3 * 1.4em);
    overflow: hidden;
    color: #151515;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: minmax(50px, 90px) minmax(0, 1fr) minmax(50px, 90px);
    align-items: center;
    padding: 32px 18px;
    background: rgba(7, 16, 12, 0.94);
}

.lightbox-content {
    grid-column: 2;
    display: flex;
    min-width: 0;
    height: calc(100vh - 64px);
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 112px);
    object-fit: contain;
    box-shadow: 0 10px 38px rgba(0, 0, 0, 0.55);
}

.lightbox-content figcaption {
    min-height: 25px;
    padding-top: 10px;
    color: #ffffff;
    font-size: 15px;
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(15, 59, 46, 0.88);
    color: #ffffff;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
    background: #e67e22;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 48px;
    height: 48px;
    font-size: 32px;
    line-height: 1;
}

.lightbox-nav {
    width: 58px;
    height: 58px;
    justify-self: center;
    font-size: 43px;
    line-height: 0.8;
}

.lightbox-prev {
    grid-column: 1;
}

.lightbox-next {
    grid-column: 3;
}

body.lightbox-open {
    overflow: hidden;
}

@media screen and (max-width: 1180px) {
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 900px) {
    .featured-book-main {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .featured-cover {
        position: static;
    }

    .featured-image-link img {
        max-height: 520px;
    }
}

@media screen and (max-width: 768px) {
    .featured-book-main {
        padding: 0;
    }

    .featured-details h2 {
        text-align: center;
    }

    .featured-author {
        text-align: center;
    }

    .book-facts {
        grid-template-columns: 1fr;
    }

    .book-facts .fact-wide {
        grid-column: auto;
        grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
    }

    .book-gallery {
        padding: 12px 0 30px;
    }

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

    .lightbox {
        grid-template-columns: 56px minmax(0, 1fr) 56px;
        padding: 24px 4px;
    }

    .lightbox-nav {
        width: 46px;
        height: 46px;
        font-size: 36px;
    }
}

@media screen and (max-width: 520px) {
    .book-facts > div,
    .book-facts .fact-wide {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .book-facts dt {
        color: #8b6f2d;
    }

    .price-box {
        justify-content: center;
        text-align: center;
    }

    .price-values,
    .store-actions {
        justify-content: center;
    }

    .price-label {
        width: 100%;
    }

    .book-card {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .card-image-wrap {
        width: 90px;
        height: 125px;
    }

    .gallery-thumbnail {
        width: 92px;
        height: 92px;
    }

    .lightbox {
        display: flex;
        padding: 65px 10px 74px;
    }

    .lightbox-content {
        width: 100%;
        height: 100%;
    }

    .lightbox-content img {
        max-height: calc(100vh - 160px);
    }

    .lightbox-nav {
        position: fixed;
        bottom: 15px;
    }

    .lightbox-prev {
        left: calc(50% - 62px);
    }

    .lightbox-next {
        right: calc(50% - 62px);
    }
}
