/* --- HEADER TUNING --- */

.single-book .site-main--offset {
    padding-top: 0;
}

.single-book .site-header:not(.is-scrolled) {
    background-color: transparent;
    border-bottom-color: transparent;
}

.single-book .site-header:not(.is-scrolled) .site-header__brand,
.single-book .site-header:not(.is-scrolled) .site-header__menu-link,
.single-book .site-header:not(.is-scrolled) .site-header__shop,
.single-book .site-header:not(.is-scrolled) .site-header__cart {
    color: #f4f1ea;
}

.single-book .site-header:not(.is-scrolled) .site-header__menu-link:hover,
.single-book .site-header:not(.is-scrolled) .site-header__shop:hover,
.single-book .site-header:not(.is-scrolled) .site-header__cart:hover {
    color: #ffffff;
}

/* --- HERO SECTION --- */

body.single-book {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #F4F1EA;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
    z-index: 1;
}

.book-hero {
    position: relative;
    background-color: #1A242F;
    padding: 180px 0 140px;
    color: #ffffff;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
}

.book-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 185px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(26, 36, 47, 0) 0%,
        rgba(26, 36, 47, 0.58) 30%,
        rgba(244, 241, 234, 0.9) 82%,
        #F4F1EA 100%
    );
}

.hero-layout-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
}

/* --- BOOK COVER ART --- */
.book-cover-art {
    flex: 0 0 400px;
}

.book-cover-art img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: contain;
    display: block;
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.38),
        0 24px 42px rgba(0, 0, 0, 0.38),
        28px 34px 90px rgba(0, 0, 0, 0.52);
}

/* --- HERO TEXT --- */
.book-hero-text {
    flex: 1;
    text-align: center;
}

.book-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 62px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.book-subtitle-text {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- AUDIO SAMPLE (Waveform) --- */
.audio-excerpt-label {
    width: min(100%, 880px);
    margin: 0 auto 0.75rem;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 241, 234, 0.78);
    position: relative;
    left: -2px;
}

.audio-sample-block {
    margin-bottom: 32px;
}

.book-audio-player {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    column-gap: 16px;
    row-gap: 10px;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    align-items: center;
}

.audio-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.audio-cta-btn:hover {
    transform: scale(1.04);
}

.audio-icon {
    display: none;
}
.audio-cta-btn .icon-play { display: inline-flex; }
.book-audio-player.is-playing .icon-play { display: none; }
.book-audio-player.is-playing .icon-pause { display: inline-flex; }

.audio-wave-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-timestamps {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dce1e6;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.audio-time {
    min-width: 38px;
}

.audio-waveform {
    width: 100%;
    height: 69px;
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.96;
    transition: opacity 0.2s ease;
}

.book-audio-player.is-playing .audio-waveform {
    opacity: 1;
}

@media (max-width: 720px) {
    .book-audio-player {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        row-gap: 12px;
        justify-items: center;
    }
    .audio-waveform {
        height: 72px;
    }
    .audio-wave-wrap {
        width: 100%;
    }
}

/* --- BUTTONS --- */
.buy-cta-wrapper {
    margin-top: 26px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pill-btn-buy {
    display: inline-block;
    padding: 14px 34px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    background: transparent;
}

.pill-btn-buy:hover {
    background: #ffffff;
    color: #242e38;
}

.add-to-cart-status {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #9be28a;
    min-height: 18px;
}

.pill-btn-buy.is-adding {
    opacity: 0.7;
    pointer-events: none;
}

.pill-btn-buy.is-added {
    background: #ffffff;
    color: #242e38;
    border-color: #ffffff;
}

.added_to_cart {
    display: none !important;
}


/* --- BLURB & BODY --- */

.book-body-details {
    padding: 44px 0 100px;
    background-color: #F4F1EA;
}

.narrow-content {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.book-blurb-content {
    margin: 0 auto 62px;
    max-width: 40ch;
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 1.3vw, 1.26rem);
    line-height: 1.85;
    color: #2d2d2d;
}

.book-blurb-content p {
    margin: 0 0 1.15em;
}

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

/* --- SHARE & EXPLORE SECTION --- */
.editorial-share-section {
    margin-top: 56px;
    border-top: 1px solid rgba(45, 45, 45, 0.15);
    padding: 3rem 0;
}

.editorial-share-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #6a675f;
    display: block;
    margin-bottom: 25px;
}

.circular-social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px; 
}

.circle-icon {
    width: 46px;
    height: 46px;
    background-color: transparent;
    border: 1px solid rgba(45, 45, 45, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.circle-icon:hover {
    border-color: #2d2d2d;
    background-color: rgba(45, 45, 45, 0.04);
    transform: translateY(-1px);
}

.circle-icon.fb { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" fill="%232d2d2d"><path d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"/></svg>') no-repeat center/17px; }
.circle-icon.x { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%232d2d2d"><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48z"/></svg>') no-repeat center/15px; }
.circle-icon.li { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%232d2d2d"><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"/></svg>') no-repeat center/17px; }

.pill-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.82rem 2.1rem;
    border: 2px solid #2D2D2D;
    border-radius: 999px;
    background: #2D2D2D;
    color: #F4F1EA;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.pill-btn-outline:hover {
    background: transparent;
    color: #2D2D2D;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-layout-grid { flex-direction: column; text-align: center; }
    .book-cover-art { flex: 0 0 auto; max-width: 300px; }
    .book-hero { padding: 150px 0 115px; }
    .book-blurb-content { max-width: 100%; }
}
