/* ===== 商品详情页样式 ===== */

.product-detail-main {
    min-height: calc(100vh - 200px);
    padding: 60px 0;
    background: #fff; /* 白色背景 */
    color: #111; /* 深色文字 */
    overflow-x: hidden; /* 移动端防止横向滚动 */
}

.product-detail-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 商品详情主体：左右等高，右侧不单独滚动 */
.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
    align-items: stretch;
    min-width: 0; /* 允许 grid 子项在窄屏收缩，避免溢出 */
    position: relative;
    z-index: auto;
}

/* 紧接 Service 下方横线时，去掉底部留白，横线紧贴上方 */
.product-detail-content:has(+ .divider-after-detail) {
    margin-bottom: 0;
}

/* 左侧图片区域：拉伸与右侧同高 */
.product-image-section {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    z-index: 100;
}

.image-gallery {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: visible;
    aspect-ratio: 1;
    cursor: crosshair;
    flex-shrink: 0;
    z-index: 100;
    transform: translateZ(0);
}

.main-image-inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.main-image-inner .main-image,
.main-image-inner .detail-video {
    border-radius: 8px;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s;
    user-select: none;
    pointer-events: none;
}

.main-image.is-hidden {
    display: none !important;
}

.detail-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
    background: transparent;
    z-index: 2;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    vertical-align: middle;
}

.detail-video.playing {
    opacity: 1;
    pointer-events: auto;
}

.detail-video.loaded {
    opacity: 1;
}

.detail-video.playing ~ .main-image {
    opacity: 0;
}

/* 视频播放圆点（加大尺寸） */
.video-dots {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 10;
}

.video-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.9);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.video-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 红色圆点 */
.video-dot-red {
    background: #c00;
    border-color: rgba(255, 255, 255, 0.9);
}

.video-dot-red:hover {
    background: #d00;
}

.video-dot-red.active {
    background: #c00;
    border-color: #c00;
}

.video-dot-red.active span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

/* 黑色圆点 */
.video-dot-black {
    background: #222;
    border-color: rgba(255, 255, 255, 0.9);
}

.video-dot-black:hover {
    background: #333;
}

.video-dot-black.active {
    background: #222;
    border-color: #222;
}

.video-dot-black.active span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

/* 蓝色圆点 */
.video-dot-blue {
    background: #06c;
    border-color: rgba(255, 255, 255, 0.9);
}

.video-dot-blue:hover {
    background: #07d;
}

.video-dot-blue.active {
    background: #06c;
    border-color: #06c;
}

.video-dot-blue.active span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

.video-dot:not(.active) span {
    width: 0;
    height: 0;
}

/* 放大镜功能 */
.zoom-lens {
    position: absolute;
    border: 2px solid #111;
    background: rgba(255, 255, 255, 0.3);
    cursor: crosshair;
    display: none;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.zoom-preview {
    position: absolute;
    left: calc(100% + 20px);
    top: 0;
    width: 500px;
    height: 500px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.zoom-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    min-width: 100%;
    min-height: 100%;
    user-select: none;
    pointer-events: none;
    object-fit: contain;
}

/* 当视频播放时：隐藏放大镜，鼠标不显示放大镜样式 */
.main-image-wrapper:has(.detail-video.playing) .zoom-lens,
.main-image-wrapper:has(.detail-video.playing) .zoom-preview {
    display: none !important;
}

.main-image-wrapper:has(.detail-video.playing) {
    cursor: default;
}

.thumbnail-images {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail-item:hover {
    border-color: #111;
    opacity: 0.9;
}

.thumbnail-item.active {
    border-color: #111;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.btn-download {
    width: 100%;
    margin-top: 16px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 右侧信息区域：不单独滚动，与左侧等高 */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    min-width: 0; /* 移动端防止 flex 子项撑破容器 */
    overflow: visible;
    z-index: 1;
}

.product-header {
    margin-bottom: 4px;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin: 0;
}

/* 定制信息 + 产品规格：无卡片、无横线，仅展示内容 */
.detail-info-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 2px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-info-card .customization-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.info-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
}

.info-label {
    color: #666;
    min-width: 80px;
}

.info-value {
    color: #111;
    font-weight: 500;
}

.info-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 产品规格（无分隔线，仅内容） */
.detail-info-card .product-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.spec-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
    margin: 0;
}

.spec-label {
    color: #666;
    min-width: 80px;
}

.spec-value {
    color: #111;
}

/* SKU选择和运费选择 - 合并为一个card */
.product-selection-card {
    margin: 2px 0 0px 0;
    padding: 12px 0;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.selection-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.selection-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

/* 数量选择器 */
.quantity-selector {
    margin-bottom: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    font-weight: 500;
    color: #111;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quantity-btn:hover {
    border-color: #1a1a1a;
    background: #f9fafb;
}

.quantity-btn:active {
    background: #e5e5e5;
}

.quantity-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    color: #111;
    text-align: center;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 4px;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.selection-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 10px 0;
}

/* SKU选择器 */
.sku-selector {
    margin-bottom: 8px;
}

.sku-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.sku-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    gap: 8px;
    justify-content: space-between;
}

.sku-card:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.sku-card.active {
    border-color: #1a1a1a;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.sku-image-wrapper {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sku-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sku-image--placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}

.sku-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sku-title {
    font-size: 12px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;
}

.sku-price {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    flex-shrink: 0;
    margin-left: auto;
}

/* 运费和总价显示 */
.shipping-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0;
    margin-top: 8px;
}

.total-price-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid #1a1a1a;
}

.display-label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.display-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.total-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

/* 国家选择器 */
.country-selector {
    margin-bottom: 8px;
}

.country-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: #111;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.country-select:hover {
    border-color: #d1d5db;
}

.country-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

/* 响应式优化：平板及以下 */
@media (max-width: 768px) {
    .product-selection-card {
        padding: 16px 0;
        margin: 12px 0;
    }

    .sku-options {
        grid-template-columns: repeat(2, 1fr); /* 移动端保持 2 列更紧凑 */
        gap: 8px;
    }

    .sku-card {
        padding: 8px;
        min-width: 0;
    }

    .selection-divider {
        margin: 12px 0;
    }

    .country-select,
    .pc-search-select-wrap,
    .quantity-input {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
}

.btn-action {
    flex: 1;
    min-width: 140px;
    height: 48px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action.btn-outline {
    border-color: #111;
    background: transparent;
    color: #111;
}

.btn-action.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-action.btn-solid {
    border-color: #111;
    background: #111;
    color: #fff;
}

.btn-action.btn-solid:hover {
    background: #333;
}

/* 参数配置：仅标题文字黑框，横线，箭头在右侧 */
.expandable-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.expandable-item {
    padding: 0;
    background: transparent;
    margin-bottom: 0;
}

.expandable-header {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition: color 0.2s;
    text-align: left;
    perspective: 600px;
}

.expandable-header:hover {
    color: #333;
}

/* 横线+箭头：箭头在按钮旁，以右下方为支点旋转 */
.expandable-trigger-flap {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    transform-origin: right bottom;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    backface-visibility: hidden;
}

.expandable-header[aria-expanded="true"] .expandable-trigger-flap {
    transform: rotate(-90deg);
}

.expandable-header[aria-expanded="true"] .expandable-arrow {
    transform: rotate(90deg);
}

/* 仅标题文字被黑框包裹，五个框统一宽高 */
.expandable-title-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    width: 140px;
    height: 40px;
    box-sizing: border-box;
    border: 1px solid #111;
    border-radius: 6px;
    padding: 8px 14px;
    flex-shrink: 0;
    text-align: center;
}

.expandable-line {
    flex: 1;
    min-width: 0;
    height: 0;
    border-bottom: 1px solid #d1d5db;
    align-self: center;
}

.expandable-arrow {
    flex-shrink: 0;
    font-size: 12px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.expandable-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-out;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    perspective: 800px;
}

.expandable-content.is-open {
    max-height: 3200px;
    min-height: 450px;
}

/* 展开时内容右侧留白，给横线+箭头留出空间 */
.expandable-item:has(.expandable-content.is-open) .expandable-content-inner {
    padding-right: 52px;
}

/* 扇叶展开：内容以左上为轴旋转打开（参照 fan 的 transform-origin + rotate） */
.expandable-content-inner {
    padding: 14px 0 4px 0;
    transform-origin: top left;
    transform: rotate(-90deg);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease-out;
    max-width: 100%;
    overflow-x: auto; /* 移动端表格等可横向滑动，不撑破布局 */
}

.expandable-content.is-open .expandable-content-inner {
    transform: rotate(0deg);
    opacity: 1;
}

.expandable-content p {
    margin: 8px 0;
    line-height: 1.8;
}

/* 服务信息 */
.service-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* 参数列表：左名称右属性，无小标题 */
.params-list {
    display: flex;
    flex-wrap: wrap; /* 图片可并排，视频可独占一行 */
    width: 100%;
    gap: 0;
}

.param-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%; /* 参数文字行永远独占一行 */
}

.param-row:last-child {
    border-bottom: none;
}

.param-row-value-only .param-value {
    grid-column: 1 / -1;
}

.expandable-subtitle {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.attr-image-wrap {
    margin: 10px 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
}

/* 已移除属性图点击预览 */

.attr-image {
    width: auto;
    height: auto;
    max-width: 320px;
    max-height: 240px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.attr-image-caption {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    text-align: left;
}

/* 已移除属性图点击放大遮罩 */

.attr-file-wrap {
    margin: 10px 0;
    width: 100%;
}

.attr-file-card {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.attr-file-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.attr-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.attr-file-icon svg {
    width: 18px;
    height: 18px;
}

.attr-file-text {
    min-width: 0;
}

.attr-file-name {
    font-size: 13px;
    color: #111;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.attr-file-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 属性区文件按钮：不占满整行 */
.attr-file-actions .btn-download {
    width: auto;
    margin-top: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 8px;
    height: 36px;
    background: #111;
    border: 1px solid #111;
    color: #fff;
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.attr-file-actions .btn-download:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-1px);
}

.attr-file-btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.attr-video-wrap {
    margin: 10px 0;
    width: 100%;
    display: block; /* 独占一行 */
    flex: 0 0 100%; /* 永远独占一行，且不被压缩 */
}

.attr-video {
    width: 100%;     /* 不限制大小，跟随容器 */
    max-width: none; /* 取消上限 */
    height: auto;
    border-radius: 6px;
}

.param-row:nth-child(even) {
    background: #fafafa;
    margin: 0 -24px;
    padding: 10px 24px;
}

.param-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.param-value {
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* 电器信息 */
/* 电气信息：与参数列表一致的左名称右属性 */
.electrical-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.electrical-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.electrical-row:last-child {
    border-bottom: none;
}

.electrical-row:nth-child(even) {
    background: #fafafa;
    margin: 0 -24px;
    padding: 10px 24px;
}

/* 仅有一项时（如首行规格）占满整行 */
.electrical-row:has(.electrical-label:only-child) .electrical-label {
    grid-column: 1 / -1;
}

.electrical-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.electrical-value {
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* 插头样式 */
.plug-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plug-title {
    color: #111;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.plug-icons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.plug-icon-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.plug-icon-item:hover {
    background: #f0f0f0;
    border-color: #111;
}

.plug-icon-item svg {
    width: 32px;
    height: 32px;
    color: #111;
}

/* 安装方式 */
.installation-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.installation-hint {
    color: #666;
    font-size: 12px;
    text-align: center;
}

.installation-image-wrapper {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.installation-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: #e8e8e8;
    margin: 32px 0;
}

/* Service 下方的横线：欧美风格紧凑间距 */
.divider-after-detail.divider {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* 紧挨评论区横幅的分隔线 */
.divider:has(+ .reviews-banner) {
    margin-bottom: 16px;
}

/* 评论区与 You May Also Like 之间的分隔线，欧美风格紧凑 */
.divider:has(+ .related-products-section) {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 评论区上方横向横幅图，欧美风格紧凑间距 */
.reviews-banner {
    width: 100%;
    max-height: 140px;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 12px;
}

a.reviews-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.reviews-banner-link:hover {
    opacity: 0.96;
}

.reviews-banner img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    display: block;
}

/* 评论区域 - 欧美风格紧凑间距 */
.reviews-section.comments-section {
    margin-bottom: 40px;
}

.reviews-load-more-area {
    margin-top: 20px;
    text-align: center;
}

.reviews-loading-hint {
    margin: 12px 0;
    font-size: 0.9rem;
    color: #666;
}

/* Text link style — not a button */
.reviews-load-more-trigger {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.95rem;
    color: #333;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    user-select: none;
}

.reviews-load-more-trigger:hover {
    color: #111;
}

.reviews-load-more-area.is-busy .reviews-load-more-trigger {
    pointer-events: none;
    opacity: 0.45;
}

.reviews-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reviews-pager-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.reviews-pager-btn {
    min-width: 72px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111;
    cursor: pointer;
}

.reviews-pager-btn:hover:not(:disabled) {
    border-color: #111;
    background: #f9fafb;
}

.reviews-pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.reviews-pager-info {
    font-size: 13px;
    color: #64748b;
}

.reviews-loading,
.reviews-empty {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    padding: 24px 16px;
    margin: 0;
}

/* 无评论 / 加载失败：抬高整块可视高度，避免区域过扁 */
.reviews-list.comments-content:has(> .reviews-empty),
.reviews-list.comments-content:has(> .reviews-loading:first-child:last-child) {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 40px 20px;
    background: #f8f9fb;
    border-radius: 10px;
    border: 1px solid #eef0f3;
}

.reviews-list.comments-content:has(> .reviews-empty) .reviews-empty,
.reviews-list.comments-content:has(> .reviews-loading:first-child:last-child) .reviews-loading {
    padding: 32px 16px;
    font-size: 15px;
    color: #6b7280;
    max-width: 360px;
    line-height: 1.5;
}

.comment-reply-muted {
    font-size: 12px;
    color: #94a3b8;
}

.reviews-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
}

.reviews-list.comments-content {
    padding: 0;
}

.no-comments {
    color: #6b7280;
    text-align: center;
    font-size: 14px;
    margin: 0;
    padding: 48px 20px;
}

/* 单条评论卡片 - 欧美风格紧凑 */
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.comment-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-username {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.comment-date {
    font-size: 12px;
    color: #9ca3af;
}

.comment-rating {
    flex-shrink: 0;
}

.comment-rating .stars {
    color: #d97706;
    font-size: 15px;
    letter-spacing: 1px;
}

.comment-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 10px;
}

.comment-actions {
    margin-top: 4px;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
}

.comment-reply-btn:hover {
    color: #1a1a1a;
}

/* 商家回复 - 缩进卡片，欧美风格紧凑 */
.comment-replies {
    margin-top: 12px;
    margin-left: 0;
    padding: 14px 16px 14px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
}

.reply-item {
    padding: 0;
    border-bottom: none;
}

.reply-item + .reply-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.reply-user-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reply-username {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.reply-date {
    font-size: 11px;
    color: #9ca3af;
}

.reply-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    padding-left: 0;
}

/* 兼容未使用 reviews- 前缀的 section-title */
.comments-section .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0 0 28px 0;
}

/* 相关产品推荐：欧美风格紧凑间距 */
.related-products-section {
    margin-bottom: 40px;
    padding-top: 0;
}

.related-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
}

.related-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.related-carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    border-radius: 50%;
}

.related-carousel-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    background: #fafafa;
}

.related-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #eee;
}

.related-carousel-btn svg {
    width: 20px;
    height: 20px;
}

.related-carousel-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.related-products-track {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0 12px;
    min-height: 200px;
    transition: opacity 0.15s ease-out;
}

.related-products-track.is-transitioning {
    opacity: 0.5;
}

.related-products-loading,
.related-products-empty {
    display: block;
    width: 100%;
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 48px 16px;
}

.related-product-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(25% - 15px);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.25s ease;
}

.related-product-card:hover {
    transform: translateY(-2px);
}

.related-product-image {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    margin-bottom: 12px;
    position: relative;
}

.related-product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.related-product-image:hover img {
    opacity: 0;
}

.related-product-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.related-product-image:hover .related-product-video.loaded {
    opacity: 1;
}

/* 悬停时出现 SKU 小圆点：靠右、纵向（与首页一致） */
.related-card-swatches {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: auto;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    z-index: 3;
    pointer-events: auto;
}

.related-product-image:hover .related-card-swatches {
    display: flex;
}

.related-sku-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.related-sku-dot:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.related-sku-dot.active {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
}

.related-sku-dot--plain {
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* 当前 SKU 无视频时保持主图可见 */
.related-product-image--no-video:hover img {
    opacity: 1;
}

.related-product-image--no-video .related-product-video {
    opacity: 0 !important;
    pointer-events: none;
}

.related-product-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* 响应式设计：平板竖屏及以下，改为单列 */
@media (max-width: 1024px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-bottom: 50px;
    }

    .product-image-section {
        position: static;
        min-width: 0;
        width: 100%;
    }

    .image-gallery {
        min-width: 0;
    }

    .main-image-wrapper {
        cursor: default;
        max-width: 100%;
    }

    .zoom-preview,
    .zoom-lens {
        display: none !important; /* 移动端不显示放大镜 */
    }

    .video-dots {
        right: 12px;
        gap: 10px;
    }

    .video-dot {
        width: 28px;
        height: 28px;
    }

    .related-product-card {
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .product-detail-main {
        padding: 30px 0;
    }

    .product-detail-container {
        padding: 0 16px;
    }

    .product-detail-content {
        gap: 40px;
    }

    .product-title {
        font-size: 22px;
    }

    .detail-info-card {
        gap: 18px;
    }

    .product-actions {
        flex-direction: column;
        gap: 14px;
        margin-top: 16px;
    }

    .btn-action {
        width: 100%;
        min-width: 0;
        height: 52px;
        min-height: 52px;
        font-size: 16px;
        padding: 0 24px;
    }

    .video-dots {
        right: 10px;
        gap: 10px;
    }

    .video-dot {
        width: 36px;
        height: 36px;
    }

    .video-dot.active span {
        width: 10px;
        height: 10px;
    }

    /* 折叠标题在窄屏可收缩 */
    .expandable-title-box {
        min-width: 0;
        width: auto;
        padding: 6px 12px;
        font-size: 14px;
    }

    .expandable-header {
        font-size: 14px;
    }

    .expandable-item:has(.expandable-content.is-open) .expandable-content-inner {
        padding-right: 12px;
    }

    .expandable-content-inner {
        padding: 10px 0 4px 0;
    }

    /* 参数行移动端改为单列，避免横向溢出 */
    .param-row {
        grid-template-columns: 1fr;
        gap: 4px;
        margin: 0;
        padding: 8px 0;
    }

    .param-row:nth-child(even) {
        margin: 0;
        padding: 8px 0;
    }

    .param-label {
        min-width: 0;
    }

    .electrical-row {
        grid-template-columns: 1fr;
        gap: 4px;
        margin: 0;
        padding: 8px 0;
    }

    .electrical-row:nth-child(even) {
        margin: 0;
        padding: 8px 0;
    }

    .thumbnail-images {
        margin-top: 12px;
        gap: 8px;
    }

    .thumbnail-item {
        width: 64px;
        height: 64px;
        flex-shrink: 0;
    }

    .shipping-display,
    .total-price-display {
        flex-wrap: wrap;
    }

    .display-value {
        font-size: 16px;
    }

    .total-value {
        font-size: 20px;
    }

    .product-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .plug-icons-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .reviews-section-title { margin-bottom: 14px; font-size: 1.15rem; }
    .comment-item { padding: 14px 0; }
    .comment-header { flex-wrap: wrap; margin-bottom: 10px; }
    .comment-avatar { width: 40px; height: 40px; font-size: 14px; }
    .comment-text { font-size: 13px; }
    .comment-replies { padding: 12px 12px 12px 16px; margin-top: 12px; }

    .related-carousel-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    .related-carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    .related-products-track {
        gap: 16px;
    }
    /* 移动端每组 1 条，单卡占满一行 */
    .related-product-card {
        max-width: 100%;
    }
    .related-product-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 0 12px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-actions {
        gap: 10px;
        margin-top: 14px;
    }

    .btn-action {
        height: 48px;
        min-height: 48px;
        font-size: 15px;
        font-weight: 600;
        padding: 0 16px;
    }

    .sku-options {
        grid-template-columns: 1fr; /* 超小屏 SKU 单列 */
    }

    .expandable-title-box {
        font-size: 13px;
        padding: 6px 10px;
    }

    .related-product-card {
        max-width: 100%;
    }

    .plug-icons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
