/* 详情页整体 */
.detail-container {
    display: flex;
    gap: 24px;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 左侧图片 */
.image-viewer {
    width: 420px;
}

.image-main {
    position: relative;
    width: 100%;
    height: 420px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.image-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 左右按钮 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.nav-btn.left { left: 10px; }
.nav-btn.right { right: 10px; }

/* 缩略图 */
.thumbnail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.thumbnail-list img {
    width: calc(100% / 6 - 8px);
    height: calc(420px / 6);
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail-list img.active {
    border-color: #409eff;
}

/* 右侧详情 */
.detail-info {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

/* 标题 */
.detail-title {
    font-size: 20px;
    margin-bottom: 12px;
}

/* 通用行 */
.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* 价格 */
.detail-price {
    font-size: 22px;
    font-weight: bold;
    color: #f56c6c;
}

/* 浏览量 */
.detail-views {
    color: #999;
}

/* 购买按钮 - 包裹器 */
.buy-wrap {
    position: relative;
    width: 100%;
}

.buy-btn {
    display: inline-block;
    width: 100%;
    background: #f56c6c;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
}

/* 评分 */
.detail-rate {
    font-size: 18px;
    color: #f7ba2a;
    white-space: nowrap;
}

/* 备注 */
.detail-remark {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    color: #666;
    margin-bottom: 16px;
}

/* 导购按钮容器（每两个一行）*/
.guide-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.guide-item {
    position: relative;
}

.guide-btn {
    display: inline-block;
    background: #409eff;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

/* 复制按钮公共样式（右下角小图标） */
.copy-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 0;
}

.copy-btn:active { transform: translateY(1px); }

/* buy 按钮右下复制位置微调 */
.buy-wrap .copy-btn {
    right: 12px;
    bottom: 12px;
}

/* 小提示 (toast) */
.copy-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 80px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 2000;
    opacity: 0;
    transition: opacity .18s;
}

/* =======================
   商品详情 - 移动端适配
   ======================= */
@media (max-width: 768px) {

    /* 整体改为上下结构 */
    .detail-container {
        flex-direction: column;
        padding: 12px;
        gap: 16px;
    }

    /* 商品信息放上面 */
    .detail-info {
        order: 1;
        padding: 16px;
    }

    /* 图片查看器放下面 */
    .image-viewer {
        order: 2;
        width: 100%;
    }

    /* 主图高度适配移动端 */
    .image-main {
        height: 300px;
    }

    /* 缩略图尺寸自适应 */
    .thumbnail-list img {
        width: calc(100% / 4 - 8px);
        height: 70px;
    }

    /* 购买按钮更适合手指点击 */
    .buy-btn {
        font-size: 15px;
        padding: 14px 0;
    }

    /* 标题字号稍微小一点 */
    .detail-title {
        font-size: 18px;
    }
}

/* =======================
   商品详情 - 富文本
   ======================= */
.detail-description {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
}

.description-inner {
    color: #333;
    line-height: 1.7;
    font-size: 14px;
}

/* 富文本通用样式兜底 */
.description-inner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
}

.description-inner p {
    margin: 12px 0;
}

.description-inner h1,
.description-inner h2,
.description-inner h3 {
    margin: 16px 0 12px;
}

.description-inner ul,
.description-inner ol {
    padding-left: 20px;
    margin: 12px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .detail-description {
        padding: 16px;
        border-radius: 0;
    }
}
/* 详情页整体容器 */
.detail-page {
    width: 100%;
}

/* 确保每一块都是独占一行 */
.detail-container,
.detail-description {
    width: 100%;
    box-sizing: border-box;
}