/* =====================================================
 * 安雨智选 · 首页样式
 * ===================================================== */

/* ---------- 顶部栏 ---------- */
.anyu-home-topbar {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
    position: sticky;
    top: 0;
    z-index: 50;
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .anyu-home-topbar {
        max-width: 680px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}
.anyu-home-logo {
    font-size: 17px;
    font-weight: 800;
    color: #1a2332;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.anyu-home-login {
    font-size: 14px;
    color: #FF4B2B;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 16px;
    background: #FFF0EA;
    font-weight: 700;
}
.anyu-home-login:hover {
    background: #FFE5DC;
}
.anyu-home-user {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a2332;
}
.anyu-home-user-avatar {
    border-radius: 50%;
    display: block;
}
.anyu-home-user-name {
    font-size: 14px;
    font-weight: 700;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 首页主体 ---------- */
.anyu-home {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 100px;
    box-sizing: border-box;
}

/* ---------- 通用：区块标题 ---------- */
.anyu-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px;
}
.anyu-home-section-head h3 {
    font-size: 17px;
    font-weight: 800;
    color: #1a2332;
    margin: 0;
}
.anyu-home-more {
    font-size: 13px;
    color: #8892a0;
    text-decoration: none;
}
.anyu-home-more:hover {
    color: #FF4B2B;
}

/* ---------- 搜索框 ---------- */
.anyu-home-search {
    margin-top: 12px;
}
.anyu-home-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e3edf9;
    border-radius: 24px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.06);
}
.anyu-home-search-icon {
    font-size: 16px;
    opacity: 0.5;
}
.anyu-home-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #1a2332;
    background: transparent;
    padding: 8px 0;
}
.anyu-home-search-input::placeholder {
    color: #b0b8c4;
}
.anyu-home-search-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF6B35, #FF4B2B);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 18px;
    cursor: pointer;
}
.anyu-home-search-btn:active {
    transform: scale(0.97);
}

/* ---------- 分类入口 ---------- */
.anyu-home-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 8px;
    background: #fff;
    border-radius: 16px;
    padding: 18px 12px;
    margin-top: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.anyu-home-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 6px 2px;
    border-radius: 10px;
    transition: background 0.15s;
}
.anyu-home-cat:hover {
    background: #f7f9fc;
}
.anyu-home-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFF0EA, #FFE5DC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}
.anyu-home-cat-name {
    font-size: 12px;
    color: #4a5568;
    font-weight: 600;
    text-align: center;
}

/* ---------- 今日好物 ---------- */
.anyu-home-goods-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.anyu-home-goods-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.anyu-home-goods-card:active {
    transform: scale(0.98);
}
.anyu-home-goods-img {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    height: 0;
    background: #f5f6fa;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.anyu-home-goods-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.anyu-home-goods-img-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #c0c8d2;
    white-space: nowrap;
}
.anyu-home-goods-name {
    font-size: 13px;
    color: #1a2332;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.anyu-home-goods-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.anyu-home-goods-price {
    font-size: 16px;
    font-weight: 900;
    color: #FF4B2B;
}
.anyu-home-goods-views {
    font-size: 11px;
    color: #a8b0bc;
}

/* ---------- 精选测评 ---------- */
.anyu-home-articles-list {
    background: #fff;
    border-radius: 14px;
    padding: 6px 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.anyu-home-article {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f5;
}
.anyu-home-article:last-child {
    border-bottom: none;
}
.anyu-home-article-dot {
    color: #FF4B2B;
    font-size: 20px;
    line-height: 1;
}
.anyu-home-article-title {
    flex: 1;
    font-size: 14px;
    color: #1a2332;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.anyu-home-article:hover .anyu-home-article-title {
    color: #FF4B2B;
}

/* ---------- 底部导航 ---------- */
.anyu-home-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: #fff;
    border-top: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.anyu-home-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #8892a0;
    padding: 6px 0;
}
.anyu-home-nav-item.is-active {
    color: #FF4B2B;
}
.anyu-home-nav-icon {
    font-size: 20px;
    line-height: 1;
}
.anyu-home-nav-name {
    font-size: 11px;
    font-weight: 600;
}