/* --- 全局背景重置 (确保应用到整个页面) --- */
body {
    background-color: #000 !important;
    color: #fff;
}

.detail-dark-container {
    width: 80%;
    margin: 140px auto 60px;
}

/* --- 2. 参数区布局 --- */
.product-hero-section {
display: flex;
    gap: 60px; /* 适当缩小间距，让内容更紧凑 */
    margin-bottom: 100px;
    align-items: stretch; /* 关键：强制左右子元素高度一致 */
}

.product-gallery {
    flex: 1.2;
}

.product-params {
    display: flex;
    flex-direction: column;
    justify-content: center; /* 让文字信息在右侧也垂直居中对齐左边图片 */
    padding-left: 20px;
}

.product-gallery, 
.product-params {
    flex: 1; /* 关键：强制左右两边宽度完全相等 (50% / 50%) */
    min-height: 600px; /* 设置一个最小高度，确保视觉上的分量感 */
}

.main-display {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    overflow: hidden;
}

.main-display img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例填充 */
    transition: transform 0.8s ease;
}



.main-title {
    font-size: 36px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.sub-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
}

.price {
    font-size: 24px;
    margin-bottom: 40px;
}

/* 缩略图滑动 */
.thumb-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 20px; /* 增加一点顶部间距 */
    margin-bottom: 40px;
}

.thumb-track {
    display: flex;
    gap: 10px;
    transition: transform 0.5s ease;
}

.thumb-item {
    flex: 0 0 calc(14.28% - 10px);
    /* 100%/7 */
    aspect-ratio: 1/1;
    border: 1px solid #333;
    cursor: pointer;
}

.thumb-item.active {
    border-color: #fff;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.next-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 数量选择 */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #333;
    width: fit-content;
    margin-bottom: 30px;
}

.qty-btn {
    background: transparent;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
}

.quantity-selector input {
    background: transparent;
    color: #fff;
    border: none;
    width: 50px;
    text-align: center;
    font-size: 16px;
}

/* 按钮 */
.action-buttons {
    display: flex;
    gap: 20px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 18px;
    letter-spacing: 2px;
    cursor: pointer;
    border: 1px solid #fff;
}

.btn-add-cart {
    background: transparent;
    color: #fff;
}

.btn-buy-now {
    background: #fff;
    color: #000;
}

/* --- 3. 图片区 --- */
.section-label {
    font-size: 12px;
    letter-spacing: 3px;
    color: #999;
    margin-bottom: 10px;
}

.dotted-line {
    width: 100%;
    height: 1px;
    border-top: 1px dashed #444;
    /* 浅灰色虚线 */
    margin-bottom: 40px;
}

.info-images img {
    width: 100%;
    display: block;
    /* 消除间隙 */
    margin: 0;
}

/* 详情图样式 */
.detail-images {
    width: 100%;
}

.detail-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

/* --- 4. 推荐区 --- */
.recommend-section {
    margin-top: 100px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.rec-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rec-item a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.rec-item .img-wrapper {
    width: 100%;
    padding-top: 100%; /* 1:1 宽高比 */
    position: relative;
    overflow: hidden;
    background: #111;
    margin-bottom: 15px;
}

.rec-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rec-item:hover img {
    transform: scale(1.05);
}

.rec-item span {
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.rec-item .price {
    font-size: 14px;
    color: #fff;
    margin: 0;
    margin-top: auto;
}

/* 让轨道平移变丝滑 */
.thumb-track {
    display: flex;
    gap: 10px;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    /* 高级缓动 */
    will-change: transform;
}

/* 箭头旋转动画 */
.next-arrow {
    transition: transform 0.5s ease, background 0.3s;
    z-index: 10;
}

.next-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 数量按钮点击反馈 */
.qty-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* 输入框去掉焦点蓝色外框 */
.quantity-selector input:focus {
    outline: none;
}


/* --- 详情页移动端专项适配 --- */
@media screen and (max-width: 768px) {
    /* 1. 容器边距调整 */
    .detail-dark-container {
        width: 90% !important;
        margin: 80px auto 40px !important; /* 减小顶部间距 */
    }

    /* 2. 参数区：左右变上下 */
    .product-hero-section {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .product-gallery, 
    .product-params {
        flex: none !important;
        width: 100% !important;
        min-height: auto !important; /* 取消 600px 的限制 */
        padding-left: 0 !important;
    }

    .main-title {
        font-size: 24px !important;
        text-align: center;
    }

    .sub-title {
        text-align: center;
    }

    .price {
        text-align: center;
        margin-bottom: 20px !important;
    }

    /* 3. 缩略图调整：每行显示 4 个 */
    .thumb-item {
        flex: 0 0 calc(25% - 10px) !important;
    }

    /* 4. 推荐区：4列变2列 */
    .recommend-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* 5. 底部购买按钮：在手机端可以考虑垂直排列 */
    .action-buttons {
        flex-direction: column;
        gap: 10px !important;
    }
}