* { margin:0; padding:0; box-sizing:border-box; font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; }

body {
    background: #f8faff;
    background-image: url("/static/gallery/photo/bg_paw.webp");
    background-repeat: repeat;
    color: #222;
    min-height: 100vh;
}

/* ============ 主容器 ============ */
.page-wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 90px; }

/* 返回按钮 */
.back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 16px; background: #fff; border: none; border-radius: 99px;
    color: #447bcc; font-size: 14px; margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer; text-decoration: none;
}

/* ============ 横版介绍 ============ */
.intro-card {
    background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    display: flex; align-items: center; gap: 14px;
    min-height: 110px;
}
.intro-avatar {
    flex: 0 0 90px;
    height: 90px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;   /* 去掉蓝色渐变底 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.intro-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* 原来是 cover，会裁剪，改成 contain 完整显示 */
}
.intro-text { flex: 1; min-width: 0; }
.intro-text h2 { font-size: 17px; color: #447bcc; margin-bottom: 6px; }
.intro-text p { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 3px; }

/* ============ 顶部导航栏 ============ */
.top-header {
    background: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 99;
    gap: 12px;
}
.top-header .logo {
    font-size: 18px;
    font-weight: bold;
    color: #447bcc;
    white-space: nowrap;
}
.top-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.top-nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s;
}
.top-nav a:hover { color: #447bcc; }

/* 移动端：允许换行、缩小字号，避免挤压 */
@media (max-width: 640px) {
    .top-header {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }
    .top-header .logo { font-size: 16px; }
    .top-nav { gap: 4px 16px; justify-content: center; }
    .top-nav a { font-size: 13px; }
}

/* ============ 通用卡片 ============ */
.section-card {
    background: #fff; border-radius: 16px; padding: 20px 16px; margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.section-title { font-size: 16px; color: #222; margin-bottom: 14px; font-weight: bold; }

/* ============ 轮播 ============ */
.carousel-wrap { position: relative; margin: 0 -16px; padding: 0 16px 8px; }
.carousel {
    display: flex; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-card {
    flex: 0 0 46%; scroll-snap-align: start;
    background: #fafbfd; border-radius: 12px; padding: 12px;
    cursor: pointer; transition: transform 0.15s; user-select: none;
    display: flex; flex-direction: column;
}
.carousel-card:active { transform: scale(0.97); }
.carousel-thumb {
    width: 100%; height: 130px; border-radius: 8px;
    background: linear-gradient(135deg, #eef4ff, #d8e6ff);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 12px; pointer-events: none;
}
.carousel-thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.carousel-card .cat-blue {
    display: inline-block; align-self: flex-start;
    font-size: 13px; color: #447bcc; font-weight: bold;
    background: #e8f0fe; padding: 3px 10px;
    border-radius: 99px; margin-bottom: 8px; line-height: 1.4;
}
.carousel-card .desc {
    font-size: 12px; color: #888; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.carousel-dots .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #d8e0ec; transition: all 0.2s;
}
.carousel-dots .dot.active { background: #447bcc; width: 18px; border-radius: 99px; }

.center-btn { text-align: center; margin-top: 14px; }

/* ============ 蓝按钮 ============ */
.blue-btn {
    background: #447bcc; color: #fff; border: none; padding: 11px 28px;
    border-radius: 99px; font-size: 14px; cursor: pointer;
    text-decoration: none; display: inline-block;
}
.blue-btn:active { transform: scale(0.97); }

/* ============ 盲盒机 ============ */
.blind-box { text-align: center; padding: 10px 0; }
.draw-btn {
    background: #447bcc; color: #fff; border: none; padding: 14px 40px;
    border-radius: 99px; font-size: 16px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(68,123,204,0.3);
}
.draw-btn:active { transform: scale(0.96); }
.result-card {
    margin-top: 16px; background: #f0f6ff; border-radius: 14px;
    padding: 20px; text-align: center; display: none;
}
.result-card.show { display: block; }
.result-card .result-img {
    max-width: 180px; max-height: 180px; object-fit: contain; margin-bottom: 10px;
}
.result-card h3 { font-size: 16px; color: #222; margin-bottom: 8px; }
.result-card p { font-size: 13px; color: #666; line-height: 1.5; }
.result-card .talk-line { color: #447bcc; font-style: italic; font-size: 13px; margin-top: 8px; }

/* ============ 留言板 ============ */
#msgInput {
    width: 100%; height: 90px; padding: 12px; border: 1px solid #e2e8f2;
    border-radius: 12px; font-size: 14px; resize: none; outline: none;
    font-family: inherit; margin-bottom: 10px;
}
#msgInput:focus { border-color: #447bcc; }
#msgTip { font-size: 13px; color: #447bcc; margin-top: 8px; min-height: 18px; }

/* ============ 详情页分组 ============ */
.group-title {
    font-size: 14px; color: #447bcc; font-weight: bold;
    margin: 18px 0 10px; padding-left: 10px;
    border-left: 4px solid #447bcc;
}
.group-title:first-child { margin-top: 0; }

/* ============ 网格卡片 ============ */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.goods-card {
    background: #fafbfd; border-radius: 12px; padding: 12px;
    cursor: pointer; transition: transform 0.15s;
    display: flex; flex-direction: column;
}
.goods-card:active { transform: scale(0.97); }
.goods-thumb {
    width: 100%; height: 120px; border-radius: 8px;
    background: linear-gradient(135deg, #eef4ff, #d8e6ff);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 12px;
}
.goods-thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.goods-card .cat-blue {
    display: inline-block; align-self: flex-start;
    font-size: 13px; color: #447bcc; font-weight: bold;
    background: #e8f0fe; padding: 3px 10px;
    border-radius: 99px; margin-bottom: 8px; line-height: 1.4;
}
.goods-card .desc {
    font-size: 12px; color: #888; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ============ 弹窗 ============ */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center;
    padding: 20px; z-index: 999;
}
.modal.show { display: flex; }
.modal-box {
    background: #fff; border-radius: 20px; padding: 24px; max-width: 380px;
    width: 100%; max-height: 80vh; overflow-y: auto; position: relative; text-align: center;
}
.modal-box .modal-img { max-width: 180px; max-height: 180px; object-fit: contain; margin-bottom: 12px; }
.modal-box h2 { font-size: 18px; color: #222; margin-bottom: 8px; }
.modal-box .cat-blue {
    display: inline-block; background: #e8f0fe; color: #447bcc;
    padding: 3px 12px; border-radius: 99px; font-size: 13px;
    font-weight: bold; margin-bottom: 12px;
}
.modal-box p { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 6px; }
.modal-close {
    position: absolute; top: 10px; right: 16px; font-size: 26px;
    color: #bbb; cursor: pointer; line-height: 1;
}

/* ============ 移动端适配 ============ */
@media (max-width: 640px) {
    .page-wrap { padding: 12px 12px 90px; }
    .intro-card { padding: 14px; gap: 12px; }
    .intro-avatar { flex: 0 0 64px; height: 64px; }
    .intro-text h2 { font-size: 16px; }
    .intro-text p { font-size: 12px; }
    .section-card { padding: 18px 14px; }
}

/* 详情页/陈列馆网格图限制，防止图片撑大 */
.goods-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 补上详情页标题样式 */
.all-title {
    font-size: 16px;
    color: #447bcc;
    font-weight: bold;
    margin: 20px 0 12px;
    padding-left: 10px;
    border-left: 4px solid #447bcc;
}

/* 详情页 / 陈列馆卡片里的商品名字 */
.goods-name {
    font-size: 13px;
    color: #222;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
