/* --- WORLD CLASS BOOK LAYOUT --- */

/* Force Book Page Background to Creamy White */
body.single-book,
body.post-type-archive-book,
body {
    background-color: #FAF9F6 !important;
    color: #2C2C2C;
    font-family: 'Lora', serif;
    font-size: 17px;
    line-height: 1.7;
}

/* Typography */
h1,
h2,
h3,
.product-title,
.related-title,
.accordion-header {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

h4,
h5,
h6,
.product-subtitle,
.selection-label,
.series-badge,
.trust-badge,
strong,
b {
    font-family: 'Quattrocento', serif;
    font-weight: 700;
}

/* Container */
.product-section {
    max-width: 1500px;
    margin: 40px auto;
    padding: 0 40px;
}

.product-container {
    display: grid;
    grid-template-columns: 50fr 50fr;
    gap: 60px;
    background-color: #FFFFFF !important;
    color: #2C3E50 !important;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* GALLERY - NO CLIPPING FIX */
.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    aspect-ratio: 3/4;
    /* Defines the box shape */
    background: #f9f9f9;
    /* Light grey background for letterboxing */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #eee;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    /* CRITICAL: Shows full image */
    object-position: center;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    aspect-ratio: 3/4;
    background: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    /* CRITICAL: Shows full thumb */
    padding: 2px;
}

.thumbnail:hover {
    border-color: #b5d1ae;
}

.thumbnail.active {
    border-color: #b5d1ae;
    opacity: 1;
    box-shadow: 0 0 0 2px #b5d1ae;
}

/* Info Area */
.series-badge {
    display: inline-block;
    background: #b5d1ae;
    color: #FFF !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.product-title {
    font-family: 'Cinzel', serif;
    font-size: 40px !important;
    margin-bottom: 10px;
    line-height: 1.1;
    color: #2C2C2C !important;
    text-transform: uppercase;
    text-align: left;
}

.product-subtitle {
    font-size: 20px;
    color: #555 !important;
    margin-bottom: 15px;
    font-weight: 400;
}

.product-short-description {
    margin-bottom: 25px;
    font-size: 16px;
    color: #444;
}

/* Ratings */
.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.stars {
    color: #FFB800 !important;
    letter-spacing: 2px;
    font-size: 18px;
}

.review-count {
    color: #666;
    font-size: 14px;
    font-family: 'Lora', serif;
}

/* Price */
.price-section {
    background-color: #F5F0E8 !important;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.price-edition-label {
    font-family: 'Quattrocento', serif;
    font-weight: 800 !important;
    color: #1e423f !important;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px !important;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.price {
    font-family: 'Cinzel', serif;
    font-size: 38px;
    font-weight: bold;
    color: #2C2C2C !important;
    margin-bottom: 5px;
}

.price-note {
    color: #666;
    font-size: 13px;
    margin: 0;
    font-family: 'Lora', serif;
}

/* Selection */
.selection-section {
    margin-bottom: 30px;
}

.selection-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #b5d1ae;
}

a.format-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    background-color: #FFFFFF !important;
    text-decoration: none !important;
    color: #2C3E50 !important;
    transition: all 0.2s;
}

a.format-option:hover {
    border-color: #b5d1ae;
    background-color: #fbfbfb !important;
}

a.format-option.format-selected {
    border-color: #b5d1ae;
    background-color: #f0f8f0 !important;
    box-shadow: 0 0 0 1px #b5d1ae;
}

.format-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #2C2C2C;
    font-family: 'Quattrocento', serif;
}

.format-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-family: 'Lora', serif;
}

/* Language */
.language-options ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 10px;
    margin: 0;
}

.language-options li {
    flex: 1;
}

.language-options a {
    display: block;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    color: #2C3E50;
    transition: all 0.2s;
    font-family: 'Quattrocento', serif;
    font-size: 14px;
}

.language-options a:hover {
    border-color: #b5d1ae;
}

.language-options .current-lang a {
    border-color: #b5d1ae;
    background-color: #f0f8f0;
}

/* Button */
.buy-amazon-btn {
    width: 100%;
    padding: 20px 40px;
    background-color: #b5d1ae !important;
    color: #1e423f !important;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Quattrocento', serif;
}

.buy-amazon-btn:hover {
    background-color: #a3c49f !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

/* Companion Box */
.digital-companion-box {
    background-color: #b5d1ae !important;
    color: #1e423f !important;
    padding: 35px;
    border-radius: 12px;
    margin: 35px 0;
    font-family: 'Lora', serif;
    box-shadow: 0 10px 25px rgba(30, 66, 63, 0.1);
    border: 2px solid rgba(30, 66, 63, 0.1);
}

.digital-companion-box strong {
    font-family: 'Quattrocento', serif;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.digital-companion-box span {
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
}

.digital-companion-box ul {
    margin-top: 20px !important;
}

.digital-companion-box li {
    font-size: 19px !important;
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 35px !important;
    position: relative;
    list-style: none;
}

.digital-companion-box li span {
    color: #1e423f !important;
    font-weight: 900;
    font-size: 26px !important;
    position: absolute;
    left: 0;
    top: -4px;
}

.digital-companion-box a {
    background-color: #1e423f !important;
    color: #ffffff !important;
    margin-top: 15px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.digital-companion-box a:hover {
    background-color: #2C3E50 !important;
}

/* Accordion */
.accordion {
    margin-top: 40px;
    border-top: 1px solid #eee;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-header {
    padding: 20px 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    color: #2C2C2C;
    font-family: 'Cinzel', serif;
}

.accordion-header:hover {
    color: #b5d1ae;
}

.accordion-content {
    display: none;
    padding-bottom: 20px;
    color: #444;
    font-size: 17px;
    line-height: 1.7;
}

.accordion-content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.accordion-content li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f9f9f9;
    padding: 12px 0;
    font-size: 17px;
    font-family: 'Lora', serif;
}

.accordion-content li:last-child {
    border-bottom: none;
}

.accordion-content li strong {
    font-family: 'Quattrocento', serif;
    color: #2C2C2C;
    min-width: 140px;
    padding-right: 20px;
    flex-shrink: 0;
}

/* Related */
.related-section {
    max-width: 1500px;
    margin: 60px auto;
    padding: 0 40px;
}

.related-title {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    color: #2C2C2C;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.related-card {
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-cover {
    width: 100%;
    height: 350px;
    display: block;
    position: relative;
    overflow: hidden;
    padding: 0;
    background-color: #eee;
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep cover for related */
    object-position: top center;
    transition: transform 0.5s ease;
}

.related-card:hover .related-cover img {
    transform: scale(1.05);
}

.related-info {
    padding: 15px;
}

.related-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Quattrocento', serif;
}

.related-info .price {
    font-size: 18px;
    margin-top: 10px;
    font-family: 'Cinzel', serif;
}

@media (max-width: 1024px) {

    .product-container,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
        margin-bottom: 40px;
    }
}

/* OCHRE THEME (SOUTH WEST) */
body.series-sw h4,
body.series-sw h5,
body.series-sw h6,
body.series-sw .sidebar-label,
body.series-sw .section-title,
body.series-sw .product-subtitle,
body.series-sw .selection-label {
    color: #cb8f32 !important;
}

body.series-sw .language-options a,
body.series-sw .language-switcher a {
    border: 1px solid #cb8f32 !important;
    color: #cb8f32 !important;
}

body.series-sw .language-options .current-lang a,
body.series-sw .language-switcher .current-lang a {
    background-color: #cb8f32 !important;
    color: #FFFFFF !important;
}

body.series-sw .language-options a:hover {
    background-color: #fdf8ea !important;
}

body.series-sw .series-badge,
body.series-sw .buy-amazon-btn {
    background-color: #cb8f32 !important;
    color: #FFFFFF !important;
    border: none !important;
}

body.series-sw .buy-amazon-btn:hover {
    background-color: #b07b2b !important;
    transform: translateY(-2px);
}

body.series-sw .selection-section {
    margin-bottom: 30px !important;
}

body.series-sw a.format-option:hover {
    border-color: #cb8f32 !important;
}

body.series-sw a.format-option.format-selected,
body.series-sw a.format-option.active {
    background-color: #fffdf5 !important;
    border: 2px solid #cb8f32 !important;
    box-shadow: 0 4px 6px rgba(203, 143, 50, 0.15) !important;
}

body.series-sw .digital-companion-box {
    background-color: #fdf8ea !important;
    border: 1px solid #cb8f32 !important;
}

body.series-sw .digital-companion-box li span,
body.series-sw .digital-companion-box strong {
    color: #cb8f32 !important;
}

body.series-sw .digital-companion-box a {
    background-color: #2C3E50 !important;
    color: #FFF !important;
}

body.series-sw .digital-companion-box a:hover {
    background-color: #cb8f32 !important;
}

/* FORCE NO CLIPPING */
.main-image img,
.thumbnail img,
.related-cover img {
    object-fit: contain !important;
    width: 100%;
    height: 100%;
    background-color: #fff;
    /* Optional: fills white space */
}

/* --- FIXED BUTTON UNIFORMITY --- */
a.format-option {
    display: grid !important;
    grid-template-columns: 1fr 40px;
    /* Content gets space, Indicator gets 40px fixed */
    align-items: center;
    gap: 15px;
    min-height: 80px;
    /* Forces equal height for all */
    padding: 15px 20px !important;
}

/* Text Area (Left) */
.format-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.format-info h4 {
    margin: 0 0 4px 0 !important;
    line-height: 1.2;
}

.format-info p {
    margin: 0 !important;
    line-height: 1.2;
}

/* Indicator Circle (Right) */
.format-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    height: 100%;
}

/* BUTTON ICONS & SPECS */
.format-indicator {
    font-size: 22px;
    font-weight: bold;
    color: inherit;
}

.format-specs {
    font-size: 13px !important;
    color: #666;
    margin: 4px 0 0 0 !important;
    line-height: 1.3 !important;
}

a.format-option.active .format-specs {
    color: #1e423f;
    /* Darker on active */
}

/* --- SOUTH WEST THUMBNAIL FIX --- */
body.series-sw .thumbnail:hover {
    border-color: #cb8f32 !important;
}

body.series-sw .thumbnail.active {
    border-color: #cb8f32 !important;
    box-shadow: 0 0 0 2px #cb8f32 !important;
}

/* --- SOUTH WEST ACCORDION FIX --- */
body.series-sw .accordion-header:hover {
    color: #cb8f32 !important;
}

/* --- FLOATING BOOK EFFECT --- */
.main-image,
.thumbnail {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.main-image:hover,
.thumbnail:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2) !important;
}

/* --- BREADCRUMB BACKGROUND FIX FOR BOOK PAGES --- */
.breadcrumb-strip {
    background-color: #FAF9F6 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}