/* ===== 基础 ===== */
body {
    font-family: Arial;
    margin: 0;
    padding-top: 60px;
    overflow-x: hidden;
    /* 防止横向滚动 */
}

/* ===== 顶部栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* ⭐ 关键：防溢出 */

    height: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    background: white;
    border-bottom: 1px solid #ddd;

    z-index: 1000;

    box-sizing: border-box;
    /* ⭐ 关键 */
}

/* logo */
.logo img {
    height: 40px;
    display: block;
}

/* 按钮 */
.navbar button {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #ccc;
    background: #f8f8f8;
    border-radius: 6px;
    cursor: pointer;
}

.navbar button:hover {
    background: #eee;
}

/* ===== 产品网格 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 16px;
}

/* 卡片 */
.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

/* 图片 */
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 标题 */
.card-title {
    text-align: center;
    padding: 10px;
}

/* ===== 详情页 ===== */
.detail {
    display: none;
    padding: 16px;
}

.detail img {
    width: 100%;
    margin-bottom: 10px;
}

.back {
    cursor: pointer;
    color: blue;
    margin-bottom: 10px;
}

/* ===== 手机适配 ===== */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 产品标题 ===== */
.product-title {
    text-align: center;
    margin: 20px 0;
}

/* ===== 描述区域 ===== */
.desc {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: #333;
}

/* 第一段（简介） */
.desc-intro {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
}

/* 普通段落 */
.desc p {
    margin-bottom: 12px;
}

/* ===== 图片区域 ===== */
.detail-images {
    max-width: 900px;
    margin: 20px auto;
}

.detail-images img {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 6px;
}

.detail-images img {
    cursor: zoom-in;
    transition: 0.2s;
}

.detail-images img:hover {
    transform: scale(1.02);
}