/* ========== 全局变量 & 重置 ========== */
:root {
    --primary: #FF6B2C;
    --primary-light: #FF9F6E;
    --bg-gray: #F5F7FA;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --card-radius: 24px;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #FE9020 0%, #FE9020 160px, #F5F7FA 160px, #F5F7FA 100%);
    color: #1e293b;
}

.app-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
    position: relative;
}

/* ========== 头部 ========== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: transparent;
    color: #fff;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.location-icon {
    color: #fff;
}

.header-center {
    flex: 1;
    margin: 0 6px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 24px;
    padding: 8px 12px;
    gap: 8px;
    color: #9ca3af;
}

.search-form i {
    font-size: 14px;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
}

.header-right i {
    font-size: 20px;
    color: #fff;
}

/* ========== 轮播图（Swiper 结构） ========== */
.banner-area {
    margin: 8px 10px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.swiper {
    width: 100%;
    border-radius: 24px;
}

.swiper-slide {
    border-radius: 24px;
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 1.2;
    object-fit: cover;
}

/* 轮播指示点（配合自定义JS） */
.swiper-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.swiper-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.swiper-dots .dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* 占位图 */
.banner-placeholder {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 3 / 1.2;
    background: #FFE8DC;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* ========== 金刚区 ========== */
.grid-8 {
    margin: 0 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 16px;
    background: white;
    border-radius: 24px;
}

.grid-item {
    text-align: center;
    cursor: pointer;
}

.grid-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, #FFF5ED, #FFE8DC);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: var(--primary);
    font-size: 26px;
}

.grid-name {
    font-size: 12px;
    font-weight: 500;
    color: #4B5563;
}

/* ========== 通用区块 ========== */
.section {
    margin: 20px 16px;
    background: #fff;
    border-radius: 24px;
    padding: 18px 8px 10px;
}

.section1 {
    background: linear-gradient(180deg, #FFC460 0%, #FFC460 40px, #fff 40px, #fff 100%);
    margin: 10px 16px;
    padding: 10px 8px 10px;
    border-radius: 24px;
    border: 4px solid #FFC460;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    padding-left: 10px;
    position: relative;
}

.section-title1 {
    font-size: 18px;
    font-weight: 700;
    padding-left: 10px;
    position: relative;
    color: #fff;
}

.section-title::before,
.section-title1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.more,
.more-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

/* ========== 商家推荐：左大右小布局 ========== */
.shop-dual-layout {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.shop-featured {
    flex: 1.5;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.featured-img {
    width: 100%;
    max-height: 150px;
    overflow: hidden;
}

.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-info {
    padding: 12px;
    flex: 1;
}

.featured-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    word-break: break-word;
}

.featured-info p {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-list-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-item-small {
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    cursor: pointer;
}

.small-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.small-info {
    flex: 1;
}

.small-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.small-desc {
    font-size: 10px;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.small-tag {
    font-size: 9px;
    color: #FF6B2C;
    background: #FFF0E6;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
}

.go-icon {
    color: #ccc;
    font-size: 12px;
}

/* ========== 商品网格（两列 & 三列） ========== */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.goods-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.goods-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}

.goods-grid-three .goods-card {
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.goods-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.goods-grid-three .goods-img {
    aspect-ratio: 1 / 1;
}

.goods-info {
    padding: 10px;
}

.goods-grid-three .goods-info {
    padding: 6px 6px 8px;
}

.goods-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goods-grid-three .goods-title {
    font-size: 12px;
    font-weight: 500;
}

.price {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.goods-grid-three .price {
    font-size: 13px;
}

.sales {
    font-size: 11px;
    color: var(--text-gray);
    margin-left: 6px;
}

.goods-grid-three .sales {
    font-size: 10px;
}

/* ========== 通栏广告位 ========== */
.middle-banner {
    margin: 16px 0;
    width: 96%;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    padding-left: 4%;
}

.middle-banner img {
    width: 100%;
    display: block;
}

.middle-banner a {
    display: block;
    line-height: 0;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 16px;
    border-top: 1px solid #EDF2F7;
    z-index: 20;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #9CA3AF;
    font-size: 11px;
    gap: 4px;
    transition: 0.2s;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--primary);
}

.main-content {
    padding-bottom: 70px;
}
/* 搜索按钮 */
.search-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-btn:hover,
.search-btn:active {
    color: #FF6B2C; /* 主色 */
}

/* 微调搜索框内部间距 */
.search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 24px;
    padding: 8px 12px;
    gap: 6px;
}