/* 手机端公共样�?*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', sans-serif;
    background-color: #FFFBF5;
    color: #4A4A4A;
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 60px; /* 为底部导航留空间 */
}

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

img {
    max-width: 100%;
    height: auto;
}

/* 顶部导航 */
.m-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.m-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
}

.m-logo img {
    height: 35px;
    width: auto;
}

.m-search-icon {
    padding: 8px;
    color: #666;
}

.m-search-box {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.m-search-box input {
    flex: 1;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
}

.m-search-box input:focus {
    border-color: #C9A86C;
}

.m-search-box button {
    height: 36px;
    padding: 0 15px;
    background: #C9A86C;
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 14px;
}

.m-search-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

/* 底部导航 */
.m-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
    position: relative;
}

.m-nav-item svg {
    margin-bottom: 2px;
}

.m-nav-item.active {
    color: #C9A86C;
}

.m-cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #C9A86C;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* 主内容区 */
.m-main {
    padding-top: 50px; /* 为顶部导航留空间 */
}

/* 通用section样式 - 日本风格 */
.m-section {
    background: #FFFBF5;
    margin-bottom: 8px;
    padding: 20px 16px;
}

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

.m-section-header h2 {
    font-size: 17px;
    font-weight: 500;
    color: #3A3A3A;
    position: relative;
    padding-left: 12px;
    letter-spacing: 0.5px;
}

.m-section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 14px;
    background: linear-gradient(180deg, #D4C5A9 0%, #C9A86C 100%);
    border-radius: 1px;
}

.m-more {
    font-size: 11px;
    color: #8B8B8B;
    letter-spacing: 0.3px;
}

/* 商品卡片 - 日本风格 */
.m-goods-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.m-goods-card:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.m-goods-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #FAFAF5;
}

.m-goods-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: #FAFAF5;
}

.m-goods-card:active .m-goods-img img {
    transform: scale(1.02);
}

.m-discount-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #D4C09A;
    color: #fff;
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.m-goods-info {
    padding: 10px 8px;
}

.m-goods-name {
    font-size: 12px;
    color: #4A4A4A;
    line-height: 1.5;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.m-goods-intro {
    font-size: 10px;
    color: #9B9B9B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.m-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.m-goods-price {
    font-size: 14px;
    color: #8B7355;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.m-original-price {
    font-size: 10px;
    color: #B8B8B8;
    text-decoration: line-through;
    letter-spacing: 0.1px;
}

/* 商品网格 */
.m-goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* 查看全部 - 日本风格 */
.m-view-all {
    text-align: center;
    padding: 18px 0 12px;
    margin-top: 12px;
}

.m-view-all a {
    color: #8B8B8B;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.m-view-all a:active {
    color: #6B6B6B;
}

/* 空状�?*/
.m-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.m-empty svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 加载�?*/
.m-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* 按钮 */
.m-btn {
    display: inline-block;
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    font-size: 14px;
    text-align: center;
    border: none;
    cursor: pointer;
}

.m-btn-primary {
    background: #C9A86C;
    color: #fff;
}

.m-btn-outline {
    background: transparent;
    border: 1px solid #C9A86C;
    color: #C9A86C;
}

/* 分类标签 - 日本风格 */
.m-category-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.m-category-tabs::-webkit-scrollbar {
    display: none;
}

.m-tab {
    flex-shrink: 0;
    padding: 7px 14px;
    background: #F5F5F0;
    border-radius: 12px;
    font-size: 12px;
    color: #6B6B6B;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    letter-spacing: 0.3px;
}

.m-tab:active {
    transform: scale(0.96);
}

.m-tab.active {
    background: #E8DCC8;
    color: #5C5C5C;
    border-color: #D4C5A9;
    font-weight: 500;
}

/* Toast提示 */
.m-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
}
