/* Yuto.Shop — Home page */
.shop-h5.shop-page-home {
    background: var(--shop-bg);
}

.shop-h5.shop-page-home .shop-h5-body {
    padding-bottom: calc(72px + var(--shop-safe-bottom));
}

.shop-home-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--shop-page-pad-x) 16px;
    box-sizing: border-box;
}

/* Header — site name + search 同一行 */
.shop-home-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--shop-page-pad-x);
    margin-left: calc(-1 * var(--shop-page-pad-x));
    margin-right: calc(-1 * var(--shop-page-pad-x));
    width: calc(100% + 2 * var(--shop-page-pad-x));
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--shop-border-light);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.shop-home-brand-name {
    flex-shrink: 0;
    max-width: 38%;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
    color: var(--shop-text);
    line-height: 1.25;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-home-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--shop-text-muted);
    font-size: 13px;
    border: 1px solid var(--shop-border-light);
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-search:active {
    background: #efefef;
}

.shop-home-search .ti {
    font-size: 17px;
    color: #bbb;
    flex-shrink: 0;
}

.shop-home-search span {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Member bar */
.shop-home-member-guest {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
}

.shop-home-brand-link--cta {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    font-weight: 600;
}

.shop-home-member-bar {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: var(--shop-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.shop-home-member-user {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 10px;
}

.shop-home-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.shop-home-member-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.shop-home-member-name {
    font-size: 16px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-home-member-level {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.22);
}

.shop-home-member-level--2 { background: rgba(203, 213, 225, 0.35); }
.shop-home-member-level--3 { background: rgba(251, 191, 36, 0.4); color: #fef3c7; }
.shop-home-member-level--4 { background: rgba(167, 139, 250, 0.45); }

.shop-home-member-points-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.shop-home-member-points-val {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.shop-home-member-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

/* Notice */
.shop-home-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 0;
    padding: 10px 14px;
    background: linear-gradient(90deg, #fffbeb, #fef9c3);
    border-radius: 12px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: var(--shop-shadow-sm);
    border: 1px solid rgba(245, 158, 11, 0.15);
    position: relative;
    z-index: 10;
}

.shop-home-notice .ti {
    flex-shrink: 0;
    font-size: 17px;
    color: var(--shop-accent);
}

.shop-home-notice-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Banner — 紧接头部下方 */
.shop-home-banner {
    position: relative;
    margin: 10px 0 0;
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    background: #fce8e4;
    box-shadow: var(--shop-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.shop-home-banner-viewport { overflow: hidden; }

.shop-home-banner-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.shop-home-banner-slide {
    flex: 0 0 100%;
    display: block;
    text-decoration: none;
}

.shop-home-banner-slide img {
    width: 100%;
    aspect-ratio: 2.2 / 1;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #fce8e4, #bfdbfe);
}

.shop-home-banner-placeholder {
    aspect-ratio: 2.2 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce8e4 0%, #fdba74 100%);
    color: var(--shop-primary-deep);
    padding: 24px;
    text-align: center;
}

.shop-home-banner-placeholder .ti {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.65;
}

.shop-home-banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.shop-home-banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.shop-home-banner-dot.is-active {
    width: 18px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Sections */
.shop-home-section {
    margin: 12px 0 0;
}

.shop-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.shop-home-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--shop-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-home-section-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--shop-primary), var(--shop-accent));
}

.shop-home-section-more {
    font-size: 13px;
    color: var(--shop-text-muted);
    text-decoration: none;
}

.shop-home-section-desc {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--shop-text-muted);
    line-height: 1.4;
}

/* 成为代言人 */
.shop-home-ambassador {
    margin-top: 12px;
}

.shop-home-ambassador-hero {
    margin-bottom: 12px;
    padding: 18px 16px;
    border-radius: var(--shop-radius);
    background: linear-gradient(135deg, #1a6b4a 0%, #2d9a6a 55%, #45b884 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(26, 107, 74, 0.22);
}

.shop-home-ambassador-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.shop-home-ambassador-title {
    margin: 10px 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.shop-home-ambassador-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.92;
}

.shop-home-ambassador-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    opacity: 0.95;
}

.shop-home-repurchase,
.shop-home-points {
    margin-top: 16px;
}

/* Nav — 图标推荐 128×128 */
.shop-home-nav-section {
    margin-bottom: 0;
}

.shop-home-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px 4px;
    padding: 16px 8px;
    background: var(--shop-bg-elevated);
    border-radius: var(--shop-radius);
    box-shadow: none;
    border: none;
}

.shop-home-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--shop-text);
    padding: 6px 2px;
    border-radius: 12px;
    transition: background 0.12s ease;
}

.shop-home-nav-item:active {
    background: rgba(var(--shop-brand-rgb), 0.06);
}

.shop-home-nav-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.shop-home-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-home-nav-icon--0 { background: linear-gradient(145deg, #f87171, #e93323); }
.shop-home-nav-icon--1 { background: linear-gradient(145deg, #fb923c, #e85d04); }
.shop-home-nav-icon--2 { background: linear-gradient(145deg, #fbbf24, #d97706); }
.shop-home-nav-icon--3 { background: linear-gradient(145deg, #f472b6, #ec4899); }
.shop-home-nav-icon--4 { background: linear-gradient(145deg, #fca5a5, #ef4444); }

.shop-home-nav-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--shop-text-secondary);
}

/* Ads — 通栏 3.2:1 / 双图 1.6:1 */
.shop-home-ads {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-home-ad-single {
    display: block;
    border-radius: var(--shop-radius);
    overflow: hidden;
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-ad-single img {
    width: 100%;
    aspect-ratio: 3.2 / 1;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.shop-home-ad-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shop-home-ad-half {
    display: block;
    border-radius: var(--shop-radius-sm);
    overflow: hidden;
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-ad-half img {
    width: 100%;
    aspect-ratio: 1.6 / 1;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

/* Products — 封面 1:1 */
.shop-home-products {
    background: var(--shop-bg-elevated);
    border-radius: var(--shop-radius);
    padding: 14px 10px 12px;
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shop-home-product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--shop-radius-sm);
    overflow: hidden;
    background: #fafbfc;
    border: 1px solid var(--shop-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-home-product-card:active {
    transform: scale(0.985);
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-product-cover {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    overflow: hidden;
}

.shop-home-product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shop-home-product-card:active .shop-home-product-cover img {
    transform: scale(1.03);
}

.shop-home-product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.shop-home-product-body {
    padding: 10px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-home-product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--shop-text);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.shop-home-product-sub {
    font-size: 11px;
    color: var(--shop-text-muted);
    margin: 0 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-home-product-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: var(--shop-danger);
    font-weight: 700;
}

.shop-home-product-price small { font-size: 12px; }
.shop-home-product-price span { font-size: 18px; }

.shop-home-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--shop-text-muted);
    font-size: 14px;
}

/* New user zone */
.shop-home-newuser {
    margin: 12px 0 0;
    padding: 16px 14px 14px;
    border-radius: var(--shop-radius);
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 50%, #ffffff 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.shop-home-newuser-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.shop-home-newuser-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #92400e;
}

.shop-home-newuser-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: #b45309;
}

.shop-home-newuser-gift {
    flex-shrink: 0;
    max-width: 46%;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.35;
    color: #92400e;
}

.shop-home-newuser-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.shop-home-newuser-scroll::-webkit-scrollbar { display: none; }

.shop-home-newuser-card {
    flex: 0 0 124px;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-newuser-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f3f4f6;
}

.shop-home-newuser-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--shop-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.shop-home-newuser-name {
    padding: 6px 8px 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--shop-text-secondary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.7em;
}

.shop-home-newuser-price {
    padding: 4px 8px 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--shop-danger);
}

.shop-home-newuser-claim,
.shop-home-newuser-login {
    border: none;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    background: #fff;
    box-shadow: var(--shop-shadow-sm);
    text-decoration: none;
    display: inline-block;
}

/* Service footer */
.shop-home-service {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0 0;
    padding: 16px 10px;
    background: var(--shop-bg-elevated);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow-sm);
}

.shop-home-service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--shop-text-secondary);
}

.shop-home-service-item .ti {
    font-size: 22px;
    color: var(--shop-primary);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--shop-brand-rgb), 0.08);
}

/* Mall zones — home shortcuts */
.shop-home-zones-section {
    margin-top: 4px;
}

.shop-home-zones-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.shop-home-zones-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--shop-text);
}

.shop-home-zones-sub {
    font-size: 12px;
    color: var(--shop-text-muted);
}

.shop-home-zones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.shop-home-zone-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--shop-border-light);
    box-shadow: var(--shop-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-home-zone-card:active {
    transform: scale(0.99);
}

.shop-home-zone-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.shop-home-zone-card--member .shop-home-zone-icon {
    background: rgba(47, 128, 237, 0.12);
    color: #2f80ed;
}

.shop-home-zone-card--repurchase .shop-home-zone-icon {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}

.shop-home-zone-card--points .shop-home-zone-icon {
    background: rgba(242, 153, 74, 0.14);
    color: #f2994a;
}

.shop-home-zone-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shop-home-zone-body strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--shop-text);
}

.shop-home-zone-body em {
    font-style: normal;
    font-size: 12px;
    color: var(--shop-text-muted);
}

.shop-home-zone-arrow {
    color: var(--shop-text-muted);
    font-size: 18px;
    flex-shrink: 0;
}
