/**
 * Custom styles for WooCommerce product tabs with ACF fields
 * 
 * @author  WPPoland.com, Mariusz Szatkowski
 * @package Savoy Child Theme
 */

.tabs-layout-default .wc-tab .nm-tabs-panel-inner{
    padding-right: 3em;
    padding-left: 3em;
}
/* Book Quote Section */
.nm-book-quote {
    text-align: center;
    margin: 30px 0 10px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.nm-book-quote-text {
    font-family: "Playfair Display", serif;
    font-size: 30px;
    line-height: 1.6;
    color: #000;
}

.nm-book-quote-cite {
    margin-top: 8px;
    opacity: 0.8;
    font-size: 0.9em;
    color: #666;
    text-align: right;
}

/* Book Hero Section - Full Width Image */
.nm-book-hero {
    margin: 20px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.nm-book-hero .nm-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nm-book-hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* Book Description Section */
.nm-book-description {
    margin: 30px 0;
}

.nm-book-description .nm-container {
    margin: 0 auto;
    padding: 0 20px;
}

/* CTA Banner Section */
.nm-book-cta {
    margin: 5em 0 7em;
    min-height: 200px;
    display: flex;
    align-items: center;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    .nm-container{
        background: #053f42;
    }
}

.wc-tab{
    background-color: #eee;

    .nm-book-set .nm-container,
    .nm-book-bottom .nm-container-bottom, 
    .nm-book-cta .nm-container,
    .nm-book-hero .nm-container{
        max-width: 1600px;
        margin: 0 auto;
    }
}


.nm-book-cta .nm-container {
    position: relative;
    padding: 0 20px;
    width: 100%;
    margin: 0 auto;
}

.nm-book-cta-bg {
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.nm-book-cta .nm-book-cta-inner {
    padding: 40px 24px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 200px;
}

.nm-book-cta .nm-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 40px;
    width: 100%;
    position: relative;
}

.nm-book-cta-media {
    position: relative;
    z-index: 3;
    grid-column: 1;
}

.nm-book-cta-media img {
    @media (min-width: 768px) { 
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%); 
    }
    
    max-width: 350px;
    width: auto;
    height: auto;
    z-index: 3;
    box-shadow: none;
    border-radius: 4px;
}

.nm-book-cta-text {
    color: #fff;
    text-align: left;
    z-index: 2;
    position: relative;
    grid-column: 2;
    padding-left: 8em;
}

.nm-book-cta-text h3 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1.8em;
    font-weight: 600;
}

.nm-book-cta-desc {
    margin: 0;
    color: #fff;
    line-height: 1.6;
}

/* Fallback CTA (no background image) */
.nm-book-cta .nm-container:not(:has(.nm-book-cta-bg)) .nm-book-cta-inner {
    @media (min-width: 768px) { 
        padding: 40px 24px;
    }
    padding: 2em 0;
    border-radius: 6px;
    background: #053f42;
    color: #fff;
    text-align: center;
    width: 100%;
    margin: 0 auto;

    .nm-row{
        margin: auto!important;
    }
}

.nm-book-cta-inner:not(.nm-book-cta-bg) h3 {
    margin: 0 0 25px;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-size: 30px;
    line-height: 1.6;
}

.nm-book-cta-inner:not(.nm-book-cta-bg) .nm-book-cta-desc {
    margin: 0 auto;
    color: #fff;
}

.nm-book-cta-inner:not(.nm-book-cta-bg) img {
    min-width: 550px;
    height: auto;
    margin-top: 16px;
    zoom: 1.2;
    @media (max-width: 767px) {
        min-width: 100%;
        zoom: 1;
    }
}

/* Bottom Description Section */
.nm-book-description-bottom {
    margin: 30px 0;
}

.nm-book-description-bottom .nm-container {
    margin: 0 auto;
    padding: 0 20px;
}

.nm-book-bottom {
    margin: 5em 0;
    color: #fff;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 3em 0;

    .nm-container-bottom{
        background: #053F42;
    }
}

.nm-book-bottom .nm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5em 18em 1em;
    @media (max-width: 768px) {
        padding: 5em 3em;
    }
}

.nm-book-bottom .nm-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3em;
    align-items: center;
}

.nm-book-bottom .nm-col {
    position: relative;
}

.nm-book-bottom .nm-col:first-child {
    grid-column: 1;
}

.nm-book-bottom .nm-col:last-child {
    grid-column: 2;
}
.nm-book-bottom p {
    font-size: 16px;
}
.nm-book-bottom h2 {
    font-weight: 900;
}
.nm-book-bottom h3 {
    margin: 0 0 1em;
    color: #fff;
    font-size: 2em;
    font-weight: 600;
    line-height: 1.2;
}

.nm-book-bottom .entry-content {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1.1em;
    padding: 2em 5em;
    color: #fff;
    h2{
        color: #fff;
    }
    @media (max-width: 768px) {
        padding: 0;
    }
}

.nm-book-bottom .entry-content p {
    margin: 0 0 1em;
}

.nm-book-bottom img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-width: 383px;
}



.nm-book-bottom .nm-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 4em 0;
}

.nm-book-bottom .nm-col:first-child {
    grid-column: 1;
}

.nm-book-bottom .nm-col:last-child {
    grid-column: 2;
}

.nm-book-bottom .nm-col img {
    width: 100%;
    height: auto;
}

/* Bottom Header Background Shape */
.nm-book-bottom .nm-book-bottom-header {
    position: absolute;
    top: -3em;
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('bgorange.svg') center center no-repeat;
    background-size: cover;
    padding: 4em 0;
    max-width: 1400px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    margin: 0;
}
.wc-tab .nm-container-bottom .marginauto{
    margin: 0 auto!important;
    
}

.nm-book-bottom .nm-book-bottom-header .nm-container {
    max-width: 1200px;
    padding: 0 20px;
    position: relative;
    text-align: center;
}

.nm-book-bottom .nm-book-bottom-header h3 {
    font-family: "Playfair Display", serif;
    font-size: 30px;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 auto;
    padding: 0 40px;

    @media (max-width: 768px) {
        font-size: 20px;
    }
}

.nm-book-cta-inner .nm-row{
    @media (max-width: 768px) {
        margin: 0!important;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .nm-book-cta-inner {
        padding: 30px 20px;
    }

    .nm-book-cta .nm-row {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: center;
    }

    .nm-book-cta-media {
        grid-column: 1;
        order: 1;
    }

    .nm-book-cta-text {
        grid-column: 1;
        order: 2;
        padding-left: 0;
        text-align: center;
    }

    .nm-book-cta-media img {
        left: -30px;
        max-width: 250px;
    }

    .nm-book-bottom {
        padding: 2em 0;
    }
    
    .nm-book-bottom .nm-row {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    
    .nm-book-bottom .nm-col:first-child {
        grid-column: 1;
        order: 1;
    }
    
    .nm-book-bottom .nm-col:last-child {
        grid-column: 1;
        order: 2;
    }
    
    .nm-book-bottom h3 {
        font-size: 1.5em;
    }
    
    .nm-book-bottom .entry-content {
        font-size: 1em;
    }
    
    .nm-book-bottom .nm-book-bottom-header {
        padding: 2em 0;
        min-height: 150px;
    }
    
    .nm-book-bottom .nm-book-bottom-header h3 {
        font-size: 16px;
        padding: 2em 3em;
        max-width: 500px;
    }
    
    .nm-book-bottom .nm-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        align-items: center;
        padding: 4em 0;
    }
    
    .nm-book-bottom .nm-col {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nm-book-description-bottom{
        margin-top: -4em;
    }

    .nm-book-bottom .nm-book-bottom-header{
        top: -6em;
    }

    .nm-book-quote-text {
        font-size: 1.1em;
    }

    .nm-book-cta-inner {
        padding: 24px 16px;
    }

    .nm-book-cta .nm-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .nm-book-cta-media {
        grid-column: 1;
        order: 1;
    }
    
    .nm-book-cta-text {
        grid-column: 1;
        order: 2;
        padding-left: 0;
        text-align: center;
    }

    .nm-book-cta-media img {
        max-width: 200px;
        left: 0;
        position: relative;
        transform: none;
    }
    
    .nm-book-bottom .nm-book-bottom-header h3 {
        font-size: 16px;
        padding: 2em 0;
        max-width: 400px;
    }
    .nm-book-bottom .nm-container{
        padding: 2em;
    }
    .nm-book-bottom .nm-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: center;
        padding: 1em 0;
    }
    
    .nm-book-bottom .nm-col {
        text-align: center;
    }
    
    .nm-book-bottom .entry-content {
        padding: 2em 1em;
    }
}

/* Book Set Section - Bundle Display */
.nm-book-set {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 4em 0;
}

.nm-book-set .nm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nm-book-set-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
}

.nm-book-set-image {
    flex: 0 0 auto;
    max-width: 100%;
}

.nm-book-set-image img {
    width: 100%;
    height: auto;
    max-width: 600px;
    display: block;
    border-radius: 8px;
}

.nm-book-set-text {
    flex: 1;
    background: url('smorange.svg') center center no-repeat;
    background-size: contain;
    padding: 1.5em 1em 2em;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-size: 36px;
    text-align: left;
    strong {
        color: #fff!important;
    }
    p{
        padding: 1.5em 2em 2em;
    }
    @media (max-width: 767px) {
        font-size: 1em;
    }
    @media (min-width: 768px) {
        min-height: 250px;
    }
}

.nm-book-set-text .entry-content {
    color: #fff;
    line-height: 1.6;
    font-size: 1.1em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-family: "Playfair Display", serif;
}

.nm-book-set-text .entry-content h2,
.nm-book-set-text .entry-content h3 {
    color: #fff;
    margin-bottom: 1em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-family: "Playfair Display", serif;
}

.nm-book-set-text .entry-content p {
    margin-bottom: 1em;
    color: #fff;
    font-family: "Playfair Display", serif;
}

/* Responsive Design for Book Set */
@media (max-width: 768px) {
    .nm-book-set {
        padding: 2em 0;
    }
    
    .nm-book-set-content {
        flex-direction: column;
        gap: 1.5em;
        text-align: center;
    }

    /* Mobile order: text first, image second */
    .nm-book-set-text { order: 1; }
    .nm-book-set-image { order: 2; }
    
    .nm-book-set-text {
        min-width: auto;
        max-width: 100%;
    }
    
    .nm-book-set-image img {
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .nm-book-set {
        padding: 1.5em 0;
    }
    
    .nm-book-set-content {
        gap: 1em;
    }
    
    .nm-book-set-image img {
        max-width: 300px;
    }
    
    .nm-book-set-text .entry-content {
        font-size: 1em;
    }
}