.attribute-row {
    padding-top: 7px;
    padding-bottom: 7px;
}

.attribute-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 0;
}

.attribute-label em {
    display: inline;
    margin-left: auto;
    color: var(--warm);
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}

.attribute-help {
    margin-top: 4px;
}

.sku-option {
    padding-top: 8px;
    padding-bottom: 8px;
}

.detail-actions {
    margin-top: 17px;
}

.detail-attributes {
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
}

.product-detail-page {
    background: #fff;
}

.product-detail-inner {
    background: #fff;
}

.sku-row {
    display: none;
}

/* 组合 SKU 不属于规格矩阵，不能继承 .sku-row 的隐藏规则。 */
.bundle-sku-row {
    display: grid;
}

.bundle-sku-row > .attribute-label {
    align-self: start;
    min-height: 38px;
}

.bundle-sku-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bundle-sku-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.bundle-sku-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bundle-sku-option.is-selected {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.bundle-sku-option.is-unavailable,
.bundle-sku-option:has(input:disabled) {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: .72;
    text-decoration: line-through;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.sku-property-row .attribute-option em {
    color: var(--warm);
    font-size: 11px;
    font-style: normal;
}

.sku-property-row .attribute-option.is-unavailable,
.sku-property-row .attribute-option:has(input:disabled) {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: .72;
    text-decoration: line-through;
}

.sku-property-row .attribute-option.is-unavailable:hover,
.sku-property-row .attribute-option:has(input:disabled):hover {
    border-color: #e5e7eb;
    color: #9ca3af;
    box-shadow: none;
}

.sku-property-row .attribute-option:has(input:disabled) img {
    filter: grayscale(1);
    opacity: .65;
}

.quantity-control button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f8fafc;
    color: var(--text);
    font-size: 16px;
}

.quantity-control button:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.quantity-control input {
    width: 48px;
    height: 32px;
    min-height: 32px;
    padding: 0 4px;
    border: 0;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0;
    text-align: center;
}

.quantity-control input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-control input[type="number"]::-webkit-inner-spin-button,
.quantity-control input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}

.product-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.product-breadcrumb span {
    color: #a7b0bb;
}

.product-breadcrumb strong {
    color: var(--text);
    font-weight: 600;
}

.detail-grid {
    grid-template-columns: 659px minmax(0, 1fr);
    gap: 50px;
}

.detail-gallery {
    display: grid;
    grid-template-columns: 95px 550px;
    grid-template-rows: auto auto;
    gap: 9px 14px;
    align-items: start;
    width: 659px;
}

.detail-gallery .detail-image {
    grid-column: 2;
    grid-row: 1;
}

.detail-gallery .detail-thumbnails {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.detail-gallery .image-tip {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
}

.detail-gallery .detail-thumbnail {
    flex: 0 0 95px;
    width: 95px;
    height: 95px;
    min-height: 95px;
}

.detail-gallery .detail-image,
.detail-gallery .detail-image img {
    width: 550px;
    height: 520px;
}

.detail-gallery .detail-image {
    overflow: visible;
    z-index: 3;
    align-self: start;
    width: 550px;
    height: 520px;
    min-height: 520px;
}

.detail-summary {
    padding-top: 0;
}

.attribute-row {
    grid-template-columns: 137.6px minmax(0, 1fr);
}

body {
    overflow-x: hidden;
}

.zoom-lens {
    width: 200px;
    height: 200px;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 0;
    background: rgba(255, 255, 255, .72);
    background-image: none;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .2);
}

.zoom-preview {
    position: absolute;
    z-index: 15;
    top: 0;
    left: calc(100% + 14px);
    display: none;
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    pointer-events: none;
}

.detail-image.is-zooming .zoom-preview {
    display: block;
}

.gallery-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid #e1e5ea;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
}

.gallery-arrow:hover {
    background: #fff;
    color: var(--blue);
}

.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }

.detail-gallery .detail-thumbnails-rail {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-rows: 28px minmax(0, 1fr) 28px;
    gap: 4px;
    width: 95px;
    height: 520px;
    min-height: 0;
}

.detail-gallery .detail-thumbnails-rail .detail-thumbnails {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    /* Scrolling is driven by the arrow controls; keep the rail clean. */
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-color: transparent transparent;
    scrollbar-width: none;
}

.detail-gallery .detail-thumbnails-rail .detail-thumbnails::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.thumbnail-scroll-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95px;
    min-width: 95px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #e8ebef;
    color: #1f2937;
    text-align: center;
}

.thumbnail-scroll-icon {
    display: block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.thumbnail-scroll-icon--down {
    transform: rotate(180deg);
}

.thumbnail-scroll-button:hover:not(:disabled) {
    background: #d9dee5;
    color: #111827;
}

.thumbnail-scroll-button:disabled {
    cursor: default;
    opacity: .45;
}

@media (max-width: 700px) {
    .detail-gallery .detail-thumbnails-rail {
        width: 58px;
        height: 360px;
        grid-template-rows: 24px minmax(0, 1fr) 24px;
    }

    .thumbnail-scroll-button {
        width: 58px;
        min-width: 58px;
        height: 24px;
        min-height: 24px;
        font-size: 16px;
    }
}

.product-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-summary .product-summary div {
    min-width: 0;
}

.product-summary-weight {
    white-space: nowrap;
}

.product-info-panel {
    border: 0;
    padding: 12px 0 0;
    background: transparent;
    box-shadow: none;
}

.product-info-heading {
    display: none;
}

.product-info-panel .product-content-tabs__nav {
    display: flex;
    gap: 3px;
    padding: 4px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    border: 0;
    border-radius: 22px;
    background: #f3f5f7;
}

.product-info-panel .product-content-tabs__button {
    min-height: 38px;
    padding: 9px 20px;
    border: 0;
    border-radius: 18px;
    color: var(--muted);
    font-size: 13px;
}

.product-info-panel .product-content-tabs__button.is-active {
    background: var(--blue);
    color: #fff;
}

.product-info-panel .product-content-tabs__panel {
    margin-top: 14px;
    padding: 22px 4px;
    border-top: 1px solid var(--line);
    background: #fff;
}

@media (max-width: 700px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .detail-gallery .detail-image,
    .detail-gallery .detail-image img {
        height: 360px;
        min-height: 360px;
    }

    .attribute-row {
        grid-template-columns: 115.2px minmax(0, 1fr);
    }

    .detail-gallery .detail-thumbnails {
        max-height: 360px;
    }

    .detail-gallery .detail-thumbnail {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        min-height: 52px;
    }

    .product-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 10px;
    }

    .product-info-panel .product-content-tabs__nav {
        display: flex;
        width: 100%;
        margin: 0;
        overflow-x: auto;
    }

    .product-info-panel .product-content-tabs__button {
        flex: 0 0 auto;
        padding: 9px 13px;
    }
}

@media (max-width: 1100px) {
    .zoom-preview {
        display: none !important;
    }
}

/* Keep category breadcrumbs intact while simplifying the product summary. */
.detail-summary .detail-kicker,
.detail-summary .product-summary > div:nth-child(1),
.detail-summary .product-summary > div:nth-child(5) {
    display: none;
}

.bundle-components {
    flex: 0 0 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f8fafc;
}

.bundle-components[hidden] {
    display: none;
}

.bundle-components-columns,
.bundle-components-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 36px 66px;
    align-items: baseline;
    gap: 12px;
}

.bundle-components-columns {
    color: var(--muted);
    font-size: 12px;
}

.bundle-components-item {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.bundle-components-item > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bundle-components-item > strong {
    flex-shrink: 0;
    color: var(--blue);
    white-space: nowrap;
}

.quantity-row > .attribute-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.quantity-row .quantity-control {
    flex-shrink: 0;
}

.quantity-row [data-min-sale-hint] {
    white-space: nowrap;
}

.bundle-components-columns > :nth-child(n + 2),
.bundle-components-item > strong {
    text-align: right;
}

.bundle-components-item > .bundle-component-price,
.bundle-components-item > .bundle-component-total {
    color: var(--warm);
}
