.product-detail-page {
    --product-ink: #333338;
    --product-muted: #77777d;
    --product-line: #dededb;
    --product-soft: #f5f5f3;
    --product-accent: #7f0019;
    box-sizing: border-box;
    width: min(100%, 1280px);
    padding: 24px 40px 112px;
    margin: 0 auto;
    color: var(--product-ink);
}

.product-detail-page *,
.product-detail-page *::before,
.product-detail-page *::after {
    box-sizing: border-box;
}

.product-detail-page .detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    width: min(100%, 1110px);
    margin: 8px auto 38px;
    overflow: hidden;
    color: #747474;
    font-size: 12px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-detail-page .detail-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.product-detail-page .detail-breadcrumb a:hover,
.product-detail-page .detail-breadcrumb a:focus-visible {
    color: var(--product-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-detail-page .detail-grid {
    display: grid;
    grid-template-columns: 54px minmax(0, 560px) minmax(350px, 420px);
    align-items: start;
    justify-content: center;
    gap: 22px;
}

.product-detail-page .thumbnail-list {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    height: min(746px, calc(100vh - 174px));
    min-height: 470px;
}

/* Keep the complete product gallery visible while long SKU lists scroll.
   Sticky positioning remains bounded by .detail-grid, so the gallery releases
   naturally before the product description and specification sections. */
@media (min-width: 921px) {
    .product-detail-page .thumbnail-list,
    .product-detail-page .detail-media-column {
        position: sticky;
        top: 76px;
        align-self: start;
    }
}

.product-detail-page .thumbnail-list .thswp {
    width: 100%;
    height: 100%;
}

.product-detail-page .thumbnail-list .swiper-slide {
    position: relative;
    width: 54px;
    height: 72px !important;
    overflow: hidden;
    background: var(--product-soft);
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .18s ease, opacity .18s ease;
}

.product-detail-page .thumbnail-list .swiper-slide::after {
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    content: "";
    pointer-events: none;
}

.product-detail-page .thumbnail-list .swiper-slide:hover {
    opacity: .76;
}

.product-detail-page .thumbnail-list .swiper-slide-thumb-active {
    border-color: var(--product-ink);
}

.product-detail-page .thumbnail-list .swiper-slide-thumb-active::after {
    border-color: #fff;
}

.product-detail-page .thumbnail-list img {
    display: block;
    width: 100%;
    height: 100% !important;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center;
}

.product-detail-page .detail-video-thumb {
    position: relative;
    display: grid;
    place-items: center;
    color: #fff;
    background: #29292d !important;
}

.product-detail-page .detail-video-thumb span {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding-left: 2px;
    font-size: 11px;
    background: rgba(0, 0, 0, .58);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.product-detail-page .detail-thumb-controls {
    display: grid;
    gap: 0;
}

.product-detail-page .detail-thumb-controls button {
    display: grid;
    place-items: center;
    height: 31px;
    padding: 0;
    color: var(--product-ink);
    font-size: 20px;
    line-height: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.product-detail-page .detail-thumb-controls button:hover:not(.swiper-button-disabled) {
    background: #f6f6f6;
}

.product-detail-page .detail-thumb-controls button.swiper-button-disabled {
    color: #d2d2d2;
    cursor: default;
}

.product-detail-page .detail-media-column {
    min-width: 0;
}

.product-detail-page .detail-main-image {
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--product-soft);
}

.product-detail-page .detail-main-image .maxswp,
.product-detail-page .detail-main-image .swiper-wrapper,
.product-detail-page .detail-main-image .swiper-slide,
.product-detail-page .video-container {
    width: 100%;
    height: 100%;
}

.product-detail-page .detail-main-image .maxswp {
    height: 100% !important;
    aspect-ratio: auto;
}

.product-detail-page .detail-main-image img,
.product-detail-page .detail-main-image video {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
}

.product-detail-page .detail-main-image video {
    background: #111216;
}

.product-detail-page .detail-main-image .swiper-pagination {
    display: none;
}

.product-detail-page .detail-model-link {
    margin-top: 17px;
    text-align: right;
}

.product-detail-page .detail-model-link a {
    color: var(--product-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.product-detail-page .detail-model-link a:hover {
    color: var(--product-accent);
}

.product-detail-page .detail-info {
    min-width: 0;
    padding: 18px 0 0 28px;
}

.product-detail-page .detail-info h1 {
    max-width: 420px;
    margin: 0;
    color: var(--product-ink);
    font-size: clamp(23px, 1.65vw, 29px);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .01em;
}

.product-detail-page .sku {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin: 22px 0 0;
    color: var(--product-muted);
    font-size: 12px;
    font-weight: 500;
}

.product-detail-page .sku strong {
    color: var(--product-ink);
    font-weight: 600;
}

.product-detail-page .detail-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 42px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--product-line);
}

.product-detail-page .detail-price b {
    color: var(--product-ink);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.product-detail-page .detail-price small {
    color: var(--product-muted);
    font-size: 12px;
}

.product-detail-page .detail-info h3 {
    margin: 32px 0 0;
    color: var(--product-ink);
    font-size: 15px;
    font-weight: 600;
}

.product-detail-page .detail-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 19px 0 0;
}

.product-detail-page .detail-swatches button {
    position: relative;
    width: 45px;
    height: 45px;
    padding: 0;
    background-position: center;
    background-size: cover;
    border: 3px solid #fff;
    border-radius: 50%;
    outline: 1px solid #d1d1ce;
    cursor: pointer;
    transition: transform .18s ease, outline-color .18s ease;
}

.product-detail-page .detail-swatches button:hover {
    transform: scale(1.05);
}

.product-detail-page .detail-swatches button.active {
    outline: 2px solid var(--product-ink);
    outline-offset: 1px;
}

.product-detail-page .detail-size-title {
    margin-top: 31px !important;
}

.product-detail-page .detail-material-section[hidden] {
    display: none;
}

.product-detail-page .material-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.product-detail-page .material-options button {
    min-height: 36px;
    padding: 7px 14px;
    color: #444448;
    font-size: 12px;
    line-height: 1.35;
    background: #fff;
    border: 1px solid #d4d4d1;
    border-radius: 3px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.product-detail-page .material-options button:hover {
    border-color: #89898c;
}

.product-detail-page .material-options button.active {
    color: #fff;
    background: var(--product-ink);
    border-color: var(--product-ink);
}

.product-detail-page .size-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 15px;
}

.product-detail-page .size-options button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    height: auto;
    padding: 5px 9px;
    overflow: hidden;
    color: #444448;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
    background: #fff;
    border: 1px solid #d4d4d1;
    border-radius: 3px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.product-detail-page .size-options button.has-split-label {
    min-height: 44px;
}

.product-detail-page .sku-label-kind,
.product-detail-page .sku-label-size {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-detail-page .sku-label-size {
    margin-top: 2px;
    color: #66666a;
    font-size: 11px;
}

.product-detail-page .sku-label-kind:only-child {
    display: -webkit-box;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-detail-page .sku-copy-hint {
    margin-left: 8px;
    color: #88888c;
    font-size: 11px;
    font-weight: 400;
}

.product-detail-page .sku-copy-hint.is-success {
    color: #237a4b;
}

.product-detail-page .size-options button:hover {
    border-color: #89898c;
}

.product-detail-page .size-options button.active {
    color: #fff;
    background: var(--product-ink);
    border-color: var(--product-ink);
}

.product-detail-page .detail-actions {
    display: block;
    margin-top: 24px;
}

.product-detail-page .detail-actions .add-variant-collect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    padding: 10px 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    background: var(--product-ink);
    border: 1px solid var(--product-ink);
    border-radius: 2px;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.product-detail-page .detail-actions .add-variant-collect:hover {
    background: #1c1c20;
}

.product-detail-page .detail-actions .add-variant-collect.ac {
    color: var(--product-accent);
    background: #fff;
    border-color: var(--product-accent);
}

.product-detail-page .detail-actions .add-variant-collect:disabled {
    color: #888;
    background: #ededeb;
    border-color: #dededb;
    cursor: not-allowed;
}

.favorite-fly-heart {
    position: fixed;
    z-index: 10050;
    width: 28px;
    height: 28px;
    color: #a8001e;
    pointer-events: none;
    filter: drop-shadow(0 5px 8px rgba(152, 0, 29, .22));
}

.favorite-fly-heart svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.head-collect.collect-badge-bump .action-badge {
    animation: collect-badge-bump .5s cubic-bezier(.22, .8, .25, 1);
}

@keyframes collect-badge-bump {
    0% { transform: scale(.45); }
    55% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.product-detail-page .product-description {
    width: min(100%, 1056px);
    margin: 92px auto 0;
    padding-top: 0;
    color: #3f3f43;
    font-size: 14px;
    line-height: 1.9;
}

.product-detail-page .product-detail-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--product-line);
}

.product-detail-page .product-detail-tab {
    position: relative;
    min-width: 0;
    padding: 20px 12px 18px;
    margin: 0;
    color: var(--product-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.product-detail-page .product-detail-tab::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    background: transparent;
    content: "";
}

.product-detail-page .product-detail-tab:hover {
    background: #f8f8f6;
}

.product-detail-page .product-detail-tab.active::after {
    background: var(--product-ink);
}

.product-detail-page .product-detail-tab:focus-visible {
    z-index: 1;
    outline: 2px solid var(--product-accent);
    outline-offset: -2px;
}

.product-detail-page .product-detail-panel {
    display: none;
    min-height: 220px;
    padding-top: 46px;
}

.product-detail-page .product-detail-panel.active {
    display: block;
}

.product-detail-page .product-description p {
    margin: 0 0 22px;
}

.product-detail-page .product-description img,
.product-detail-page .product-description video {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 32px auto;
}

.product-detail-page .product-description table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
}

.product-detail-page .product-description th,
.product-detail-page .product-description td {
    padding: 11px 13px;
    border: 1px solid var(--product-line);
}

/* Product specification tables: keep rich-text data intact while presenting it
   with the restrained density and low-contrast rules used on Japanese retail sites. */
.product-detail-page #product-panel-specification .product-spec-table-scroll {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 0 28px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.product-detail-page #product-panel-specification .product-spec-table-scroll:last-child {
    margin-bottom: 0;
}

.product-detail-page #product-panel-specification table {
    display: table;
    width: 100% !important;
    max-width: none;
    margin: 0 !important;
    color: #333 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    table-layout: auto;
    border-collapse: collapse !important;
    background: #fff !important;
}

.product-detail-page #product-panel-specification th,
.product-detail-page #product-panel-specification td {
    height: auto !important;
    padding: 10px 12px !important;
    color: #333 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1.45 !important;
    vertical-align: middle !important;
    border: 1px solid #d8d8d9 !important;
    overflow-wrap: normal;
    word-break: keep-all;
}

.product-detail-page #product-panel-specification th {
    font-weight: 600 !important;
    text-align: center;
    background: #f5f5f5 !important;
}

.product-detail-page #product-panel-specification td {
    font-weight: 400 !important;
    background: #fff !important;
}

.product-detail-page #product-panel-specification tbody td {
    white-space: nowrap;
}

.product-detail-page #product-panel-specification th > *,
.product-detail-page #product-panel-specification td > * {
    font-size: inherit !important;
    line-height: inherit !important;
}

.product-detail-page #product-panel-specification th p,
.product-detail-page #product-panel-specification td p {
    margin: 0 !important;
}

.product-ai-launcher {
    position: fixed; right: 24px; bottom: 24px; z-index: 1001; display: flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 18px; border: 0; border-radius: 24px; background: #173f34; color: #fff;
    font-size: 14px; font-weight: 700; box-shadow: 0 8px 28px rgba(0,0,0,.18); cursor: pointer;
}
.product-ai-launcher:hover { background: #0e3027; }
.product-ai-panel { position: fixed; right: 24px; bottom: 84px; z-index: 1002; width: min(400px, calc(100vw - 32px)); height: 560px; max-height: calc(100vh - 120px); background: #fff; border: 1px solid #dededb; box-shadow: 0 16px 50px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.product-ai-panel[hidden] { display: none; }
.product-ai-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 18px 16px; border-bottom: 1px solid #e7e7e4; }
.product-ai-header strong { display: block; font-size: 17px; color: #222; }
.product-ai-header small { display: block; margin-top: 4px; color: #777; font-size: 11px; }
.product-ai-header button { border: 0; background: none; color: #666; font-size: 26px; line-height: 1; cursor: pointer; }
.product-ai-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #e7e7e4; }
.product-ai-mode { min-height: 38px; padding: 0 14px; color: #173f34; font-weight: 700; background: #fff; border: 1px solid #aebbb6; border-radius: 3px; cursor: pointer; }
.product-ai-mode.active { color: #fff; background: #173f34; border-color: #173f34; }
.product-ai-mode:focus-visible { outline: 2px solid #173f34; outline-offset: 2px; }
.product-ai-custom-builder { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: #f5f5f3; }
.product-ai-custom-builder[hidden],
.product-ai-custom-toolbar[hidden] { display: none; }
.product-ai-custom-card { padding: 16px; background: #fff; border: 1px solid #e0e1de; border-radius: 8px; }
.product-ai-custom-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #ececea; }
.product-ai-custom-heading strong { display: block; color: #222; font-size: 16px; }
.product-ai-custom-heading small { display: block; margin-top: 4px; color: #777; font-size: 11px; line-height: 1.5; }
.product-ai-custom-badge { flex: none; padding: 4px 7px; color: #315f52; font-size: 10px; line-height: 1.2; background: #edf4f1; border-radius: 10px; }
.product-ai-custom-status { padding: 18px 0; color: #727272; font-size: 13px; text-align: center; }
.product-ai-custom-fields { display: grid; gap: 16px; padding-top: 16px; }
.product-ai-custom-item { padding: 14px; background: #f8f8f6; border: 1px solid #e0e2df; border-radius: 7px; }
.product-ai-custom-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid #e4e6e3; }
.product-ai-custom-item-head strong { color: #24483e; font-size: 13px; }
.product-ai-custom-remove { padding: 4px 0; color: #8b5050; font: inherit; font-size: 11px; background: transparent; border: 0; cursor: pointer; }
.product-ai-custom-item-fields { display: grid; gap: 15px; }
.product-ai-custom-dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-ai-custom-dimensions .product-ai-custom-field { min-width: 0; gap: 6px; }
.product-ai-custom-dimensions .product-ai-custom-label { min-width: 0; gap: 3px; font-size: 12px; }
.product-ai-custom-dimensions .product-ai-custom-unit { margin-left: auto; font-size: 10px; }
.product-ai-custom-dimensions .product-ai-custom-input { min-width: 0; padding: 0 6px; text-align: center; }
.product-ai-custom-field { display: grid; gap: 8px; margin: 0; }
.product-ai-custom-segments { display: grid; gap: 10px; }
.product-ai-custom-segment { padding: 10px; background: #fff; border: 1px solid #d8ddda; border-radius: 6px; }
.product-ai-custom-segment-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.product-ai-custom-segment-head strong { color: #315f52; font-size: 12px; }
.product-ai-custom-segment-remove { padding: 3px 0; color: #8b5050; font: inherit; font-size: 11px; background: transparent; border: 0; cursor: pointer; }
.product-ai-custom-segment-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-ai-custom-segment-field { display: grid; gap: 5px; min-width: 0; color: #4d5955; font-size: 10px; }
.product-ai-custom-segment-input { box-sizing: border-box; width: 100%; min-width: 0; height: 38px; padding: 0 7px; color: #222; font: inherit; font-size: 14px; text-align: center; background: #fff; border: 1px solid #c9cfcc; border-radius: 5px; outline: none; appearance: textfield; -moz-appearance: textfield; }
.product-ai-custom-segment-input::-webkit-inner-spin-button,
.product-ai-custom-segment-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.product-ai-custom-segment-input:focus { border-color: #173f34; box-shadow: 0 0 0 2px rgba(23,63,52,.09); }
.product-ai-custom-segment-add { width: 100%; min-height: 38px; color: #173f34; font: inherit; font-size: 12px; font-weight: 700; background: #fff; border: 1px dashed #789087; border-radius: 6px; cursor: pointer; }
.product-ai-custom-label { display: flex; align-items: center; gap: 5px; color: #33423e; font-size: 13px; font-weight: 700; }
.product-ai-custom-required { color: #b74242; }
.product-ai-custom-unit { margin-left: auto; color: #8b8b88; font-size: 11px; font-weight: 400; }
.product-ai-custom-input { box-sizing: border-box; width: 100%; height: 44px; padding: 0 12px; color: #222; font: inherit; font-size: 16px; background: #fff; border: 1px solid #c9cfcc; border-radius: 6px; outline: none; }
.product-ai-custom-input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.product-ai-custom-input[type="number"]::-webkit-inner-spin-button,
.product-ai-custom-input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.product-ai-custom-input:focus { border-color: #173f34; box-shadow: 0 0 0 2px rgba(23,63,52,.09); }
.product-ai-custom-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.product-ai-custom-option { min-height: 42px; padding: 8px 10px; color: #173f34; font: inherit; font-size: 13px; line-height: 1.35; background: #fff; border: 1px solid #9fb0aa; border-radius: 6px; cursor: pointer; }
.product-ai-custom-option.is-selected { color: #fff; background: #173f34; border-color: #173f34; box-shadow: 0 2px 7px rgba(23,63,52,.15); }
.product-ai-custom-option:focus-visible { outline: 2px solid #173f34; outline-offset: 2px; }
.product-ai-custom-add { width: 100%; min-height: 42px; margin-top: 12px; color: #173f34; font: inherit; font-size: 13px; font-weight: 700; background: #fff; border: 1px dashed #789087; border-radius: 6px; cursor: pointer; }
.product-ai-custom-add[hidden] { display: none; }
.product-ai-custom-error { margin-top: 14px; padding: 9px 11px; color: #9b2335; font-size: 12px; line-height: 1.5; background: #fff0f1; border-radius: 5px; }
.product-ai-custom-submit { width: 100%; min-height: 44px; margin-top: 18px; color: #fff; font: inherit; font-weight: 700; background: #173f34; border: 0; border-radius: 6px; cursor: pointer; }
.product-ai-custom-submit:disabled { color: #8b918f; background: #e1e4e2; cursor: wait; }
.product-ai-custom-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #f5f5f3; border-bottom: 1px solid #e4e5e2; }
.product-ai-custom-toolbar button { padding: 4px 0; color: #173f34; font: inherit; font-size: 12px; font-weight: 700; background: transparent; border: 0; cursor: pointer; }
.product-ai-custom-toolbar span { color: #858582; font-size: 10px; }
.product-ai-messages { flex: 1; overflow-y: auto; padding: 18px; background: #f7f7f5; }
.product-ai-message { width: fit-content; max-width: 88%; margin: 0 0 12px; padding: 10px 12px; border-radius: 4px; background: #fff; color: #292929; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.product-ai-message.is-user { margin-left: auto; background: #173f34; color: #fff; }
.product-ai-message.is-error { color: #9b2335; background: #fff0f1; }
.product-ai-message.is-loading { color: #777; }
.product-ai-message-text { white-space: pre-wrap; }
.product-ai-message.has-table { box-sizing: border-box; width: 100%; max-width: 100%; }
.product-ai-text-block + .product-ai-table-wrap,
.product-ai-table-wrap + .product-ai-text-block { margin-top: 12px; }
.product-ai-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
.product-ai-table { width: 100%; min-width: 520px; border-spacing: 0; border-collapse: collapse; font-size: 13px; line-height: 1.45; background: #fff; }
.product-ai-table th,
.product-ai-table td { padding: 8px 10px; text-align: left; vertical-align: top; border: 1px solid #d9ddd9; white-space: normal; overflow-wrap: anywhere; }
.product-ai-table th { color: #173f34; font-weight: 700; background: #eef3f1; }
.product-ai-table td:nth-child(3),
.product-ai-table td:nth-child(4) { text-align: right; white-space: nowrap; }
.product-ai-choice-groups { display: grid; gap: 12px; margin-top: 14px; white-space: normal; }
.product-ai-choice-group > strong { display: block; margin-bottom: 7px; color: #4b5f59; font-size: 12px; }
.product-ai-choice-options { display: flex; flex-wrap: wrap; gap: 7px; }
.product-ai-choice { min-height: 34px; padding: 6px 11px; color: #173f34; font: inherit; font-size: 12px; line-height: 1.35; text-align: left; background: #fff; border: 1px solid #8da59d; border-radius: 3px; cursor: pointer; }
.product-ai-choice:hover,
.product-ai-choice:focus-visible { color: #fff; background: #173f34; border-color: #173f34; }
.product-ai-copy { display: block; margin: 7px 0 0 auto; padding: 2px 0; border: 0; background: transparent; color: #58726a; font-size: 11px; cursor: pointer; }
.product-ai-copy:hover { text-decoration: underline; }
.product-ai-source-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.product-ai-source-images a { display: block; color: #666; text-decoration: none; }
.product-ai-source-images img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #dededb; background: #f2f2f0; }
.product-ai-source-images small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.35; }
.product-ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid #e2e3e0; background: #f3f3f1; }
.product-ai-form[hidden] { display: none; }
.product-ai-form textarea { box-sizing: border-box; flex: 1; height: 42px; min-height: 42px; max-height: 108px; resize: none; overflow-y: auto; border: 1px solid #d5d8d5; border-radius: 6px; padding: 9px 12px; font: inherit; font-size: 16px; line-height: 22px; background: #fff; outline: none; }
.product-ai-form textarea:focus { border-color: #173f34; }
.product-ai-form button { flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 6px; background: #173f34; color: #fff; font-weight: 700; cursor: pointer; }

/* Give the desktop assistant the full product-side workspace. */
@media (min-width: 992px) {
    .product-ai-panel {
        top: 84px;
        right: 24px;
        bottom: 84px;
        width: clamp(520px, 26vw, 680px);
        height: auto;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .product-ai-launcher { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
    .product-ai-panel {
        top: 0; right: 0; bottom: auto; left: 0; width: 100%; height: 100vh; height: 100dvh; max-height: none;
        border: 0; box-shadow: none;
    }
    .product-ai-header { flex: none; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: #ededeb; }
    .product-ai-header strong { font-size: 16px; }
    .product-ai-header small { margin-top: 2px; font-size: 10px; }
    .product-ai-header button { width: 36px; height: 36px; padding: 0; font-size: 28px; }
    .product-ai-modes { flex: none; gap: 6px; padding: 8px 10px; }
    .product-ai-mode { min-height: 40px; border-radius: 5px; }
    .product-ai-messages { min-height: 0; padding: 14px 12px; overscroll-behavior: contain; }
    .product-ai-message { max-width: 86%; margin-bottom: 10px; padding: 9px 11px; border-radius: 7px; }
    .product-ai-message.is-user { border-bottom-right-radius: 2px; }
    .product-ai-message.is-assistant { border-bottom-left-radius: 2px; }
    .product-ai-custom-builder { overscroll-behavior: contain; padding: 12px; }
    .product-ai-custom-card { padding: 14px; border-radius: 8px; }
    .product-ai-custom-fields { gap: 15px; }
    .product-ai-custom-item { padding: 12px; }
    .product-ai-custom-options { gap: 7px; }
    .product-ai-custom-option { min-height: 44px; }
    .product-ai-custom-segment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-ai-form { flex: none; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #ededeb; }
    .product-ai-form textarea { height: 40px; min-height: 40px; max-height: 106px; border-color: #fff; border-radius: 6px; padding: 8px 11px; }
    .product-ai-form button { height: 40px; padding: 0 14px; }
}

@media (max-width: 1120px) {
    .product-detail-page {
        padding-right: 28px;
        padding-left: 28px;
    }

    .product-detail-page .detail-grid {
        grid-template-columns: 50px minmax(0, 1fr) minmax(330px, 390px);
        gap: 18px;
    }

    .product-detail-page .thumbnail-list .swiper-slide {
        width: 50px;
        height: 67px !important;
    }

    .product-detail-page .detail-info {
        padding-left: 16px;
    }
}

@media (max-width: 920px) {
    .product-detail-page .detail-grid {
        grid-template-columns: 54px minmax(0, 1fr);
        width: min(100%, 680px);
        margin: 0 auto;
    }

    .product-detail-page .detail-info {
        grid-column: 1 / -1;
        padding: 34px 0 0 76px;
    }

    .product-detail-page .detail-info h1 {
        max-width: 600px;
    }

    .product-detail-page .size-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-page .product-description {
        width: min(100%, 680px);
    }
}

@media (max-width: 760px) {
    .product-detail-page {
        padding: 14px 16px 64px;
    }

    .product-detail-page .detail-breadcrumb {
        margin: 5px 0 22px;
        font-size: 11px;
    }

    .product-detail-page .detail-grid {
        display: flex;
        flex-direction: column;
        gap: 13px;
        width: 100%;
    }

    .product-detail-page .detail-media-column {
        order: 1;
        width: 100%;
    }

    .product-detail-page .thumbnail-list {
        order: 2;
        display: block;
        width: 100%;
        height: 78px;
        min-height: 0;
    }

    .product-detail-page .thumbnail-list .thswp {
        display: block;
        height: 78px;
    }

    .product-detail-page .thumbnail-list .swiper-wrapper {
        flex-direction: row;
    }

    .product-detail-page .thumbnail-list .swiper-slide {
        width: 54px !important;
        height: 72px !important;
        margin-right: 8px;
    }

    .product-detail-page .detail-thumb-controls {
        display: none;
    }

    .product-detail-page .detail-model-link {
        margin-top: 13px;
        text-align: center;
    }

    .product-detail-page .detail-main-image .swiper-pagination {
        display: block;
    }

    .product-detail-page .detail-main-image .swiper-pagination-bullet-active {
        background: var(--product-ink);
    }

    .product-detail-page .detail-info {
        order: 3;
        width: 100%;
        padding: 18px 0 0;
    }

    .product-detail-page .detail-info h1 {
        font-size: 22px;
        line-height: 1.48;
    }

    .product-detail-page .sku {
        margin-top: 17px;
    }

    .product-detail-page .detail-price {
        margin-top: 28px;
        padding-top: 19px;
    }

    .product-detail-page .detail-price b {
        font-size: 27px;
    }

    .product-detail-page .detail-info h3 {
        margin-top: 27px;
    }

    .product-detail-page .detail-swatches {
        margin-top: 17px;
    }

    .product-detail-page .size-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-page .product-description {
        margin-top: 64px;
        font-size: 13px;
        line-height: 1.85;
    }

    .product-detail-page .product-detail-tab {
        padding: 16px 5px 14px;
        font-size: 14px;
    }

    .product-detail-page .product-detail-panel {
        min-height: 150px;
        padding-top: 32px;
    }

    .product-detail-page #product-panel-specification {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .product-detail-page #product-panel-specification .product-spec-table-scroll {
        padding-bottom: 4px;
    }

    .product-detail-page #product-panel-specification table {
        width: max-content !important;
        min-width: 760px;
        font-size: 13px !important;
    }

    .product-detail-page #product-panel-specification th,
    .product-detail-page #product-panel-specification td {
        padding: 9px 10px !important;
    }
}

@media (max-width: 480px) {
    .product-detail-page .size-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .product-detail-page .size-options button {
        min-height: 38px;
        padding: 5px 7px;
        font-size: 11px;
    }

    .product-detail-page .size-options button.has-split-label {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-detail-page .thumbnail-list .swiper-slide,
    .product-detail-page .detail-swatches button,
    .product-detail-page .size-options button,
    .product-detail-page .detail-actions .add-variant-collect {
        transition: none;
    }

    .product-detail-page .product-detail-tab {
        transition: none;
    }
}
