/*
 * VShop 商品详情页 v6.0 — Premium Immersive Layout
 * 提取自 resources/views/frontend/products/show.php
 */
.pd-wrap { background: #fff; min-height: 100vh; }
.pd-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === 面包屑 === */
.pd-breadcrumb { display: flex; align-items: center; gap: 6px; padding: 16px 0 12px; font-size: 13px; color: #64748d; }
.pd-breadcrumb a { color: #533afd; text-decoration: none; transition: color .2s; cursor: pointer; }
.pd-breadcrumb a:hover { color: #4434d4; }
.pd-breadcrumb svg { opacity: .35; }
.pd-breadcrumb-current { color: #061b31; font-weight: 500; }

/* === HERO === */
.pd-hero { padding-bottom: 0; margin-bottom: 0; }
.pd-hero-grid { display: grid; grid-template-columns: 460px 1fr; gap: 48px; align-items: start; padding: 8px 0 36px; }

/* 图片区 */
.pd-gallery { position: sticky; top: 76px; }
.pd-gallery-main { position: relative; border-radius: 12px; overflow: hidden; background: #f6f9fc; border: 1px solid #e5edf5; box-shadow: rgba(50,50,93,0.08) 0px 8px 24px -6px, rgba(0,0,0,0.04) 0px 4px 12px -4px; transition: box-shadow .3s; }
.pd-gallery-main:hover { box-shadow: rgba(50,50,93,0.15) 0px 16px 40px -8px, rgba(0,0,0,0.06) 0px 8px 20px -6px; }
.pd-gallery-main img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.pd-gallery-main:hover img { transform: scale(1.03); }
.pd-gallery-ph { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 700; color: #533afd; background: linear-gradient(135deg, #f6f9fc, #f0f5ff); opacity: .3; }
.pd-type-tag { position: absolute; top: 14px; left: 14px; padding: 5px 14px; background: rgba(83,58,253,0.9); color: #fff; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .3px; backdrop-filter: blur(8px); }
.pd-discount-ribbon { position: absolute; top: 14px; right: 14px; padding: 5px 12px; background: rgba(234,34,97,0.92); color: #fff; border-radius: 6px; font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.pd-gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.pd-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5edf5; transition: all .2s; }
.pd-dot.active { background: #533afd; width: 24px; border-radius: 4px; }

/* 缩略图 */
.pd-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all .2s; flex-shrink: 0; }
.pd-thumb:hover { border-color: #b9b9f9; }
.pd-thumb.active { border-color: #533afd; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 信息区 */
.pd-info { padding-top: 4px; }
.pd-title-block { margin-bottom: 16px; }
.pd-title { font-size: 26px; font-weight: 700; color: #061b31; line-height: 1.3; letter-spacing: -0.6px; margin-bottom: 12px; }
.pd-title-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.pd-tag-type { background: rgba(83,58,253,0.08); color: #533afd; }
.pd-tag-auth { background: rgba(21,190,83,0.08); color: #108c3d; }
.pd-tag-hot { background: rgba(234,34,97,0.08); color: #ea2261; }
.pd-stats-row { display: flex; align-items: center; gap: 0; padding: 14px 0; margin-bottom: 16px; border-top: 1px solid #e5edf5; border-bottom: 1px solid #e5edf5; }
.pd-stat-item { flex: 1; text-align: center; }
.pd-stat-val { display: block; font-size: 18px; font-weight: 700; color: #061b31; }
.pd-stat-label { display: block; font-size: 11px; color: #64748d; margin-top: 2px; }
.pd-stat-sep { width: 1px; height: 32px; background: #e5edf5; }
.pd-price-box { background: linear-gradient(135deg, #f6f9fc 0%, #f0f5ff 100%); border: 1px solid #e5edf5; border-radius: 10px; padding: 20px 24px; margin-bottom: 20px; }
.pd-price-row { display: flex; align-items: baseline; gap: 4px; }
.pd-price-symbol { font-size: 20px; font-weight: 700; color: #061b31; }
.pd-price-val { font-size: 40px; font-weight: 700; color: #061b31; letter-spacing: -1.5px; line-height: 1; }
.pd-price-original { font-size: 16px; color: #64748d; text-decoration: line-through; margin-left: 12px; }
.pd-price-save { display: inline-block; margin-top: 6px; padding: 3px 10px; background: rgba(234, 34, 97, 0.08); color: #ea2261; border-radius: 4px; font-size: 12px; font-weight: 600; }
.pd-price-note { font-size: 12px; color: #64748d; margin-top: 8px; }
.pd-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; font-family: 'Inter', -apple-system, sans-serif; }
.pd-btn-buy { background: #533afd; color: #fff; box-shadow: rgba(50,50,93,0.2) 0px 4px 14px; flex: 1; }
.pd-btn-buy:hover { background: #4434d4; box-shadow: rgba(50,50,93,0.35) 0px 8px 28px; transform: translateY(-1px); color: #fff; }
.pd-btn-cart { background: #fff; color: #061b31; border: 1px solid #e5edf5; flex: 1; }
.pd-btn-cart:hover { border-color: #b9b9f9; background: rgba(83,58,253,0.03); }
.pd-btn-fav { width: 50px; height: 50px; padding: 0; background: #fff; color: #64748d; border: 1px solid #e5edf5; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; }
.pd-btn-fav:hover, .pd-btn-fav.active { color: #ea2261; border-color: rgba(234,34,97,0.3); background: rgba(234,34,97,0.04); }
.pd-extra-links { display: flex; gap: 10px; margin-bottom: 16px; }
.pd-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; font-size: 13px; color: #533afd; border: 1px solid #b9b9f9; border-radius: 6px; text-decoration: none; transition: all .2s; }
.pd-link-btn:hover { background: rgba(83,58,253,0.04); color: #4434d4; }
.pd-trust-row { display: flex; gap: 12px; padding-top: 20px; border-top: 1px solid #e5edf5; }
.pd-trust-item { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f8fafb; border-radius: 8px; border: 1px solid #e5edf5; }
.pd-trust-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(21,190,83,0.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-trust-icon svg { color: #15be53; }
.pd-trust-text strong { display: block; font-size: 12px; font-weight: 600; color: #061b31; }
.pd-trust-text span { display: block; font-size: 11px; color: #64748d; margin-top: 1px; }

/* === 功能亮点 === */
.pd-highlights { background: #f6f9fc; border-top: 1px solid #e5edf5; border-bottom: 1px solid #e5edf5; padding: 24px 0; margin-bottom: 0; }
.pd-highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pd-highlight-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid #e5edf5; border-radius: 8px; transition: all .2s; }
.pd-highlight-item:hover { border-color: #b9b9f9; box-shadow: rgba(50,50,93,0.06) 0px 4px 12px; }
.pd-highlight-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(83,58,253,0.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-highlight-icon svg { color: #533afd; }
.pd-highlight-text strong { display: block; font-size: 13px; font-weight: 600; color: #061b31; }
.pd-highlight-text span { display: block; font-size: 11px; color: #64748d; margin-top: 2px; }

/* === TABS === */
.pd-tabs-zone { padding: 36px 0 60px; }
.pd-tabs-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.pd-tabs-bar { display: flex; gap: 0; border-bottom: 1px solid #e5edf5; margin-bottom: 28px; }
.pd-tab { display: inline-flex; align-items: center; gap: 6px; padding: 14px 22px; background: none; border: none; font-size: 14px; font-weight: 500; color: #64748d; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: all .2s; }
.pd-tab svg { opacity: .5; }
.pd-tab:hover { color: #061b31; }
.pd-tab:hover svg { opacity: .8; }
.pd-tab.active { color: #533afd; border-bottom-color: #533afd; font-weight: 600; }
.pd-tab.active svg { opacity: 1; color: #533afd; }
.pd-tab-pane { display: none; }
.pd-tab-pane.active { display: block; }
.pd-detail-content { line-height: 1.85; color: #061b31; font-size: 15px; }
.pd-detail-content h1, .pd-detail-content h2, .pd-detail-content h3 { color: #061b31; margin: 28px 0 14px; font-weight: 700; }
.pd-detail-content h2 { font-size: 20px; letter-spacing: -0.3px; }
.pd-detail-content h3 { font-size: 17px; }
.pd-detail-content p { margin-bottom: 14px; }
.pd-detail-content img { max-width: 100%; border-radius: 8px; border: 1px solid #e5edf5; margin: 16px 0; box-shadow: rgba(50,50,93,0.06) 0px 4px 12px; }
.pd-detail-content a { color: #533afd; }
.pd-detail-content ul, .pd-detail-content ol { margin: 14px 0; padding-left: 24px; }
.pd-detail-content li { margin-bottom: 6px; }
.pd-detail-content code { background: #f6f9fc; padding: 2px 6px; border-radius: 3px; font-size: 13px; color: #533afd; }

/* 评价 */
.pd-review-summary { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin-bottom: 24px; background: #f6f9fc; border: 1px solid #e5edf5; border-radius: 8px; }
.pd-review-score { display: flex; align-items: center; gap: 12px; }
.pd-review-score-num { font-size: 36px; font-weight: 700; color: #061b31; }
.pd-review-score-stars { display: flex; flex-direction: column; gap: 4px; }
.pd-stars { font-size: 16px; color: #f59e0b; }
.pd-review-count { font-size: 13px; color: #64748d; }
.pd-reviews-list { display: grid; gap: 0; }
.pd-review-item { padding: 18px 0; border-bottom: 1px solid #e5edf5; }
.pd-review-item:last-child { border-bottom: none; }
.pd-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pd-review-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #533afd, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.pd-review-meta { flex: 1; }
.pd-review-meta strong { display: block; font-size: 13px; color: #061b31; }
.pd-review-stars { font-size: 12px; color: #f59e0b; }
.pd-review-time { font-size: 12px; color: #64748d; }
.pd-review-body { font-size: 14px; color: #061b31; line-height: 1.65; padding-left: 44px; }
.pd-reviews-empty { text-align: center; padding: 56px 40px; color: #64748d; background: #f6f9fc; border-radius: 8px; border: 1px dashed #e5edf5; }
.pd-reviews-empty svg { opacity: .3; margin-bottom: 8px; }

/* 侧边栏 */
.pd-tabs-side { position: sticky; top: 76px; }
.pd-seller-card { background: #fff; border: 1px solid #e5edf5; border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
.pd-seller-header { padding: 14px 18px; font-size: 13px; font-weight: 600; color: #061b31; border-bottom: 1px solid #e5edf5; background: #f8fafb; }
.pd-seller-body { padding: 24px 18px; text-align: center; }
.pd-seller-avatar-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.pd-seller-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #533afd, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.pd-seller-badge { position: absolute; bottom: 0; right: -2px; width: 20px; height: 20px; border-radius: 50%; background: #15be53; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.pd-seller-name { font-size: 15px; font-weight: 600; color: #061b31; margin-bottom: 12px; }
.pd-seller-stats { display: flex; justify-content: center; gap: 0; padding-top: 12px; border-top: 1px solid #e5edf5; }
.pd-ss-item { flex: 1; text-align: center; }
.pd-ss-item strong { display: block; font-size: 16px; font-weight: 700; color: #061b31; }
.pd-ss-item span { display: block; font-size: 11px; color: #64748d; margin-top: 2px; }
.pd-ss-sep { width: 1px; background: #e5edf5; }
.pd-seller-link { display: block; margin-top: 14px; padding: 8px; background: rgba(83,58,253,0.04); color: #533afd; border: 1px solid #b9b9f9; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; transition: all .2s; cursor: pointer; }
.pd-seller-link:hover { background: rgba(83,58,253,0.08); }
.pd-related-card { background: #fff; border: 1px solid #e5edf5; border-radius: 8px; overflow: hidden; }
.pd-related-header { display: flex; align-items: center; gap: 6px; padding: 14px 18px; font-size: 13px; font-weight: 600; color: #061b31; border-bottom: 1px solid #e5edf5; background: #f8fafb; }
.pd-related-header svg { color: #533afd; opacity: .7; }
.pd-related-body { padding: 12px 18px; }
.pd-related-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e5edf5; text-decoration: none; transition: all .2s; cursor: pointer; }
.pd-related-item:last-child { border-bottom: none; }
.pd-related-item:hover { padding-left: 4px; }
.pd-related-img { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: #f6f9fc; border: 1px solid #e5edf5; flex-shrink: 0; }
.pd-related-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-related-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #533afd; opacity: .4; }
.pd-related-title { font-size: 12px; font-weight: 500; color: #061b31; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; max-width: 180px; }
.pd-related-price { font-size: 13px; font-weight: 700; color: #061b31; }

/* 底部推荐 */
.pd-recommend { padding: 48px 0 60px; background: #f6f9fc; border-top: 1px solid #e5edf5; }
.pd-recommend-title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: #061b31; letter-spacing: -0.4px; margin-bottom: 24px; }
.pd-recommend-title svg { color: #533afd; }
.pd-recommend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pd-recommend-card { display: block; background: #fff; border: 1px solid #e5edf5; border-radius: 10px; overflow: hidden; text-decoration: none; transition: all .2s; cursor: pointer; }
.pd-recommend-card:hover { border-color: #b9b9f9; box-shadow: rgba(50,50,93,0.12) 0px 12px 30px -8px, rgba(0,0,0,0.06) 0px 6px 12px -4px; transform: translateY(-3px); }
.pd-recommend-img { height: 140px; overflow: hidden; background: #f6f9fc; }
.pd-recommend-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pd-recommend-card:hover .pd-recommend-img img { transform: scale(1.05); }
.pd-recommend-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: #533afd; background: linear-gradient(135deg, #f6f9fc, #f0f5ff); opacity: .3; }
.pd-recommend-body { padding: 14px; }
.pd-recommend-body h3 { font-size: 13px; font-weight: 600; color: #061b31; margin: 0 0 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; letter-spacing: -0.2px; }
.pd-recommend-footer { display: flex; align-items: center; justify-content: space-between; }
.pd-recommend-price { font-size: 16px; font-weight: 700; color: #061b31; letter-spacing: -0.3px; }
.pd-recommend-sold { font-size: 11px; color: #64748d; }

/* Toast */
.pd-toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 8px; z-index: 9999; font-size: 13px; font-weight: 500; animation: pdToastIn .2s ease; display: flex; align-items: center; gap: 8px; backdrop-filter: blur(8px); transition: opacity .2s; }
.pd-toast-ok { background: rgba(21,190,83,0.1); border: 1px solid rgba(21,190,83,0.3); color: #108c3d; box-shadow: rgba(21,190,83,0.12) 0px 4px 12px; }
@keyframes pdToastIn { from { opacity: 0; transform: translateX(-50%) translateY(-4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* 响应式 */
@media(max-width: 1024px) {
    .pd-hero-grid { grid-template-columns: 380px 1fr; gap: 32px; }
    .pd-tabs-layout { grid-template-columns: 1fr 240px; }
    .pd-highlight-grid { grid-template-columns: repeat(2, 1fr); }
    .pd-recommend-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width: 768px) {
    .pd-hero-grid { grid-template-columns: 1fr; }
    .pd-gallery { position: static; max-width: 400px; margin: 0 auto; }
    .pd-tabs-layout { grid-template-columns: 1fr; }
    .pd-tabs-side { position: static; }
    .pd-title { font-size: 20px; }
    .pd-price-val { font-size: 32px; }
    .pd-actions { flex-wrap: wrap; }
    .pd-btn-buy, .pd-btn-cart { flex: 1; min-width: 140px; }
    .pd-trust-row { flex-direction: column; gap: 8px; }
    .pd-highlight-grid { grid-template-columns: 1fr; }
    .pd-recommend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 480px) {
    .pd-recommend-grid { grid-template-columns: 1fr; }
}

/* === v3.1 移动端悬浮购买条 === */
.pd-mobile-buy-bar {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid #e5edf5;
    padding: 10px 16px; z-index: 1001;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    align-items: center; gap: 10px;
}
@media (max-width: 768px) {
    .pd-mobile-buy-bar { display: flex; }
    body { padding-bottom: 70px; }
}
.pd-mb-price { flex: 1; }
.pd-mb-price strong { font-size: 20px; font-weight: 700; color: #061b31; }
.pd-mb-price del { font-size: 12px; color: #64748d; margin-left: 6px; }
.pd-mb-btn {
    padding: 10px 24px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .15s; text-decoration: none; white-space: nowrap;
}
.pd-mb-btn-buy { background: #533afd; color: #fff; box-shadow: rgba(50,50,93,0.2) 0px 4px 10px; }
.pd-mb-btn-buy:hover { background: #4434d4; }
.pd-mb-btn-cart { background: #fff; color: #533afd; border: 1px solid #b9b9f9; }
