header {
    padding: 100px 0 60px 0;
    background: var(--vert); 
    position: relative;
}

h1{
    margin-bottom: 0;
}

.product-back-wrap {
    display: flex;
    justify-content: center;
    padding-top: 6px;
    position: relative;
    z-index: 2;
}

.btn-back{
    transform: translateY(-115%);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 9px 16px;
    margin-bottom: 0;
}

.btn-back:hover{
        transform: translateY(-115%);
    opacity: 0.7;
}

/* lightbox */

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 105vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    cursor: pointer;
    text-align: center;
}

#overlay-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

#overlay img {
    max-width: 90vw;
    max-height: 90vh;
    z-index: 101;
    cursor: default;
    filter: brightness(0.7);
    object-fit: contain;
    display: block;
}

#overlay img:hover {
    filter: brightness(1);
}

/* Product */

.horizontalFlexContainer {
    width: 100%;
    padding: 8px 3% 3%;
    height: auto;
    align-items: flex-start;
}

.left-div{
    width:15%;
    display: flex;
    justify-content: end;
    height: 48vw;
}

.thumbnails{
    display: flex;
    height: 100%;

    flex-wrap: wrap-reverse;
    justify-content: flex-end;
    align-content: flex-start;
    flex-direction: column-reverse;
}

.thumbnail {
    width: 7vw;
    height: 7vw;
    margin-bottom: 1.8vw;
    margin-left: 1vw;
    object-fit: cover;
}



.product-media-column {
    width: 60%;
    padding: 0 30px;
    box-sizing: border-box;
    display: grid;
    gap: 24px;
}

.main-img-container{
    width: calc(100% - 40px);
    margin-left: 20px;
    padding: clamp(12px, 1.8vw, 24px);
    box-sizing: border-box;
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 320px;
    background: linear-gradient(135deg, #f8f4ed 0%, #ffffff 100%);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.main-img { 
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: static;
    cursor: zoom-in;
}

.main-img-container [hidden] { display: none !important; }
.main-img-container.is-zoomed { background-repeat: no-repeat; background-color: #fff; }
.main-img-container.is-zoomed .main-img { opacity: 0; cursor: zoom-out; }
#product-video { width: 100%; height: 100%; object-fit: contain; }
.thumbnail { cursor: pointer; border-radius: 6px; }
.thumbnail[aria-pressed="true"] { outline: 2px solid cornflowerblue; outline-offset: 3px; }
.thumbnail:focus-visible, .main-img:focus-visible { outline: 3px solid #14314e; outline-offset: 3px; }
.product-video-thumbnail { position: relative; padding: 0; border: 0; background: #14314e; overflow: hidden; flex-shrink: 0; }
.product-video-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.65; }
.product-video-thumbnail span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.5rem; text-shadow: 0 1px 4px #000; }


.ProductSpecification {
    width: 25%;
    font-size: 1rem;
}

.ProductSpecification > div > span {
    font-size: 1.56rem;
    font-weight: bold;
}

.ProductSpecification > * {
    margin-bottom: 20px;
}

.ProductSpecification .btn {
    display: block;
    margin: 0 auto;
    width: 200px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.product-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.product-delivery-estimate {
    display: block;
    text-align: center;
    color: #14314e;
    font-size: 1rem;
    line-height: 1.4;
}

.product-actions-form {
    margin: 0;
}

.product-etsy-button {
    background: #f1641e;
    color: #ffffff;
    border: none;
    text-decoration: none;
}

.product-etsy-button:hover {
    background: #d94f16;
    color: #ffffff;
}

.product-assurance-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.product-assurance-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #42535d;
    line-height: 1.5;
}

.product-assurance-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: rgba(20, 49, 78, 0.08);
    color: #14314e;
    font-size: 0.85rem;
    flex: 0 0 28px;
}

.productDescription{
    width: calc(100% - 40px);
    margin-left: 20px;
    padding: 0;
    font-size: 1rem;
    line-height: 1.7;
}

.product-key-points {
    width: calc(100% - 40px);
    margin-left: 20px;
    padding: 18px;
    border: 1px solid rgba(20, 49, 78, 0.12);
    border-radius: 8px;
    background: #fffdfa;
}

.product-key-points h2 {
    margin: 0 0 14px;
    font-size: 3rem;
    line-height: 1.05;
    color: #14314e;
}

.product-key-points-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

.product-key-point {
    min-width: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(20, 49, 78, 0.08);
}

.product-key-point dt {
    margin-bottom: 4px;
    color: #14314e;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.product-key-point dd {
    margin: 0;
    color: #42535d;
    font-size: 0.95rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.product-question-section {
    padding: 0 50px 60px;
}

.product-question-card {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 28px 30px;
    border-radius: 28px;
    border: 1px solid rgba(28, 62, 107, 0.10);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 234, 0.96));
    box-shadow: 0 18px 40px rgba(28, 62, 107, 0.07);
}

.product-question-kicker {
    margin: 0 0 10px;
    color: var(--bleu);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-question-copy h2 {
    margin-bottom: 10px;
}

.product-question-copy p {
    color: #556570;
    line-height: 1.7;
}

.product-question-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    line-height: 1.6;
}

.product-question-alert--success {
    background: rgba(199, 233, 198, 0.36);
    border-color: rgba(100, 179, 0, 0.24);
    color: #29522a;
}

.product-question-alert--error {
    background: rgba(255, 239, 239, 0.9);
    border-color: rgba(177, 31, 31, 0.16);
    color: #9d2f2f;
}

.product-question-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.product-question-field {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: #243848;
}

.product-question-field > span {
    font-size: 1.3rem;
    line-height: 1.2;
}

.product-question-field input,
.product-question-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(28, 62, 107, 0.16);
    border-radius: 16px;
    background: #fffdfa;
    color: #243848;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.product-question-field input:focus,
.product-question-field textarea:focus {
    outline: none;
    border-color: rgba(28, 62, 107, 0.34);
    box-shadow: 0 0 0 4px rgba(28, 62, 107, 0.10);
    background: #ffffff;
}

.product-question-field textarea {
    resize: vertical;
    min-height: 150px;
}

.product-question-actions {
    display: flex;
    justify-content: flex-start;
}

@media (min-height: 600px) and (max-width: 1000px), (max-width: 850px) {

    #overlay img {
        filter: brightness(1);
    }
    

    #product_page .horizontalFlexContainer{
        padding-top: 6px;
        flex-direction: column;
        height: unset;
    }

    #product_page .horizontalFlexContainer > div {
        width: 100%;
        /* max-width: 500px;
        margin: auto; */
    }

    .product-media-column {
        display: contents;
    }

    .main-img-container{
        order: 2;
        width: 100%;
        margin-left: 0;
        padding: 12px;
        margin-bottom: 20px;
        min-height: 0;
    }

    .main-img{
        width: 100%;
    }

    #product_page .thumbnails{
        flex-direction: row;
        justify-content: left;
    }

    .left-div{
        order: 1;
        justify-content: left;
        height: auto;
    }

    .ProductSpecification {
        order: 3;
    }

    .productDescription {
        order: 4;
        width: 100%;
        margin-left: 0;
    }

    .product-key-points {
        order: 5;
        width: 100%;
        margin-left: 0;
    }

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

    #product_page .thumbnail{
        width: 14vw;
        max-width: 75px;
        height: 14vw;
        max-height: 75px;
        margin: 0 1.5vw 1.5vw 0;
    } 
}


@media (max-width: 480px) {

    #overlay img {
        filter: brightness(1);
    }
    

    .pp_header h1{
        margin-bottom: 0 !important;
    }

    .product-back-wrap {
        padding-top: 4px;
    }

    .btn-back{
        width: auto;
    }
        

    .productDescription{
        width: 100%;
        margin-left: 0;
        font-size: 1rem;
        padding: 0;
    }

    .product-key-points {
        padding: 14px;
    }

    .product-key-points h2 {
        font-size: 10vw;
    }

    .product-key-point dt {
        font-size: 0.72rem;
    }

    .product-key-point dd {
        font-size: 0.9rem;
    }

    .product-actions {
        margin-top: 18px;
    }

    .product-assurance-list {
        margin-top: 18px;
    }

    .product-question-section {
        padding: 0 20px 40px;
    }

    .product-question-card {
        padding: 22px 18px;
        border-radius: 22px;
    }

}

/* Full-width details keep the text and the reassurance images readable together. */
#product_page .product-key-points-section {
 width: calc(100% - 6%); margin: 0 3% 28px; padding: clamp(16px, 2vw, 28px);
}
.product-key-points-section--illustrated { display: grid; grid-template-columns: minmax(0, 1fr) clamp(192px, 20.4vw, 288px); gap: clamp(24px, 3vw, 44px); align-items: start; }
.product-key-points-copy { min-width: 0; }
.product-detail-media { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-detail-media img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 12px; }
.product-detail-media a { display: block; min-width: 0; cursor: zoom-in; border-radius: 12px; }
.product-detail-media a:focus-visible { outline: 2px solid #14314e; outline-offset: 4px; }
.product-lightbox-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: #14314e; font-size: 30px; cursor: pointer; z-index: 102; }
#overlay-img { filter: none; }
@media (max-width: 1023px) {
 .product-key-points-section--illustrated { grid-template-columns: 1fr; }
 .product-detail-media { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 639px) { .product-detail-media { grid-template-columns: 1fr; } }

/* A compact grid has no reserved slot when the optional video is absent. */
#product_page .left-div { height: auto; }
#product_page .thumbnails {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    height: auto;
    align-content: start;
}
#product_page .thumbnail {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    aspect-ratio: 1;
    margin: 0;
}
@media (min-height: 600px) and (max-width: 1000px), (max-width: 850px) {
    #product_page .thumbnails { grid-template-columns: repeat(auto-fill, minmax(56px, 75px)); gap: 10px; margin-bottom: 16px; }
}
