/*shop3.css*/

:root {
    /* ✅ 粉色主色 */
    --primary-color: #ff6b8a;
    --follow-color: #ff8fa3;

    /* ✅ 亮色模式 · 淡粉背景 */
    --bg-color: #fff1f5;
    --card-bg: #ffffff;
    --section-bg: #ffffff;

    --text-main: #4a2c2a;
    --text-sub: #8b6f72;

    --focus-border: #ff6b8a;
    --shadow: 0 4px 16px rgba(255, 107, 138, 0.12);
}

/* ✅ 暗黑模式 · 深粉色 */
[data-theme="dark"] {
    --primary-color: #ff6b8a;
    --follow-color: #ff8fa3;

    --bg-color: #2b1a2a;
    --card-bg: #3a2539;
    --section-bg: #3a2539;

    --text-main: #fce4ec;
    --text-sub: #d89ca6;

    --focus-border: #ff6b8a;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-drag: none;
}
#schedule,#coupon,#column,#camp,#checkin,#singleCourse,#product,#community{ display:block;}
/* ✅ 锁死滚动，但保留回弹 */
html, body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

/*
  html:before {
  content: '';
  display: block;
  width:100%;
  height:100%;
  position:fixed;
  top:0;
  left:0;
  z-index: -1;
 background-color: var(--bg-color);
}
*/


a, img { 
    -webkit-user-drag: none; 
    user-drag: none; 
}

a {
    text-decoration: none;
    color: inherit;
}

a .ico{ color: #333333;}
/* ===== 加载遮罩 ===== */
#page-loading {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-inner {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #d6e9ff;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.loading-text {
    font-size: 14px;
    color: var(--text-sub);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.container { padding: 15px; }

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.logo-container { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.logo-img { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #4da6ff, #6bbcff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}
.logo-img img{ width: 100%;border-radius: 50%; }

.shop-name { 
    font-size: 18px; 
    font-weight: 600; 
}
.follow-btn {
    background: linear-gradient(to right, #4da6ff, #6bbcff);
    color: white; 
    border: none; 
    padding: 6px 15px;
    border-radius: 20px; 
    font-size: 14px; 
    font-weight: 500;
    cursor: pointer; 
    box-shadow: 0 2px 8px rgba(77, 166, 255, 0.3);
    transition: all 0.3s ease;display: none;
}
.follow-btn.followed {
    background: linear-gradient(to right, var(--follow-color), #80bfff);
}

/* 店铺ID - 可点击复制 */
.shop-id { 
    font-size: 12px; 
    color: var(--text-sub); 
    margin-bottom: 15px; 
    padding-left: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-id:active {
    color: var(--primary-color);
    transform: scale(1.05);
}

.shop-id {
    display: flex;
    align-items: center;
}

.shop-id-right {
    margin-left: auto;
}



/* 搜索框 - 聚焦边框变蓝 */
.search-box { 
    position: relative; 
    margin-bottom: 15px; 
}
.search-box input {
    width: 100%; 
    padding: 10px 15px 10px 40px;
    border-radius: 25px;
    border: 1px solid #d6e9ff; 
    background-color: var(--card-bg); 
    color: var(--text-main);
    font-size: 14px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.search-box input:focus {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
    outline: none;
}
.search-box i { 
    position: absolute; 
    left: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-sub); 
}

/* 导航 - 无链接，仅切换active */
.nav-tabs {
    display: flex;

    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
}
.nav-tab {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: 20px; 
    font-size: 14px;
    cursor: pointer; 
    background: var(--card-bg); 
    color: var(--text-sub); 
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-tab.active { 
    background: var(--primary-color); 
    color: white; 
    font-size: 15px; 
    font-weight: 600;
}

/* 轮播图 */
.banner { 
    width: 100%; 
    height: 100px; 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 15px; 
    background: linear-gradient(90deg, #4da6ff, #6bbcff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* 功能入口 */
.function-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.func-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 10px 5px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.func-btn:active {
    transform: translateY(2px);
}
.func-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 18px;
    color: white;
}
.func-btn:nth-child(1) .func-icon { background: linear-gradient(135deg, #ff9a9e, #fad0c4); }
.func-btn:nth-child(2) .func-icon { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.func-btn:nth-child(3) .func-icon { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.func-btn:nth-child(4) .func-icon { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.func-text { 
    font-size: 12px; 
    color: var(--text-main); 
    font-weight: 600;
}

/* 领券中心 */
.coupon-banner {
    width: 100%; 
    height: 80px; 
    background: linear-gradient(90deg, #ff9a9e, #fecfef);
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: white; 
    font-size: 18px; 
    font-weight: 600; 
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
    cursor: pointer;
}

/* 通用区块 */
.section { 
    margin-bottom: 20px; 
    background: var(--section-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.section-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px;
}
.section-title { 
    font-size: 17px; 
    font-weight: 600; 
    color: var(--text-main);
}
.section-more { 
    font-size: 13px; 
    color: var(--text-sub); 
    display: flex; 
    align-items: center; 
    gap: 2px;
}

/* 分类Tab */
.category-tabs { 
    display: flex; 
    justify-content: space-between;
    gap: 8px; 
    margin-bottom: 15px; 
}
.category-tab {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    border-radius: 15px; 
    font-size: 13px; 
    cursor: pointer;
    background: var(--card-bg); 
    color: var(--text-sub);
    font-weight: 600;
    transition: all 0.3s ease;
}
.category-tab.active { 
    background: var(--primary-color); 
    color: white; 
}

/* 专栏列表 */
.column-list { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}
.column-card {
    display: flex; 
    gap: 12px; 
    background: var(--card-bg); 
    padding: 12px;
    border-radius: 10px; 
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.3s ease;
}
.column-card:active {
    transform: translateX(3px);
}
.column-img { 
    width: 100px; 
    height: 66px;
    border-radius: 8px; 
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}
.column-info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
	 min-width: 0;
}
.column-name { 
    font-weight: 600; 
    font-size: 14px; 
    color: var(--text-main);
	  display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
}
.column-meta { 
    font-size: 12px; 
    color: var(--text-sub); 
    margin: 3px 0; 
}
.column-price { 
    font-size: 15px; 
    color: var(--primary-color); 
    font-weight: 600; 
}

.view-all-btn {
    display: block; 
    width: 100%; 
    text-align: center; 
    padding: 10px; 
    margin-top: 15px;
    background: var(--card-bg); 
    border-radius: 8px; 
    font-size: 14px; 
    color: var(--text-sub); 
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}
.view-all-btn:active {
    background: #3a3a3a;
}

/* 两列网格 */
.two-col-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
}
.grid-card { 
    background: var(--card-bg); 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.3s ease;
}
.grid-card:active {
    transform: translateY(3px);
}
.grid-card-img-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.66%;
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
}
.grid-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}
.grid-card-content {
    padding: 10px;
}
.grid-card-title { 
    font-size: 13px; 
    font-weight: 500; 
    margin-bottom: 3px;
    color: var(--text-main);
}
.grid-card-price {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

/* 打卡 */
.punch-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
}
.punch-card { 
    background: linear-gradient(135deg, #eaf3ff, #f2f8ff);
    padding: 20px 15px; 
    border-radius: 12px; 
    text-align: center; 
    text-decoration: none;
    border: 1px solid #d0e0ff;
    transition: all 0.3s ease;
}
[data-theme="dark"] .punch-card { 
    background: linear-gradient(135deg, #2d3748, #4a5568); 
    border: 1px solid #4a5568;
}
.punch-card:active {
    transform: scale(0.97);
}
.punch-icon { 
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.punch-card:nth-child(1) .punch-icon {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}
.punch-card:nth-child(2) .punch-icon {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
}
.punch-title { 
    font-size: 14px; 
    font-weight: 500; 
    color: var(--text-main);
}

/* 产品栏 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.3s ease;
}
.product-card:active {
    transform: translateY(3px);
}
.product-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}
.product-info {
    padding: 10px;
}
.product-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 3px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

/* 我的社群 */
.community-list { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}
.community-card {
    display: flex; 
    gap: 12px; 
    background: var(--card-bg); 
    padding: 12px;
    border-radius: 10px; 
    box-shadow: var(--shadow);
    align-items: stretch;
    text-decoration: none;
    transition: all 0.3s ease;
}
.community-card:active {
    transform: translateX(3px);
}
.community-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px; 
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}
.community-info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}
.community-name { 
    font-weight: 600; 
    font-size: 15px; 
    color: var(--text-main);
}
.community-desc { 
    font-size: 12px; 
    color: var(--text-sub); 
    margin-top: 4px; 
    line-height: 1.4;
}
.community-action { 
    margin-top: 8px; 
}
.join-btn {
    display: inline-block; 
    padding: 4px 12px; 
    background: var(--primary-color);
    color: white; 
    border-radius: 15px; 
    font-size: 12px; 
    font-weight: 500;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:active {
    transform: scale(0.9);
}

/* Toast提示 */
.toast {
    position: fixed; 
    bottom: 80px; 
    left: 50%; 
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85); 
    color: white; 
    padding: 10px 20px;
    border-radius: 25px; 
    font-size: 14px; 
    z-index: 1000;
    animation: fadeInOut 2.5s ease forwards;
    white-space: nowrap;
}
@keyframes fadeInOut {
    0% { opacity: 0; bottom: 60px; }
    15% { opacity: 1; bottom: 80px; }
    85% { opacity: 1; bottom: 80px; }
    100% { opacity: 0; bottom: 60px; }
}



/* ===== 活动卡片 - 图片 3:2 比例 ===== */
/* ===== 活动卡片 - 图片 3:2 比例 ===== */
/* ===== 活动卡片：图片左 / 内容右，图片 3:2 圆角 ===== */

#community-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* 整张卡片：横排 flex */
.activity-card {
    display: flex;
    flex-direction: row;          /* ✅ 图左 内容右 */
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    padding: 8px;                 /* 卡片内边距，图片不贴边 */
    gap: 10px;
}

/* 3:2 图片容器：宽占 42%，高 = 宽*2/3 */
.activity-cover {
    position: relative;
    flex: 0 0 42%;
    width: 42%;
    padding-top: 28%;             /* ✅ 42% * 2/3 ≈ 28% */
    border-radius: 8px;           /* ✅ 图片圆角 */
    overflow: hidden;
    background: #f0f0f0;
}

.activity-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;             /* 裁剪填充，不变形 */
    object-position: center;
}

/* 右侧内容区 */
.activity-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    min-width: 0;                 /* 允许 ellipsis 生效 */
}

.activity-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-desc {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-meta {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.activity-action { margin-top: 8px; }

.join-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f4ff;
    color: #4a6cf7;
    font-size: 12px;
}

/* 小屏适配 */
@media (max-width: 380px) {
    .activity-cover {
        flex: 0 0 46%;
        width: 46%;
        padding-top: 30.66%;      /* 46%*2/3 */
    }
    .activity-name { font-size: 14px; }
}