/* ============================================================
   Product Interior Visualization — variables
   ============================================================ */
:root {
    --pv-red:        #c2001b;
    --pv-red-hover:  #9e0016;
    --pv-border:     #e8e8e8;
    --pv-gray-bg:    #f4f4f4;
    --pv-text:       #1a1a1a;
    --pv-muted:      #777;
    --pv-radius-btn: 50px;
}

/* ============================================================
   Trigger button (product page)
   ============================================================ */
.pv-trigger-wrapper {
    margin-bottom: 16px;
}

.pv-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border: 1.5px solid var(--pv-red);
    background: #fff;
    color: var(--pv-red);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: var(--pv-radius-btn);
    transition: background 0.18s, color 0.18s;
}

.pv-open-btn:hover {
    background: var(--pv-red);
    color: #fff;
}

/* ============================================================
   Overlay + popup shell
   ============================================================ */
.pv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.6);
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.pv-overlay.is-open {
    display: flex;
}

body.pv-overlay-open {
    overflow: hidden;
}

.pv-popup {
    position: relative;
    background: #fff;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

/* ============================================================
   Radio-tab system
   ============================================================ */
.pv-popup > input[type="radio"] {
    display: none;
}

.pv-tab {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

#step-upload:checked    ~ .pv-tab-upload,
#step-processing:checked ~ .pv-tab-processing,
#step-result:checked    ~ .pv-tab-result {
    display: flex;
}

/* ============================================================
   Header
   ============================================================ */
.pv-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    border-bottom: 1px solid var(--pv-border);
}

.pv-header--result {
    justify-content: space-between;
}

.pv-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--pv-muted);
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    padding: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.pv-close-btn:hover, .pv-close-btn:focus {
    color: var(--pv-text);
    background: inherit;
}

.pv-back-btn {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--pv-text);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    margin-left: 78px;
}

.pv-back-btn:hover, .pv-back-btn:focus {
    background: inherit;
    color: inherit;
}

/* ============================================================
   Body (sidebar + image)
   ============================================================ */
.pv-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pv-sidebar {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    /*! padding: 24px; */
    border-right: 1px solid var(--pv-border);
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 78px;
    padding-right: 32px;
    padding-top: 32px;
    min-width: 480px;
}

.pv-image-area {
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    height: 100%;
    display: flex;
    width: 100%;
    margin-right: 77px;
}

.pv-image-area-inside-wrapper {
    width: 100%;
    padding: 24px;
    align-items: center;
    justify-content: center;
    display: flex;
}

/* ============================================================
   Upload step
   ============================================================ */
.pv-upload-title {
    margin-bottom: 24px;
}

.pv-title {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--pv-text);
    font-size: 28px;
    font-style: normal;
    font-weight: 400;
    line-height: 30px;
}

.pv-subtitle {
    font-size: 18px;
    color: var(--pv-muted);
    margin: 0;
    line-height: 1.5;
}

.pv-hints {
    margin-bottom: 24px;
    /*! flex: 1; */
}

.pv-hints-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pv-muted);
}

.pv-hints-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pv-hints-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #585858;
    line-height: 1.4;
    margin-bottom: 10px;
}

.pv-hints-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #B20200;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pv-upload-area {
    /*! margin-top: auto; */
}

.pv-errors {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff4f4;
    border: 1px solid #fbb;
    font-size: 13px;
    color: #b00;
    border-radius: 8px;
}

.pv-errors.hidden {
    display: none;
}

.pv-error-item + .pv-error-item {
    margin-top: 4px;
}

.pv-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: var(--pv-red);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: var(--pv-radius-btn);
    transition: background 0.18s;
    white-space: nowrap;
}

.pv-upload-btn:hover {
    background: var(--pv-red-hover);
}

.pv-upload-btn-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.pv-upload-terms {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--pv-muted);
    line-height: 1.5;
    text-align: left;
    font-size: 16px;
}

.pv-upload-terms a {
    color: inherit;
    text-decoration: underline;
}

/* Product image with full-motif overlay */
.pv-product-image-wrap,
.pv-result-image-wrap {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
}

.pv-product-image-wrap picture,
.pv-result-image-wrap picture {
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 1;
    width: auto;
    height: auto;
    align-items: center;
    justify-content: center;
    display: flex;
}

.pv-product-image-wrap picture .pv-product-img,
.pv-result-image-wrap picture img {
    height: auto;
    width: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}

.pv-fullmotif-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.92);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pv-text);
    backdrop-filter: blur(4px);
    pointer-events: none;
    border: 1.5px solid rgba(149, 149, 149, 0.30);
    box-shadow: 0px 6px 12px 0px rgb(94 94 94 / 12%), 0px 8px 24px 0px rgb(94 94 94 / 8%);
}

.pv-fullmotif-icon {
    font-size: 14px;
}

/* ============================================================
   Processing step
   ============================================================ */
.pv-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.pv-skeleton-row {
    height: 42px;
    background: var(--pv-border);
    border-radius: var(--pv-radius-btn);
    animation: pv-shimmer 1.4s ease-in-out infinite;
}

@keyframes pv-shimmer {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.pv-image-area--processing {
    background: var(--pv-gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-processing-inner {
    text-align: center;
    padding: 32px 24px;
}

.pv-processing-title {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pv-text);
    margin: 0 0 8px;
    font-size: 36px;
    font-style: normal;
    font-weight: 400;
    line-height: 40px
}

.pv-processing-subtitle {
    color: var(--pv-muted);
    margin: 0 0 24px;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
}

.pv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--pv-border);
    border-top-color: var(--pv-red);
    border-radius: 50%;
    margin: 0 auto;
    animation: pv-spin 0.8s linear infinite;
}

@keyframes pv-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Result step
   ============================================================ */
.pv-result-title {
    margin-bottom: 20px;
}

.pv-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.pv-action-btn {
    width: 100%;
    padding: 13px 16px;
    background: #fff;
    border: 1.5px solid var(--pv-red);
    color: var(--pv-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: var(--pv-radius-btn);
    transition: background 0.18s, color 0.18s;
}

.pv-action-btn:hover, .pv-action-btn:focus {
    background: var(--pv-red);
    color: #fff;
}

.pv-action-btn--primary {
    background: var(--pv-red);
    color: #fff;
}

.pv-action-btn--primary:hover, .pv-action-btn--primary:focus {
    background: var(--pv-red-hover);
}

.pv-action-btn.hidden {
    display: none;
}

.pv-result-note {
    color: var(--pv-muted);
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

/* Result image with expand overlay */

.pv-expand-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid rgba(149, 149, 149, 0.30);
    box-shadow: 0px 6px 12px 0px rgb(94 94 94 / 12%), 0px 8px 24px 0px rgb(94 94 94 / 8%);
    padding: 0;
    cursor: pointer;
    background: white;
}

.pv-expand-btn img {
    width: 22px;
    height: 22px;
    display: inline-block;
}

.pv-expand-btn:hover, .pv-expand-btn:focus {
    background: #fff;
}

.pv-expand-btn.hidden {
    display: none;
}

/* ============================================================
   Lightbox (full-window zoom overlay inside .pv-popup)
   ============================================================ */
.pv-lightbox {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.pv-lightbox.hidden {
    display: none;
}

.pv-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    border-bottom: 1px solid var(--pv-border);
}

.pv-lightbox-body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
}

.pv-lightbox-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================================
   Inspiration-only disclaimer (bottom sheet within result tab)
   ============================================================ */
.pv-disclaimer {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10;
}

.pv-disclaimer.hidden {
    display: none;
}

.pv-disclaimer-inner {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pv-disclaimer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.pv-disclaimer-title {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    color: var(--pv-text);
    font-size: 18px;
    font-style: normal;
    line-height: 26px;
    margin-left: 16px;
}

.pv-disclaimer-text {
    font-size: 13px;
    color: var(--pv-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.pv-disclaimer-footer {
    margin: 0px 16px 24px;
}

.pv-disclaimer-btn {
    width: 100%;
    padding: 14px;
    background: var(--pv-red);
    color: #fff;
    border: none;
    border-radius: var(--pv-radius-btn);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s;
}

.pv-disclaimer-btn:hover {
    background: var(--pv-red-hover);
}

.pv-open-btn__summary p.highlight {
    cursor: pointer;
}

.pv-open-btn__image {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 2;
    border-radius: 30px;
    border: 1.5px solid rgba(187, 187, 187, 0.30);
    background: white;
    display: flex;
    align-items: center;
    padding: 6px 14px;
    color: var(--Text-Second, #585858);
    font-size: 16px;
    line-height: 24px;
    gap: 4px;
    cursor: pointer;
}

/* ============================================================
   Mobile  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
    .pv-overlay {
        padding: 0;
        align-items: stretch;
    }

    .pv-popup {
        border-radius: 0;
    }

    .pv-body {
        flex-direction: column;
        overflow-y: auto;
    }

    /* --- Upload: dissolve sidebar so children participate in pv-body flex --- */
    .pv-tab-upload .pv-sidebar {
        display: contents;
    }

    .pv-tab-upload .pv-upload-title {
        order: 0;
        padding: 16px 18px 0;
    }

    .pv-tab-upload .pv-image-area {
        order: 1;
        min-height: 220px;
        max-height: 34vh;
    }

    .pv-tab-upload .pv-hints {
        order: 2;
        padding: 16px 18px 0;
        margin-bottom: 0;
        flex: none;
    }

    .pv-tab-upload .pv-upload-area {
        order: 3;
        padding: 16px 18px 24px;
    }

    /* --- Processing --- */
    .pv-tab-processing .pv-sidebar {
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--pv-border);
        padding: 16px 18px;
        order: 2;
    }

    .pv-tab-processing .pv-image-area {
        order: 1;
        min-height: 200px;
    }

    /* --- Result --- */
    .pv-tab-result .pv-body {
        flex-direction: column;
    }

    .pv-tab-result .pv-image-area {
        order: 1;
        min-height: 220px;
        max-height: 40vh;
        border-right: none;
        flex: none;
    }

    .pv-tab-result .pv-sidebar {
        order: 2;
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--pv-border);
        padding: 16px 18px 24px;
        min-width: auto;
    }

    .pv-sidebar {
        width: 100%;
        border-right: none;
        padding: 18px;
    }

    .pv-image-area {
        padding: 0;
    }

    .pv-title {
        font-size: 17px;
    }

    .pv-result-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .pv-disclaimer-inner {
        border-radius: 12px 12px 0 0;
        max-width: 100%;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .pv-fullmotif-btn {
        right: 8px;
        bottom: 8px;
    }

    .pv-image-area {
        border: none;
    }

    .pv-image-area-inside-wrapper {
        padding: 12px;
    }

    .pv-close-btn {
        width: 58px;
        height: 58px;
    }

    .pv-processing-title {
        font-size: 22px;
        line-height: 30px;
    }

    .pv-processing-subtitle {
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
    }

    .pv-back-btn {
        margin-left: 16px;
    }

    .pv-open-btn__image {
        left: 16px;
        bottom: 16px;
    }
}
