/* ============ product.css · 产品详情页 ============
   结构：面包屑 / 产品主区（图片 + 信息卡）/ 相关产品
   信息层级：品牌与评分 → 标题 → 价格 → 描述 → 购买 → 规格
   ============================================================ */

/* Compact 面包屑 首屏 */
.page-hero-sm { padding: 14px 0 16px; }
.page-hero-sm .breadcrumb { margin-bottom: 0; flex-wrap: wrap; row-gap: 4px; }
.page-hero-sm .breadcrumb > * { flex-shrink: 0; white-space: nowrap; }
.page-hero-sm #bc-product { min-width: 0; max-width: min(760px, 55vw); overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   1. 产品主区
   ============================================================ */
.product-detail-section {
    padding: clamp(40px, 4vw, 64px) 0 clamp(48px, 5vw, 72px);
    background: var(--bg);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(40px, 4.6vw, 72px);
    align-items: start;
}

/* ---------- 图片列 ---------- */
.product-gallery {
    position: sticky;
    top: 112px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.product-main-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: clamp(10px, 1.6vw, 22px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0edf0;
    border-radius: 26px;
    box-shadow: 0 34px 70px -48px rgba(var(--shadow-rgb), 0.55);
}
.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}
.product-flag {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(var(--coral-rgb), 0.28);
}
.product-flag[hidden] { display: none; }

.product-gallery-notes {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0;
    padding: 2px 0 0;
    list-style: none;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.product-gallery-notes li { display: inline-flex; align-items: center; gap: 8px; }
.product-gallery-notes li + li::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- 信息区：不使用卡片，直接排在页面上 ---------- */
.product-info {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.2vw, 18px);
    min-width: 0;
}
.product-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.product-info .product-brand {
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    line-height: 1.4;
    text-transform: uppercase;
}
.product-title {
    max-width: 720px;
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 2.3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.15;
    text-wrap: pretty;
}
.product-title.is-long {
    font-size: clamp(24px, 1.9vw, 30px);
    letter-spacing: -0.4px;
    line-height: 1.22;
}
.product-rating-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.product-rating-row .stars { color: var(--gold); }
.product-rating-row .stars .star { width: 14px; height: 14px; }

/* 价格：普通分隔线，不做块状卡片 */
.product-price-panel {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.product-price-panel[hidden] { display: none; }
.product-price-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 1.4;
    text-transform: uppercase;
}
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0;
    border: 0;
}
.product-price-row .price-now {
    color: var(--accent-dark);
    font-size: clamp(30px, 2.4vw, 38px);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.05;
}
.product-price-row .price-now small {
    margin-right: 2px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
}
.product-price-row:has(.price-old) .price-now { color: var(--coral-dark); }
.product-price-row .price-old {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: line-through;
}

.product-desc {
    max-width: 640px;
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.78;
}

/* 购买 */
.product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 2px;
}
.btn-buy {
    width: min(100%, 420px);
    min-width: 0;
    justify-content: center;
    padding: 15px 28px;
    border-radius: 14px;
    font-size: 15px;
    letter-spacing: 0.01em;
}
.product-buy-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* 规格：沉底分隔线，三等分 */
.product-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 8px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.spec-item {
    min-width: 0;
    padding: 0 16px;
    border-left: 1px solid var(--line);
}
.spec-item:first-child { padding-left: 0; border-left: 0; }
.spec-item:last-child { padding-right: 0; }
.spec-item dt {
    margin: 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
    line-height: 1.4;
    text-transform: uppercase;
}
.spec-item dd {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.spec-item dd a {
    color: var(--accent-dark);
    text-decoration: none;
    text-underline-offset: 2px;
}
.spec-item dd a:hover { text-decoration: underline; }

/* ============================================================
   2. 相关产品（网格样式来自 components.css）
   ============================================================ */
#related-section {
    padding-top: 64px;
    padding-bottom: 72px;
}

/* ============================================================
   3. 响应式
   ============================================================ */
@media (max-width: 1199px) {
    .product-detail-layout { gap: 40px; }
}

@media (max-width: 960px) {
    .product-detail-section { padding: 32px 0 40px; }
    .product-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .product-gallery {
        position: static;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
    }
    .product-info {
        width: 100%;
        max-width: 620px;
        margin: 0 auto;
    }
    #related-section { padding-top: 44px; padding-bottom: 52px; }
}

@media (max-width: 767px) {
    .product-main-image { border-radius: 20px; }
    .product-main-image img { border-radius: 14px; }
    .product-title { font-size: 24px; letter-spacing: -0.4px; }
    .product-title.is-long { font-size: 21px; }
    .product-price-panel { padding: 13px 0; }
    .product-price-row .price-now { font-size: 28px; }
    .product-price-row .price-old { font-size: 14px; }
    .product-specs {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding-top: 16px;
    }
    .spec-item {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 18px;
        padding: 0;
        border-left: 0;
    }
    .spec-item dd { margin: 0; text-align: right; }
}

@media (max-width: 420px) {
    .product-info-head {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .product-rating-row { margin-top: 0; }
    .product-gallery-notes { font-size: 11.5px; }
}
