
/*columns.css*/
html, body {
    width: 100%;
     height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* ❌ 删掉 overscroll-behavior-y: contain */
    touch-action: pan-y;
}
* { box-sizing: border-box; }

body {
    margin: 0 auto;
    max-width: 480px;

    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC";
	background: #fff !important; 
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar-corner {
  background: transparent;
}


.page{  max-width: 480px;
  margin: 0 auto;}



/* Tab 导航 */
.tabbar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}
.tabbar div {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    color: #666666;
}
.tabbar .active {
    color: #e4393c;
    border-bottom: 2px solid #e4393c;
}

/* 封面 */
.banner {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

/* 内容区 */
.panel {
    display: none;
    background: #fff;
}
.panel.active {
    display: block;
}

/* ===== 店铺 ===== */
.shop {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 10px;
}
.shop-logo {
  width: 44px; height: 44px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 10px;
}
.shop-info { flex: 1; }
.shop-name { font-size: 15px; font-weight: 500; }
.shop-id { font-size: 12px; color: #999; margin-top: 2px; }
.arrow { color: #ccc; font-size: 18px; }

.shop-meta {
    display: flex;
    align-items: center;
}

.shop-uid {
    margin-left: auto; padding-right: 10px;
    color: #999;
    font-size: 12px;
}


/* 详细介绍 Panel 内边距 */
#panel0 {
    padding: 12px;
}
/* ✅ 新增：专栏标题样式 */
.column-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* ✅ 新增：强制换行样式 */
#panel0 .contents {
      white-space: pre-line;    /* ✅ 修改这里：只保留换行，合并空格 */
   /*  white-space: pre-wrap; 保留换行符和空格，自动换行 */
    word-wrap: break-word; /* 长单词换行 */
    line-height: 1.6;
    color: #666;
    font-size: 14px;
}
/* 富文本图片自适应 */
.panel img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
}

/* 价格 */
.price {
    margin-top: 10px;
    font-size: 22px;
    color: #e4393c;
    font-weight: bold;
}
.price del {
    font-size: 14px;
    color: #aaa;
    margin-left: 6px;
}

/* ===== 课程列表样式 ===== */
/* ✅ 章节标题栏 */
.chapter {
    display: flex;
    align-items: center;
    margin-top: 12px;
    padding: 8px;
    background: #f2f2f2; /* ✅ 章节背景色 */
    font-weight: bold;
    cursor: pointer;
    color: #666666;
}
/* ✅ 章节左侧矮竖杠 */
.chapter::before {
    content: "";
    width: 3px;
    height: 0.9em;
    background: #666666;
    margin-right: 8px;
    border-radius: 2px;
}
.chapter-title {
    flex: 1;
    font-size: 14px;
}
.arrow {
    margin-left: auto;
    padding-left: 8px;
}

/* ✅ 章节内容区 */
.chapter-body {
    background: #fff;
    padding: 0;
}

/* ✅ 课程卡片 */
.course-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
}
/* ✅ 编号样式 */
.course-num {
    width: 36px;
    text-align: center;
    font-weight: bold;
    color: #666666;
    font-size: 14px;
}
.course-card img {
    width: 90px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}
.course-info {
    flex: 1;
}
.course-title {    color: #333333;
    font-size: 14px;
}
.course-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #666666;
}

/* 评价列表 */
.pj-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
}
.pj-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.pj-nickname { color: #333; font-weight: bold; }
.pj-stars { color: #e4393c; }
.pj-content {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}
.pj-time {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

/* 底部按钮 */
.bottom {
 position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    z-index: 999;
		height:5.5rem;  
	/*
height: calc(5.5rem + env(safe-area-inset-bottom));
	
    /* ✅ 关键：用 padding 把整个 bar 抬高 */
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
	box-sizing: border-box;
	
	
}
.buy-btn {
    width: 100%;
	height:5.5rem;  
	line-height:5.5rem ;
    background: #e4393c;
    color: #fff;
    text-align: center;
    padding: 0px;
    border-radius: 0px;
    font-size: 16px;
	    /* ✅ 防止文字沉入安全区 */
    display: flex;
    align-items: center;
    justify-content: center;

}

/* 防止内容被底部按钮遮挡 */
.bottomblank {
 height: 5.5rem;
	/*
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
*/
}

/* ================= 优惠券模态框样式 ================= */
.coupon-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.coupon-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
	    padding-bottom: env(safe-area-inset-bottom); /* ✅ 加这句 */

    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.coupon-modal-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coupon-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.coupon-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.coupon-modal-body {
    padding: 16px;
}

/* 订单信息 */
.order-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-info-item:last-child {
    margin-bottom: 0;
}

.order-info-label {
    color: #666;
}

.order-info-value {
    font-weight: bold;
    color: #333;
}

/* 优惠券列表 */
.coupon-list {
    margin-bottom: 16px;
}

.coupon-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.coupon-item.selected {
    border-color: #e4393c;
    background: #fff5f5;
}

.coupon-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.coupon-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.coupon-discount {
    font-size: 18px;
    font-weight: bold;
    color: #e4393c;
}

.coupon-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.coupon-expire {
    font-size: 12px;
    color: #999;
}

.no-coupon {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 价格汇总 */
.price-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.price-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-weight: bold;
    color: #e4393c;
}

/* 支付按钮 */
.pay-btn {
    width: 100%;
    background: #e4393c;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.pay-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}