/* ========================================
   全摩1店铺平台 - 样式文件
   配色：珊瑚红#ff6b6b + 黄色#f6f504 + 白色
   ======================================== */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   通用容器
   ======================================== */
.app-container {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    padding-bottom: 70px;
}

/* ========================================
   顶部导航栏 - 黑色风格
   ======================================== */
.top-header {
    background: #1a1a1a;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
    letter-spacing: 1px;
}

/* ========================================
   轮播广告区 - 黑色圆角背景
   ======================================== */
.banner-section {
    background: #1a1a1a;
    padding: 10px 15px 15px;
}

.banner-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #2a2a2a;
}

.banner-wrapper {
    display: flex;
    transition: transform 0.4s ease;
}

.banner-slide {
    min-width: 100%;
}

.banner-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
}

.banner-dots .dot.active {
    background: #ff6b6b;
    width: 20px;
    border-radius: 4px;
}

/* ========================================
   搜索栏 - 白色圆角背景
   ======================================== */
.search-section {
    background: #fff;
    padding: 12px 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 10px 15px;
    gap: 10px;
}

.search-icon {
    font-size: 18px;
    color: #999;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.search-box input::placeholder {
    color: #999;
}

.search-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:active {
    background: #333;
}

/* ========================================
   功能导航图标
   ======================================== */
.nav-icons-section {
    background: #fff;
    padding: 15px 10px;
}

.nav-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.nav-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 5px;
    border-radius: 10px;
    transition: background 0.2s;
}

.nav-icon-item:active {
    background: #f5f5f5;
}

.nav-icon-item .nav-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 12px;
}

.nav-icon-item .nav-text {
    font-size: 12px;
    color: #666;
}

/* ========================================
   热门推荐区
   ======================================== */
.hot-section {
    background: #fff;
    padding: 15px;
    margin-top: 10px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-icon {
    font-size: 18px;
}

.more-link {
    font-size: 13px;
    color: #999;
}

.hot-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hot-shop-grid .shop-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hot-shop-grid .shop-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.hot-shop-grid .card-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
}

.hot-shop-grid .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    background: #ff6b6b;
}

.hot-shop-grid .card-content {
    padding: 12px;
}

.hot-shop-grid .shop-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-shop-grid .shop-location {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   列表页顶部搜索栏
   ======================================== */
.list-header {
    background: #fff;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.list-header .search-box {
    background: #f5f5f5;
}

/* ========================================
   筛选栏
   ======================================== */
.filter-section {
    background: #fff;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-item {
    flex: 1;
}

.filter-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.filter-tags {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.tag-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.tag-scroll::-webkit-scrollbar {
    display: none;
}

.filter-tag {
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

/* ========================================
   分类快捷筛选
   ======================================== */
.category-filter {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    overflow-x: auto;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    white-space: nowrap;
    background: #f5f5f5;
    color: #666;
    transition: all 0.2s;
}

.category-chip:active {
    background: #eee;
}

.category-chip.active {
    background: #ff6b6b;
    color: #fff;
}

/* ========================================
   店铺列表
   ======================================== */
.shop-section {
    padding: 15px;
}

.result-info {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.result-info .count {
    color: #ff6b6b;
    font-weight: bold;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shop-grid .shop-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.shop-grid .shop-card:active {
    transform: scale(0.98);
}

.shop-grid .card-image {
    position: relative;
    width: 100%;
    padding-top: 65%;
    overflow: hidden;
}

.shop-grid .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    background: #ff6b6b;
}

.shop-grid .card-body {
    padding: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-location {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   空状态
   ======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.empty-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}

/* ========================================
   加载更多
   ======================================== */
.load-more {
    padding: 20px 0;
    text-align: center;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #f5f5f5;
    border-radius: 25px;
    font-size: 14px;
    color: #666;
    transition: background 0.2s;
}

.load-more-btn:active {
    background: #eee;
}

/* ========================================
   底部导航栏
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    padding: 8px 0 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
    max-width: 750px;
    margin: 0 auto;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bottom-nav .nav-icon {
    font-size: 22px;
}

.bottom-nav .nav-text {
    font-size: 11px;
    color: #999;
}

.bottom-nav .nav-item.active .nav-text {
    color: #ff6b6b;
}

.bottom-nav .nav-item.active .nav-icon {
    transform: scale(1.1);
}

/* ========================================
   Toast提示
   ======================================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========================================
   详情页样式
   ======================================== */
.detail-header {
    position: relative;
}

.detail-swiper {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.detail-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    padding: 15px;
}

.detail-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.detail-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.detail-price {
    font-size: 18px;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 15px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-tag {
    padding: 4px 10px;
    background: #fff0f0;
    color: #ff6b6b;
    border-radius: 12px;
    font-size: 12px;
}

.detail-info {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

/* ========================================
   响应式适配
   ======================================== */
@media screen and (max-width: 375px) {
    html {
        font-size: 13px;
    }
    
    .nav-icon-item .nav-icon {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
    
    .hot-shop-grid .card-image,
    .shop-grid .card-image {
        padding-top: 70%;
    }
}

@media screen and (min-width: 414px) {
    .banner-slide img {
        height: 200px;
    }
}
