/* ========== 外层 ========== */
.product-page {
    padding: 32px 0 64px;
    background: #f7f8fa;
}
.product-detail {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 7fr 5fr;   /* 左 7 : 右 5 */
    gap: 32px;
    align-items: start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #111827;
}

/* ========== 左侧：轮播 ========== */
.product-detail__left { min-width: 0; }

.pd-gallery {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

/* ★ 主图更大 */
.pd-gallery__main {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;          /* 从 4/3 改大，视觉更宽阔 */
    min-height: 440px;             /* 小屏兜底，保证图够大 */
    background: #f3f4f6;
    overflow: hidden;
}
.pd-gallery__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
}
.pd-gallery__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease, visibility 0s;
}
/* ★ 图片填满容器，按钮就落在图里了 */
.pd-gallery__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;             /* 从 contain 改为 cover */
    object-position: center;
    background: #f3f4f6;
}

/* ★ 导航按钮：更大，贴图内缘 */
.pd-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #111827;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    transition: background .18s, color .18s, transform .18s;
    z-index: 2;
}
.pd-gallery__nav:hover {
    background: #fff;
    color: #2563eb;
    transform: translateY(-50%) scale(1.06);
}
.pd-gallery__nav--prev { left: 16px; }
.pd-gallery__nav--next { right: 16px; }

/* 圆点 */
.pd-gallery__dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 7px 12px;
    background: rgba(0, 0, 0, .35);
    border-radius: 999px;
    z-index: 2;
}
.pd-gallery__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: background .18s, transform .18s;
}
.pd-gallery__dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

/* 缩略图 */
.pd-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 12px;
    background: #fff;
}
.pd-gallery__thumb {
    position: relative;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: border-color .18s;
}
.pd-gallery__thumb.is-active { border-color: #2563eb; }
.pd-gallery__thumb img,
.pd-gallery__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-gallery__thumb-video {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    z-index: 1;
    pointer-events: none;
}

/* ========== 左侧：详情 ========== */
.pd-detail {
    margin-top: 28px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.pd-detail__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.pd-detail__body {
    font-size: 14px;
    line-height: 1.75;
    color: #374151;
    word-wrap: break-word;
}
.pd-detail__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}
.pd-detail__body p { margin: 0 0 12px; }
.pd-detail__body h1,
.pd-detail__body h2,
.pd-detail__body h3 {
    margin: 20px 0 10px;
    font-weight: 700;
    color: #111827;
}
.pd-detail__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.pd-detail__body th,
.pd-detail__body td {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    font-size: 13.5px;
}

/* ========== 右侧 ========== */
.pd-side {
    position: sticky;
    top: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.pd-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}
.pd-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.pd-price__value {
    font-size: 26px;
    font-weight: 800;
    color: #2563eb;
}
.pd-price__unit {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
}
.pd-price__suffix {
    font-size: 14px;
    color: #6b7280;
}
.pd-intro {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}

/* 参数 */
.pd-params {
    margin: 0 0 20px;
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
}
.pd-params__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pd-params__list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pd-params__row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.pd-params__row:last-child { border-bottom: 0; }
.pd-params__key {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}
.pd-params__val {
    margin: 0;
    font-size: 13.5px;
    color: #111827;
    font-weight: 500;
    word-break: break-word;
}

/* CTA */
.pd-cta {
    width: 100%;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s, transform .18s, box-shadow .18s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}
.pd-cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .32);
}
.pd-cta:active { transform: translateY(0); }

.pd-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: #9ca3af;
    line-height: 1.55;
    text-align: center;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .pd-side { position: static; }
    .pd-gallery__thumbs { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
    .pd-gallery__main {
        aspect-ratio: 4 / 3;      /* 手机竖屏改回 4/3 更协调 */
        min-height: 300px;
    }
    .pd-gallery__nav {
        width: 40px;
        height: 40px;
    }
    .pd-gallery__nav--prev { left: 10px; }
    .pd-gallery__nav--next { right: 10px; }
}
@media (max-width: 640px) {
    .product-page { padding: 16px 0 40px; }
    .product-detail { padding: 0 14px; gap: 18px; }
    .pd-side, .pd-detail { padding: 18px 16px; border-radius: 12px; }
    .pd-title { font-size: 18px; }
    .pd-price__value { font-size: 22px; }
    .pd-params__row { grid-template-columns: 90px 1fr; gap: 8px; }
    .pd-gallery__thumbs { grid-template-columns: repeat(4, 1fr); padding: 10px; }
    .pd-gallery__main { min-height: 240px; }
    .pd-gallery__nav {
        width: 36px;
        height: 36px;
    }
    .pd-gallery__nav--prev { left: 8px; }
    .pd-gallery__nav--next { right: 8px; }
    .pd-gallery__dots { bottom: 12px; }
}

/* ========== 放大镜 ========== */
.pd-gallery__zoom {
    position: fixed;
    z-index: 9999;
    width: 520px;          /* ★ 从 360 调大到 520 */
    height: 520px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    will-change: left, top, background-position;
}

.pd-gallery__zoom.is-visible {
    opacity: 1;
    visibility: visible;
}

.pd-gallery__zoom-inner {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-color: #f3f4f6;
    will-change: background-position, background-size;
}

/* 触屏 / 小屏不显示放大镜，避免误触 */
@media (max-width: 1024px) {
    .pd-gallery__zoom {
        display: none !important;
    }
}
