/* Shared by the editor dialog and its same-origin product detail frame. */

.editor-page #editorProductInfoModal {
    padding: 20px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    box-sizing: border-box;
    background: #14203999;
    backdrop-filter: blur(8px);
}

.editor-page #editorProductInfoModal .editor-product-info-dialog {
    width: min(1160px, calc(100vw - 40px));
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    grid-template-columns: minmax(0, 1fr);
    height: min(820px, calc(100dvh - 40px));
    grid-template-rows: 72px minmax(0, 1fr);
    border-radius: 22px;
    border: 1px solid #e0e6f0;
    box-shadow: 0 28px 80px #0c183b35;
}

.editor-page #editorProductInfoModal .editor-product-info-header {
    padding: 0 76px 0 22px;
    gap: 12px;
    background: #fff;
}

.editor-page #editorProductInfoModal .editor-product-info-heading {
    color: #1b2740;
    font-size: 16px;
    font-weight: 650;
}

.editor-page #editorProductInfoModal .editor-product-info-subtitle {
    color: #020202;
    font-size: 11px;
    line-height: 1.5;
}

.editor-page #editorProductInfoModal .editor-product-info-icon {
    background: #edf3ff;
    border-color: #d5e2ff;
    color: #0051bb;
}

.editor-page #editorProductInfoModal .editor-product-info-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid #e0e6f0;
    border-radius: 12px;
    background: #f6f8fc;
    color: #53617a;
    box-shadow: none;
}

.editor-page #editorProductInfoModal .editor-product-info-close:focus-visible {
    outline: 3px solid #abc0f4;
    outline-offset: 2px;
}

.editor-page #editorProductInfoModal .editor-product-info-skeleton-media {
    min-height: 0;
}

.editor-page #editorProductInfoModal .editor-product-info-body {
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.editor-page #editorProductInfoModal iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
}

html.modal-product-document {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b9c6d8 #f5f7fb;
}

body.modal-product-detail {
    background: #fff;
    color: #1b2740;
}

.modal-product-detail .page {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 22px 24px 28px;
}

.modal-product-detail .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    align-items: start;
    padding-bottom: 22px;
    border-bottom: 1px solid #e6ebf3;
}

.modal-product-detail .gallery {
    position: static;
    grid-column: 1;
    min-width: 0;
    margin: 0 calc(-1 * var(--detail-page-gutter));
    border-radius: 0;
}

.modal-product-detail .gallery-main {
    --detail-media-height: clamp(280px, 52dvh, 420px);
    min-width: 0;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 0;
}

.modal-product-detail .stage {
    min-width: 0;
    height: var(--detail-media-height);
    min-height: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.modal-product-detail .stage::before {
    display: none;
}

.modal-product-detail .stage::after {
    top: 12px;
    left: 12px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 9px;
    border-color: #e1e7f2;
    color: #000;
    font-size: 10px;
    box-shadow: none;
}

.modal-product-detail .stage :is(#mainImage, #mainVideo) {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 38px 18px 18px;
    object-fit: contain;
    background: #ffffff;
    filter: none;
}

.modal-product-detail .thumbs-shell {
    width: 136px;
    height: var(--detail-media-height);
    min-height: 0;
    padding: 18px 12px;
    gap: 6px;
    border-right: 1px solid #e5ebf4;
    background: #fafbfe;
}

.modal-product-detail .thumbs-shell .thumbs {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 100%;
    flex: 1 1 auto;
    padding: 2px;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    border-radius: 0;
}

.modal-product-detail .thumb {
    width: 100% !important;
    min-width: 0 !important;
    height: 88px;
    min-height: 88px;
    flex: 0 0 88px;
    padding: 5px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #dfe6f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    transform: none;
}

.modal-product-detail .thumb :is(img, video) {
    width: 54px;
    height: 54px;
    object-fit: contain;
    padding: 0;
    transform: none;
}

.modal-product-detail .thumb span:not(.thumb-video-icon) {
    position: static;
    width: auto;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: #020202;
    font-size: 10px !important;
    line-height: 16px;
}

.modal-product-detail .thumb.active {
    background: #edf3ff;
    border-color: #5c7edb;
    box-shadow: inset 0 0 0 1px #5c7edb;
}

.modal-product-detail .thumb.active span:not(.thumb-video-icon) {
    color: #0051bb;
    font-weight: 600;
}

.modal-product-detail .thumb-nav {
    width: 100%;
    height: 28px;
    min-height: 28px;
    flex: 0 0 28px;
    box-shadow: none;
}

.modal-product-detail .gallery-caption {
    right: 12px;
    bottom: 12px;
    padding: 0;
    margin: 0;
    color: #020202;
    font-size: 10px;
}

.modal-product-detail .summary {
    position: static;
    grid-column: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 0 0;
}

.modal-product-detail .summary .badge {
    color: #0051bb;
    font-size: 11px;
    font-weight: 600;
}

.modal-product-detail .summary h1 {
    margin: 5px 0 7px;
    color: #1b2740;
    font-weight: 650 !important;
    overflow-wrap: anywhere;
}

.modal-product-detail .summary .price {
    margin: 0 0 20px;
    padding: 0;
    color: #1b2740;
    font-weight: 700 !important;
}

.modal-product-detail .option-panel {
    margin: 16px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e5ebf4;
}

.modal-product-detail .option-title {
    margin-bottom: 12px;
    color: #020202;
    font-size: 12px;
}

.modal-product-detail .option-title strong {
    color: #26354e;
    font-size: 12px;
}

.modal-product-detail .colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px;
}

.modal-product-detail .colors .color-dot {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 1px #cdd6e5;
}

.modal-product-detail .colors .color-dot.active {
    outline: 2px solid #315bd3;
    outline-offset: 3px;
}

.modal-product-detail .customize-note {
    margin-top: 18px;
    padding: 12px 0px;
    border-radius: 12px;
    background: #f3f6fc;
    color: #020202;
    font-size: 12px;
    line-height: 1.8;
}

.modal-product-detail .specs {
    margin: 16px 0;
    grid-template-columns: 1fr;
}

.modal-product-detail .spec {
    padding: 10px 0;
}

.modal-product-detail .spec:nth-child(even) {
    padding-left: 0;
    border-left: 0;
}

.modal-product-detail .spec strong {
    font-size: 12px;
    color: #34425b;
}

.modal-product-detail .details-nav {
    position: sticky;
    top: 0;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    gap: 8px;
}

.modal-product-detail .details-nav:has(> a:only-child) {
    display: none;
}

.modal-product-detail .details {
    margin: 0;
    padding: 0;
    gap: 0;
}

.modal-product-detail .detail-card {
    padding: 22px 0;
    border: 0;
    border-bottom: 1px solid #e6ebf3;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    scroll-margin-top: 60px;
}

.modal-product-detail .detail-head {
    margin-bottom: 12px;
    gap: 10px;
}

.modal-product-detail .detail-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #eef3ff;
    font-size: 17px;
}

.modal-product-detail .detail-card h2 {
    font-size: 16px !important;
    color: #26354e;
}

.modal-product-detail .rich-text {
    color: #66748c;
    font-size: 13px;
    line-height: 1.85;
}

@media (max-width: 700px) {
    .editor-page #editorProductInfoModal {
        padding: 8px;
    }
    .editor-page #editorProductInfoModal .editor-product-info-dialog {
        width: 100%;
        height: calc(100dvh - 16px);
        grid-template-rows: 68px minmax(0, 1fr);
        border-radius: 18px;
    }
    .editor-page #editorProductInfoModal .editor-product-info-header {
        padding-left: 14px;
        padding-right: 60px;
        gap: 9px;
    }
    .editor-page #editorProductInfoModal .editor-product-info-heading {
        font-size: 14px;
    }
    .editor-page #editorProductInfoModal .editor-product-info-subtitle {
        font-size: 10px;
    }
    .editor-page #editorProductInfoModal .editor-product-info-close {
        top: 14px;
        right: 10px;
    }
    .modal-product-detail .page {
        --detail-page-gutter: 14px;
        padding: 0 var(--detail-page-gutter) 24px;
    }
    .modal-product-detail .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .modal-product-detail .gallery-main {
        --detail-media-height: clamp(260px, 50dvh, 380px);
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0;
    }
    .modal-product-detail .thumbs-shell {
        width: 96px;
    }
    .modal-product-detail .thumb {
        height: 88px;
        min-height: 88px;
        flex-basis: 88px;
    }
    .modal-product-detail .thumb :is(img, video) {
        width: 38px;
        height: 42px;
    }
    .modal-product-detail .summary {
        padding: 0;
    }
    .modal-product-detail .summary h1 {
        font-size: 22px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .editor-page #editorProductInfoModal *,
    .modal-product-detail * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* Product detail content refresh: card hierarchy and scannable information. */

body.modal-product-detail {
    background: #f5f7fb;
    color: #1e293b;
}

.modal-product-detail .page {
    --detail-page-gutter: clamp(18px, 2.6vw, 34px);
    padding: 0 var(--detail-page-gutter) 36px;
}

.modal-product-detail .hero {
    padding: 0 0 28px;
    border-bottom: 0;
}

.modal-product-detail .details-nav {
    position: sticky;
    top: 10px;
    z-index: 20;
    width: max-content;
    max-width: 100%;
    margin: 18px auto 16px;
    padding: 6px;
    gap: 4px;
    border: 1px solid #dfe6f1;
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 30px rgba(28, 45, 78, .10);
    backdrop-filter: blur(16px);
    scrollbar-width: none;
}

.modal-product-detail .details-nav::-webkit-scrollbar {
    display: none;
}

.modal-product-detail .details-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 10px;
    color: #6b778d;
    font-size: 12px;
    font-weight: 650;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.modal-product-detail .details-nav a i {
    margin-right: 7px;
    color: #8190a8;
    font-size: 17px;
}

.modal-product-detail .details-nav a:hover {
    background: #f0f4fb;
    color: #2548aa;
}

.modal-product-detail .details-nav a.active {
    background: linear-gradient(135deg, #315bd3, #2247ad);
    color: #fff;
    box-shadow: 0 8px 18px rgba(49, 91, 211, .24);
}

.modal-product-detail .details-nav a.active i {
    color: #fff;
}

.modal-product-detail .details {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin: 0;
    padding: 0 0 12px;
}

.modal-product-detail .detail-column {
    display: contents;
    min-width: 0;
    gap: 16px;
    align-content: start;
}

.modal-product-detail .detail-card {
    position: relative;
    padding: 22px;
    border: 1px solid #e1e7f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 48, 79, .055);
    overflow: hidden;
    scroll-margin-top: 82px;
}

.modal-product-detail .detail-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #315bd3, #8fb0ff);
    opacity: .9;
}

.modal-product-detail .detail-head {
    margin: 0 0 14px;
    gap: 11px;
}

.modal-product-detail .detail-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #dce6fb;
    border-radius: 12px;
    background: #edf3ff;
    color: #315bd3;
    font-size: 19px;
}

.modal-product-detail .detail-card h2 {
    color: #26354e;
    font-size: 16px !important;
    font-weight: 700;
    letter-spacing: -.15px;
}

.modal-product-detail .detail-description {
    margin: -4px 0 18px 49px;
    color: #758198;
    font-size: 12px;
    line-height: 1.65;
}

.modal-product-detail .rich-text {
    color: #55647d;
    font-size: 13px;
    line-height: 1.75;
}

.modal-product-detail .about-intro {
    margin-bottom: 16px;
    color: #596880;
}

.modal-product-detail .about-intro :is(p, ul, ol):last-child {
    margin-bottom: 0;
}

.modal-product-detail .about-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.modal-product-detail .about-content .about-paragraph {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: #f8faff;
    color: #53627a;
    font-size: 12px;
    line-height: 1.55;
}

.modal-product-detail .about-check {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    display: inline-grid;
    place-items: center;
    margin-top: 1px;
    border-radius: 50%;
    background: #e4edff;
    color: #315bd3;
    font-size: 13px;
}

.modal-product-detail :is(.mini-grid, .care-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.modal-product-detail .mini-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid #e7ecf4;
    border-radius: 13px;
    background: #f9fbfe;
    color: #637188;
    font-size: 12px;
    line-height: 1.6;
}

.modal-product-detail .mini-card strong {
    margin-bottom: 5px;
    color: #334159;
    font-size: 12px;
    font-weight: 700;
}

.modal-product-detail .care-card {
    align-items: center;
    gap: 10px;
    padding: 11px;
}

.modal-product-detail .care-card i {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border: 1px solid #dce6fb;
    border-radius: 10px;
    background: #edf3ff;
    color: #315bd3;
    font-size: 18px;
}

.modal-product-detail .table-wrap {
    border-color: #e3e9f2;
    border-radius: 13px;
    box-shadow: none;
}

@media (hover: hover) {
    .modal-product-detail .detail-card {
        transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    }
    .modal-product-detail .detail-card:hover {
        border-color: #d2ddec;
        box-shadow: 0 14px 34px rgba(31, 48, 79, .085);
        transform: translateY(-1px);
    }
}

@media (max-width: 900px) {
    .modal-product-detail .details {
        grid-template-columns: minmax(0, 1fr);
    }
    .modal-product-detail .detail-column {
        display: contents;
    }
}

@media (max-width: 620px) {
    .modal-product-detail .page {
        --detail-page-gutter: 12px;
        padding: 0 var(--detail-page-gutter) 24px;
    }
    .modal-product-detail .details-nav {
        top: 6px;
        width: 100%;
        justify-content: flex-start;
        margin: 12px 0;
        border-radius: 13px;
    }
    .modal-product-detail .details-nav a {
        min-height: 38px;
        padding: 8px 11px;
    }
    .modal-product-detail .detail-card {
        padding: 18px 16px;
        border-radius: 15px;
    }
    .modal-product-detail .detail-description {
        margin-left: 0;
    }
    .modal-product-detail .about-highlights,
    .modal-product-detail :is(.mini-grid, .care-grid) {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Definite image viewport keeps the whole garment visible until explicit zoom. */

.modal-product-detail .product-detail-pan-area {
    position: absolute;
    inset: 50px 20px 76px;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    touch-action: pan-y;
}

.modal-product-detail .product-detail-pan-area::-webkit-scrollbar {
    display: none;
}

.modal-product-detail .product-detail-pan-area.is-zoomed {
    cursor: grab;
    touch-action: none;
}

.modal-product-detail .product-detail-pan-area.is-dragging {
    cursor: grabbing;
}

.modal-product-detail .product-detail-zoom-layer {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
}

.modal-product-detail #imageStage #mainImage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    padding: 10px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    transform: none;
    filter: none;
    transition: opacity .18s ease;
    cursor: inherit;
    user-select: none;
}

.modal-product-detail .product-detail-zoom-toolbar {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    width: min(360px, calc(100% - 28px));
    min-height: 44px;
    padding: 5px 8px;
    transform: translateX(-50%);
    border: 1px solid #dce5f3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 20px #253b6510;
}

.modal-product-detail .product-detail-zoom-toolbar button {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font-size: 17px;
}

.modal-product-detail .product-detail-zoom-toolbar button:hover:not(:disabled) {
    background: #eef3ff;
}

.modal-product-detail .product-detail-zoom-toolbar button:disabled {
    opacity: .4;
    cursor: default;
}

.modal-product-detail .product-detail-zoom-toolbar input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    accent-color: #315bd3;
    cursor: pointer;
}

.modal-product-detail .product-detail-zoom-toolbar output {
    flex: 0 0 56px;
    padding: 8px 4px;
    border: 1px solid #e0e7f1;
    border-radius: 8px;
    background: #f7f9fc;
    color: #334155;
    font-size: 10px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.modal-product-detail .product-detail-zoom-toolbar :focus-visible,
.modal-product-detail .product-detail-pan-area:focus-visible {
    outline: 2px solid #89a9fa;
    outline-offset: 2px;
}

.modal-product-detail :is(.product-detail-pan-area, .product-detail-zoom-toolbar)[hidden] {
    display: none;
}

.modal-product-detail .gallery-caption {
    top: 32px;
    bottom: auto;
    right: 76px;
}

.modal-product-detail .product-color-render-status {
    bottom: 68px;
}

@media (max-width: 580px) {
    .modal-product-detail .gallery-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        --detail-media-height: clamp(240px, 46dvh, 340px);
    }
    .modal-product-detail .stage {
        order: 1;
    }
    .modal-product-detail .thumbs-shell {
        order: 2;
        width: 100%;
        height: auto;
        padding: 8px 10px;
        border-right: 0;
        border-top: 1px solid #e5ebf4;
    }
    .modal-product-detail .thumbs-shell .thumbs {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .modal-product-detail .thumb {
        width: 78px !important;
        min-width: 78px !important;
        height: 82px;
        min-height: 82px;
        flex: 0 0 78px;
    }
    .modal-product-detail .thumb :is(img, video) {
        width: 44px;
        height: 50px;
    }
    .modal-product-detail .thumb-nav {
        width: 28px;
        height: 70px;
    }
    .modal-product-detail .product-detail-pan-area {
        inset: 44px 10px 62px;
    }
    .modal-product-detail .product-detail-zoom-toolbar {
        bottom: 10px;
        gap: 4px;
    }
}