/* Catalog Book Reader - Clean Styles */
.catalog-reader-body {
    overflow: hidden;
}

.catalog-reader-body .site-footer {
    display: none;
}

.catalog-reader-body main {
    background:
        radial-gradient(circle at 22% 28%, rgba(255, 126, 7, 0.1), transparent 28%),
        radial-gradient(circle at 78% 22%, rgba(47, 143, 19, 0.14), transparent 34%),
        #e8eee5;
    height: 100svh;
    overflow: hidden;
    padding-top: var(--header-height);
}

.magazine-stage {
    align-items: center;
    display: flex;
    height: calc(100svh - var(--header-height));
    justify-content: center;
    overflow: hidden;
    padding: 20px 0;
}

.catalog-reader-body .magazine-stage .site-container {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    max-width: 1320px;
    overflow: visible;
    padding: 0 72px;
    width: 100%;
}

.magazine-book {
    --page-height: min(calc(100svh - var(--header-height) - 56px), 46vw, 720px);
    --single-width: calc(var(--page-height) * 210 / 297);
    --spread-width: calc(var(--single-width) * 2);
    filter: drop-shadow(0 26px 36px rgba(15, 41, 28, 0.24));
    height: var(--page-height);
    isolation: isolate;
    overflow: visible;
    perspective: 2200px;
    position: relative;
    transform-style: preserve-3d;
    transition: width 0.82s cubic-bezier(0.2, 0.85, 0.22, 1), filter 0.82s cubic-bezier(0.2, 0.85, 0.22, 1);
    width: var(--single-width);
}

.magazine-book.spread-mode {
    filter: drop-shadow(0 34px 48px rgba(15, 41, 28, 0.25));
    width: min(var(--spread-width), calc(100vw - 190px));
}

.magazine-book::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.65), rgba(0, 0, 0, 0.12), transparent);
    bottom: 0;
    content: "";
    display: none;
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 36px;
    z-index: 20;
}

.magazine-book.spread-mode::before {
    display: block;
}

.mag-page,
.page-flip-sheet {
    background:
        linear-gradient(rgba(18, 61, 27, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 61, 27, 0.024) 1px, transparent 1px),
        #fffdf4;
    background-size: 28px 28px, 28px 28px, auto;
    border: 1px solid rgba(204, 190, 152, 0.82);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.54);
    display: none;
    height: 100%;
    left: 0;
    opacity: 0;
    overflow: hidden;
    padding: clamp(18px, 2vw, 30px);
    pointer-events: none;
    position: absolute;
    top: 0;
    transform-style: preserve-3d;
    visibility: hidden;
    width: 100%;
}

.mag-page.active,
.page-flip-sheet {
    display: block;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.page-flip-sheet {
    pointer-events: none;
    z-index: 60;
}

.mag-page.single-page {
    border-radius: 8px;
    left: 0;
    width: 100%;
}

.mag-page.left-page {
    border-radius: 8px 0 0 8px;
    left: 0;
    width: 50%;
}

.mag-page.right-page {
    border-left: 0;
    border-radius: 0 8px 8px 0;
    left: 50%;
    width: 50%;
}

.mag-page > *,
.page-flip-sheet > * {
    position: relative;
    z-index: 2;
}

.cover-page,
.back-cover-page {
    background:
        linear-gradient(180deg, rgba(242, 248, 248, 0.96) 0 19%, transparent 19%),
        linear-gradient(180deg, transparent 0 35%, rgba(0, 72, 78, 0.96) 35% 100%),
        radial-gradient(circle at 76% 38%, rgba(255, 255, 255, 0.22), transparent 20%),
        url("/images/hero-nursery-poster.png") center / cover;
    color: #ffffff;
}

.cover-page::after,
.back-cover-page::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    bottom: 28px;
    content: "";
    height: 3px;
    left: 9%;
    position: absolute;
    right: 9%;
    z-index: 3;
}

.cover-content,
.back-cover-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    margin: 0 auto;
    max-width: 78%;
}

.cover-content img,
.back-cover-logo {
    align-items: center;
    align-self: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    margin-bottom: clamp(18px, 4vh, 36px);
    padding: clamp(12px, 2vh, 18px) clamp(22px, 3vw, 34px);
    width: min(270px, 72%);
}

.cover-content img,
.back-cover-logo img {
    height: auto;
    object-fit: contain;
    width: 100%;
}

.cover-content span,
.back-cover-content .section-kicker {
    color: #ffffff;
    font-size: clamp(10px, 1.35vh, 13px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cover-content h2,
.back-cover-content h2 {
    color: #ffffff;
    font-size: clamp(38px, 7.8vh, 78px);
    line-height: 0.96;
    margin: 12px 0;
    max-width: 8ch;
}

.cover-content p,
.back-cover-content p {
    align-self: flex-end;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(10px, 1.55vh, 14px);
    line-height: 1.45;
    margin: 0;
    max-width: 30ch;
}

.cover-year {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    bottom: clamp(36px, 7vh, 68px);
    color: #ffffff;
    display: flex;
    font-size: clamp(28px, 5vh, 46px);
    font-weight: 900;
    height: clamp(54px, 8vh, 76px);
    justify-content: center;
    position: absolute;
    right: -8%;
    width: clamp(130px, 17vh, 170px);
    z-index: 4;
}

.back-cover-lines {
    border-top: 1px solid rgba(255, 255, 255, 0.42);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.back-cover-lines span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mag-page-number {
    color: rgba(18, 61, 27, 0.1);
    font-size: clamp(34px, 6vh, 58px);
    font-weight: 900;
    left: clamp(20px, 2vw, 30px);
    line-height: 1;
    position: absolute;
    top: clamp(16px, 2vw, 26px);
}

.section-kicker,
.mag-page .section-kicker {
    color: var(--orange);
    font-size: clamp(9px, 1.25vh, 12px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mag-page-heading {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: clamp(10px, 1.5vh, 16px);
}

.index-page h2,
.mag-page-heading h2,
.products-mag-page h2,
.about-mag-page .mag-copy h2 {
    color: var(--green-dark);
    font-size: clamp(22px, 4vh, 40px);
    line-height: 1.04;
    margin: 6px 0 0;
}

.mag-page-heading p,
.mag-copy p,
.mag-category-card p,
.mag-product-card p {
    color: #6b7666;
    font-size: clamp(9px, 1.35vh, 12px);
    line-height: 1.38;
    margin: 0;
}

.about-mag-page .mag-split {
    align-content: center;
    display: grid;
    gap: clamp(12px, 2vh, 18px);
    grid-template-columns: 1fr;
    height: 100%;
}

.about-mag-page .mag-image-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(204, 190, 152, 0.82);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: clamp(90px, 17vh, 150px);
    padding: 12px;
}

.about-mag-page .mag-image-panel img {
    height: auto;
    max-height: 112px;
    object-fit: contain;
    width: min(64%, 280px);
}

.about-mag-page .mag-copy {
    min-height: 0;
    overflow: hidden;
}

.about-mag-page .mag-copy p {
    display: -webkit-box;
    margin: 10px 0 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.mag-feature-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 126px;
    overflow: hidden;
}

.mag-feature-grid div,
.index-list button,
.mag-category-card,
.mag-product-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(204, 190, 152, 0.82);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(49, 50, 36, 0.05);
}

.mag-feature-grid div {
    padding: 10px 12px;
}

.mag-feature-grid strong {
    color: #0880a3;
    display: block;
    font-size: clamp(15px, 2.2vh, 20px);
    line-height: 1;
}

.mag-feature-grid span {
    color: #647063;
    display: block;
    font-size: clamp(9px, 1.35vh, 12px);
    margin-top: 5px;
}

.index-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.index-list {
    display: grid;
    gap: clamp(9px, 1.5vh, 14px);
    margin-top: clamp(18px, 3vh, 28px);
}

.index-list button {
    align-items: center;
    color: var(--green-dark);
    cursor: pointer;
    display: flex;
    font-size: clamp(13px, 2vh, 20px);
    font-weight: 900;
    gap: 14px;
    min-height: 0;
    padding: clamp(10px, 1.8vh, 16px);
    text-align: left;
}

.index-list button span {
    align-items: center;
    background: var(--orange);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    height: clamp(34px, 5vh, 48px);
    justify-content: center;
    width: clamp(34px, 5vh, 48px);
}

.mag-category-grid,
.mag-product-grid {
    display: grid;
    gap: clamp(9px, 1.25vh, 14px);
    max-height: calc(100% - 84px);
    min-height: 0;
    overflow: hidden;
}

.mag-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mag-category-card {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: clamp(54px, 7vw, 82px) 1fr;
    min-height: 0;
    padding: 9px;
}

.mag-category-card img {
    aspect-ratio: 1;
    border-radius: 6px;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.mag-category-card h3,
.mag-product-card h3 {
    color: var(--green-dark);
    display: -webkit-box;
    font-size: clamp(12px, 1.65vh, 17px);
    line-height: 1.15;
    margin: 0 0 4px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.mag-category-card p,
.mag-product-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.mag-product-grid {
    grid-template-columns: 1fr;
}

.mag-product-card {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(78px, 28%) minmax(0, 1fr);
    min-height: 0;
    padding: 9px;
}

.mag-product-card img {
    aspect-ratio: 1 / 0.82;
    border-radius: 6px;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.mag-product-card span {
    color: var(--orange);
    display: block;
    font-size: clamp(8px, 1.12vh, 11px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.mag-product-card dl {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 7px 0 0;
}

.mag-product-card dl div {
    background: rgba(47, 143, 19, 0.08);
    border-radius: 6px;
    min-width: 0;
    padding: 5px 6px;
}

.mag-product-card dt,
.mag-product-card dd {
    font-size: clamp(8px, 1.05vh, 10px);
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mag-side-nav {
    align-items: center;
    background: rgba(5, 70, 75, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(5, 70, 75, 0.22);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    padding: 0;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
    width: 46px;
    z-index: 140;
}

.mag-side-prev {
    left: 0;
    transform: translate(-50%, -50%);
}

.mag-side-next {
    right: 0;
    transform: translate(50%, -50%);
}

.magazine-book.single-mode .mag-side-prev {
    left: 0;
    transform: translate(-50%, -50%);
}

.magazine-book.single-mode .mag-side-next {
    right: 0;
    transform: translate(50%, -50%);
}

.mag-side-nav:hover,
.mag-side-nav:focus-visible {
    background: var(--orange);
    box-shadow: 0 20px 46px rgba(255, 126, 7, 0.28);
    outline: 0;
}

.mag-side-nav:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.mag-nav-icon {
    align-items: center;
    background: transparent;
    display: inline-flex;
    font-size: 36px;
    height: 46px;
    justify-content: center;
    line-height: 1;
    margin-top: -4px;
    width: 46px;
}

.mag-nav-text,
.mag-cursor-hint {
    display: none;
}

@keyframes catalogFlipNext {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(-92deg); box-shadow: -18px 0 34px rgba(0, 0, 0, 0.24); }
    100% { transform: rotateY(-178deg); }
}

@keyframes catalogFlipPrev {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(92deg); box-shadow: 18px 0 34px rgba(0, 0, 0, 0.24); }
    100% { transform: rotateY(178deg); }
}

.page-flip-sheet.flip-next {
    animation: catalogFlipNext 0.92s cubic-bezier(0.2, 0.74, 0.18, 1) forwards;
    left: 50%;
    transform-origin: left center;
    width: 50%;
}

.magazine-book.single-mode .page-flip-sheet.flip-next {
    left: 0;
    transform-origin: right center;
    width: 100%;
}

.page-flip-sheet.flip-prev {
    animation: catalogFlipPrev 0.92s cubic-bezier(0.2, 0.74, 0.18, 1) forwards;
    left: 0;
    transform-origin: right center;
    width: 50%;
}

.magazine-book.single-mode .page-flip-sheet.flip-prev {
    left: 0;
    transform-origin: left center;
    width: 100%;
}

@media (max-width: 900px) {
    .catalog-reader-body main {
        padding-top: var(--header-height-mobile);
    }

    .magazine-stage {
        height: calc(100svh - var(--header-height-mobile));
        padding: 12px 0 64px;
    }

    .catalog-reader-body .magazine-stage .site-container {
        padding: 0 54px;
    }

    .magazine-book,
    .magazine-book.spread-mode,
    .magazine-book.single-mode {
        --page-height: min(calc(100svh - var(--header-height-mobile) - 84px), 132vw);
        height: var(--page-height);
        width: min(calc(var(--page-height) * 210 / 297), 86vw, 420px);
    }

    .magazine-book.spread-mode::before,
    .magazine-book.spread-mode .left-page {
        display: none;
    }

    .mag-page.left-page,
    .mag-page.right-page,
    .mag-page.single-page {
        border-radius: 8px;
        left: 0;
        width: 100%;
    }

    .mag-side-nav {
        height: 42px;
        top: calc(var(--header-height-mobile) + ((100svh - var(--header-height-mobile)) / 2));
        width: 42px;
    }

    .mag-side-prev,
    .magazine-book.single-mode .mag-side-prev {
        left: 8px;
    }

    .mag-side-next,
    .magazine-book.single-mode .mag-side-next {
        right: 8px;
    }

    .mag-nav-icon {
        font-size: 31px;
        height: 42px;
        width: 42px;
    }

    .mag-feature-grid,
    .mag-product-grid {
        grid-template-columns: 1fr;
    }

    .mag-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mag-product-card:nth-child(n+4),
    .mag-category-card:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 520px) {
    .catalog-reader-body .magazine-stage .site-container {
        padding: 0 44px;
    }

    .magazine-book,
    .magazine-book.spread-mode,
    .magazine-book.single-mode {
        --page-height: min(calc(100svh - var(--header-height-mobile) - 78px), 136vw);
        width: min(calc(var(--page-height) * 210 / 297), 88vw, 380px);
    }

    .mag-page,
    .page-flip-sheet {
        padding: 15px;
    }

    .cover-content h2,
    .back-cover-content h2 {
        font-size: clamp(34px, 12vw, 52px);
    }

    .cover-year {
        right: -18%;
    }

    .mag-category-grid {
        grid-template-columns: 1fr;
    }

    .mag-category-card:nth-child(n+5) {
        display: none;
    }
}
