/* 手机端首页样式 - 日本风格优化 */

/* 轮播图 */
.m-banner {
    background: #FFFFFF;
}

.m-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #FFFFFF;
}

.m-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.m-carousel-item {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
    padding-top: 85.714%; /* 高240/宽280 = 0.85714，按280:240比例显示完整图片 */
}

.m-carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    object-fit: contain; /* 改为contain以完整显示图片 */
    margin: 0 auto;
    background: #FFFFFF; /* 白色背景，图片加载失败时可见 */
}

.m-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.m-carousel-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.m-carousel-dots span.active {
    width: 16px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
}

/* 快捷入口 - 日本风格 */
.m-quick-nav {
    display: flex;
    justify-content: space-around;
    padding: 24px 16px;
    background: #FFFBF5;
    margin-bottom: 8px;
}

.m-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.m-quick-item:active {
    transform: scale(0.95);
}

.m-quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.m-quick-icon.sale {
    background: linear-gradient(135deg, #E8A5A5 0%, #D98B8B 100%);
}

.m-quick-icon.new {
    background: linear-gradient(135deg, #D4C5A9 0%, #C9B89A 100%);
}

.m-quick-icon.fav {
    background: linear-gradient(135deg, #E5B8C8 0%, #D9A5B8 100%);
}

.m-quick-icon.rec {
    background: linear-gradient(135deg, #B8C9B8 0%, #A8B8A8 100%);
}

.m-quick-item span {
    font-size: 11px;
    color: #5C5C5C;
    letter-spacing: 0.3px;
}

/* 人气商品横向滚动 - 日本风格 */
.m-popular-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 4px 12px;
    -webkit-overflow-scrolling: touch;
}

.m-popular-scroll::-webkit-scrollbar {
    display: none;
}

.m-popular-item {
    flex-shrink: 0;
    width: 115px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: box-shadow 0.2s ease;
}

.m-popular-item:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.m-popular-item img {
    width: 115px;
    height: 115px;
    object-fit: contain;
    background: #FFFBF5;
}

.m-popular-item .m-goods-name {
    padding: 7px 6px;
    height: auto;
    font-size: 11px;
    -webkit-line-clamp: 1;
    margin-bottom: 0;
    color: #4A4A4A;
    line-height: 1.4;
}

.m-popular-item .m-goods-price {
    padding: 0 6px 7px;
    font-size: 12px;
    color: #8B7355;
    font-weight: 500;
}

.m-rank {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(60, 60, 60, 0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius: 6px;
    backdrop-filter: blur(4px);
}

.m-rank.top {
    background: rgba(232, 165, 165, 0.85);
    color: #5C3A3A;
}

/* 分类商品区域 - 日本风格 */
.m-category-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
