/* ========================================
   山东亿盟 - 产品详情页样式
   ======================================== */

/* ========== 面包屑 ========== */
.breadcrumb-bar {
    background: var(--light);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    margin-top: 160px;
}

.breadcrumb-bar .container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    color: var(--gray);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-bar a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb-bar span:last-child {
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
}

/* ========== 主体 ========== */
.detail-main {
    padding: 32px 0 80px;
    background: var(--white);
}

/* ========== 上半部分：图片 + 基本信息 ========== */
.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 420px) 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

/* ========== 图片画廊 ========== */
.detail-gallery {
    position: sticky;
    top: 180px;
    align-self: start;
}

.gallery-main {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    background: #f8fafc;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.gallery-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.gallery-badge.badge-tractor { background: #1d4ed8; }
.gallery-badge.badge-dump    { background: #c7460a; }

/* 缩略图 */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.gallery-thumbs img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.6;
}

.gallery-thumbs img:hover {
    opacity: 0.9;
    border-color: #94a3b8;
}

.gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--primary);
}

/* ========== 基本信息 ========== */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    margin: 0;
}

.detail-short-desc {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.7;
    margin: 0;
}

/* 属性标签 */
.detail-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-attrs .attr-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.attr-tag.attr-brand    { background: #fef3c7; color: #92400e; }
.attr-tag.attr-drive    { background: #dbeafe; color: #1e40af; }
.attr-tag.attr-category { background: #dcfce7; color: #166534; }

/* 价格区域 */
.detail-price-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 24px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-label {
    font-size: 15px;
    color: var(--gray);
    font-weight: 500;
}

.price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.price-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #94a3b8;
}

/* 操作按钮 */
.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-inquiry {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
}

.btn-paypal {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    background: #ffc439;
    color: #003087;
    border: none;
    cursor: not-allowed;
    opacity: 0.6;
    font-family: inherit;
}

.paypal-coming {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* ========== 详细内容区 ========== */
.detail-content {
    max-width: 900px;
}

.detail-section {
    margin-bottom: 48px;
}

.detail-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.detail-full-desc {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.9;
    margin: 0;
}

/* ========== 规格参数表 ========== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 14px 16px;
    font-size: 15px;
    color: var(--dark);
}

.specs-table td:first-child {
    width: 180px;
    font-weight: 600;
    color: var(--gray);
    background: #f8fafc;
    white-space: nowrap;
}

/* 奇数行浅色 */
.specs-table tr:nth-child(even) td:first-child {
    background: #f1f5f9;
}

/* ========== 全景图 ========== */
.gallery-hint {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 20px;
}

.gallery-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-full img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-full img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========== 灯箱 ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 36px;
    color: var(--white);
    cursor: pointer;
    z-index: 1;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    z-index: 1;
    padding: 16px;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* ========== 底部 ========== */
.detail-bottom {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 48px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
    flex-wrap: wrap;
}

.detail-bottom .btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
}

/* ========== 空状态 ========== */
.detail-error {
    text-align: center;
    padding: 120px 20px;
}

.detail-error .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.detail-error h2 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 8px;
}

.detail-error p {
    font-size: 16px;
    color: var(--gray);
}

/* ========== 响应式 ========== */

/* --- 平板横屏 / 小笔记本 --- */
@media (max-width: 1024px) {
    .detail-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .detail-gallery {
        position: static;
    }

    .detail-name {
        font-size: 26px;
    }

    .gallery-full {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-content {
        max-width: 100%;
    }
}

/* --- 平板竖屏 --- */
@media (max-width: 768px) {
    .detail-main .container {
        padding: 0 16px;
    }

    .breadcrumb-bar {
        margin-top: 120px;
        padding: 10px 0;
    }

    .breadcrumb-bar a,
    .breadcrumb-bar span {
        font-size: 13px;
    }

    .detail-main {
        padding: 20px 0 60px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 36px;
    }

    .gallery-main {
        aspect-ratio: 4 / 3;
    }

    .gallery-thumbs {
        gap: 8px;
        margin-top: 10px;
    }

    .gallery-thumbs img {
        width: 56px;
        height: 42px;
    }

    .detail-name {
        font-size: 22px;
    }

    .detail-short-desc {
        font-size: 15px;
    }

    .detail-attrs .attr-tag {
        font-size: 12px;
        padding: 4px 12px;
    }

    .detail-price-box {
        padding: 18px;
    }

    .price-value {
        font-size: 19px;
    }

    .detail-actions {
        flex-direction: column;
        gap: 10px;
    }

    .detail-actions .btn {
        width: 100%;
        text-align: center;
    }

    .btn-inquiry,
    .btn-paypal {
        padding: 13px 24px;
        font-size: 15px;
    }

    .paypal-coming {
        font-size: 12px;
    }

    .detail-section {
        margin-bottom: 32px;
    }

    .detail-section-title {
        font-size: 20px;
    }

    .detail-full-desc {
        font-size: 15px;
    }

    .specs-table td {
        padding: 11px 12px;
        font-size: 14px;
    }

    .specs-table td:first-child {
        width: 130px;
        font-size: 13px;
        white-space: normal;
    }

    .gallery-hint {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .gallery-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .detail-bottom {
        flex-direction: column;
        padding-top: 32px;
        gap: 12px;
    }

    .detail-bottom .btn {
        width: 100%;
        text-align: center;
        padding: 13px 24px;
        font-size: 15px;
    }

    .lightbox img {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 32px;
        padding: 10px;
    }

    .lightbox-close {
        top: 16px;
        right: 18px;
        font-size: 30px;
    }
}

/* --- 手机 --- */
@media (max-width: 480px) {
    .detail-main .container {
        padding: 0 12px;
    }

    .breadcrumb-bar {
        margin-top: 112px;
        padding: 8px 0;
    }

    .breadcrumb-bar a,
    .breadcrumb-bar span,
    .breadcrumb-sep {
        font-size: 12px;
    }

    .detail-main {
        padding: 16px 0 48px;
    }

    .detail-hero {
        gap: 18px;
        margin-bottom: 28px;
    }

    .gallery-main {
        aspect-ratio: 3 / 2;
    }

    .gallery-thumbs img {
        width: 48px;
        height: 36px;
    }

    .gallery-badge {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .detail-name {
        font-size: 19px;
    }

    .detail-short-desc {
        font-size: 14px;
        line-height: 1.6;
    }

    .detail-info {
        gap: 14px;
    }

    .detail-attrs {
        gap: 5px;
    }

    .detail-attrs .attr-tag {
        font-size: 11px;
        padding: 3px 10px;
    }

    .detail-price-box {
        padding: 14px;
        border-radius: 10px;
    }

    .price-row {
        flex-direction: column;
        gap: 4px;
    }

    .price-label {
        font-size: 13px;
    }

    .price-value {
        font-size: 18px;
    }

    .price-hint {
        font-size: 12px;
    }

    .btn-inquiry,
    .btn-paypal {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 6px;
    }

    .detail-section {
        margin-bottom: 24px;
    }

    .detail-section-title {
        font-size: 18px;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }

    .detail-full-desc {
        font-size: 14px;
        line-height: 1.7;
    }

    .specs-table td {
        padding: 10px 10px;
        font-size: 13px;
    }

    .specs-table td:first-child {
        width: 100px;
        font-size: 12px;
        white-space: normal;
        word-break: keep-all;
    }

    .gallery-hint {
        font-size: 12px;
    }

    .gallery-full {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .gallery-full img {
        border-radius: 6px;
    }

    .detail-bottom {
        padding-top: 24px;
        gap: 10px;
    }

    .detail-bottom .btn {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 6px;
    }

    .lightbox img {
        max-width: 98%;
        max-height: 75vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 26px;
        padding: 6px;
    }

    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }

    .lightbox-close {
        top: 10px;
        right: 12px;
        font-size: 26px;
    }

    .lightbox-counter {
        font-size: 12px;
        bottom: 16px;
    }

    .detail-error {
        padding: 80px 16px;
    }

    .detail-error .empty-icon {
        font-size: 48px;
    }

    .detail-error h2 {
        font-size: 20px;
    }

    .detail-error p {
        font-size: 14px;
    }
}