/**
 * ============================================================
 * CtrlEat Official Shopping Website
 * ============================================================
 * CtrlEat 正式版购物网站
 * 版权归天河星雨工作室[thxymc Studio] thxymc.com所有
 * Copyright © 2026 thxymc.com. All rights reserved.
 * 网页由天河星雨工作室制作 thxymc.com
 * ！！未经允许禁止公开源码！！
 * ============================================================
 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f5f7fb;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.home-topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    min-height: 72px;
    padding: 12px 5vw;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, .95);
    display: grid;
    grid-template-columns: auto minmax(260px, 520px) auto;
    gap: 18px;
    align-items: center;
}

.home-logo {
    display: grid;
    text-decoration: none;
    color: #15803d;
    font-weight: 1000;
    line-height: 1.1;
}

.home-logo span {
    font-size: 1.38rem;
}

.home-logo small {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
}

.home-search {
    min-height: 46px;
    padding: 4px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
}

.home-search input {
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 14px;
    font: inherit;
    font-weight: 800;
}

.home-search button {
    border: 0;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-weight: 1000;
    cursor: pointer;
}

.home-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.home-nav a {
    text-decoration: none;
    color: #334155;
    font-weight: 900;
}

.home-nav a:hover {
    color: #16a34a;
}

.home-page {
    width: min(1220px, 94vw);
    margin: 24px auto 56px;
}

.home-showcase {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.home-quick-cats,
.home-banner-carousel,
.home-section-strip,
.home-section {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .07);
}

.home-quick-cats {
    min-height: 300px;
    padding: 14px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.home-quick-cats h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.home-quick-cats a {
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 10px;
    color: #334155;
    background: #f8fafc;
    text-decoration: none;
    font-weight: 900;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.home-quick-cats a:hover {
    color: #15803d;
    background: #dcfce7;
}

.home-quick-cats img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    background: #e2e8f0;
}

.home-muted,
.sidebar-muted {
    color: #64748b;
    font-weight: 800;
}

.home-banner-carousel {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.home-banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    color: #fff;
    text-decoration: none;
}

.home-banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.home-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #e2e8f0;
}

.home-banner-slide span {
    position: absolute;
    left: 22px;
    bottom: 18px;
    right: 22px;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 1000;
    text-shadow: 0 2px 18px rgba(15, 23, 42, .7);
}

.home-section-strip {
    min-height: 58px;
    padding: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
}

.home-section-strip a,
.home-section-strip span {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: #fff;
    background: #16a34a;
    font-weight: 1000;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.home-section {
    margin-top: 20px;
    padding: 20px;
}

.section-head {
    margin-bottom: 14px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.eyebrow {
    display: inline-flex;
    color: #15803d;
    background: #dcfce7;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .82rem;
    font-weight: 1000;
    margin: 0 0 8px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.section-head a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 1000;
}

.category-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-card {
    padding: 10px;
    min-height: 142px;
    background: #f8fafc;
    border-radius: 14px;
    text-decoration: none;
    display: grid;
    gap: 9px;
    color: #0f172a;
}

.category-card img {
    width: 100%;
    aspect-ratio: 1.35 / 1;
    object-fit: cover;
    border-radius: 12px;
    background: #e2e8f0;
}

.category-card strong {
    font-weight: 1000;
    text-align: center;
}

.product-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 210px;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.product-row.two-lines {
    grid-template-rows: repeat(2, minmax(0, auto));
}

.product-card {
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}

.product-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
}

.product-image img {
    width: 100%;
    aspect-ratio: 1 / .78;
    object-fit: cover;
    display: block;
}

.home-product-tags {
    position: absolute;
    left: 8px;
    top: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.home-product-tags span {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    font-size: .74rem;
    font-weight: 1000;
    display: inline-flex;
    align-items: center;
}

.product-info {
    padding: 11px 3px 2px;
}

.product-info strong {
    display: block;
    font-size: 1rem;
    font-weight: 1000;
}

.product-info p {
    min-height: 40px;
    margin: 6px 0 8px;
    color: #64748b;
    line-height: 1.5;
    font-size: .88rem;
    font-weight: 800;
}

.product-info em {
    color: #16a34a;
    font-style: normal;
    font-weight: 1000;
}

.product-info small {
    display: block;
    margin-top: 5px;
    color: #ea580c;
    line-height: 1.4;
    font-weight: 900;
}

.home-empty {
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    line-height: 1.7;
    font-weight: 900;
    text-align: center;
}

.home-category-section.is-hidden {
    display: none;
}

.site-footer {
    width: min(1220px, 94vw);
    margin: 0 auto 24px;
    text-align: center;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.8;
}

@media (max-width: 980px) {
    .home-topbar {
        grid-template-columns: 1fr;
    }

    .home-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .home-showcase {
        grid-template-columns: 1fr;
    }

    .home-quick-cats {
        min-height: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-quick-cats h2,
    .home-quick-cats .home-muted {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .home-topbar {
        min-height: 0;
        padding: 8px 10px;
        gap: 8px;
    }

    .home-logo span {
        font-size: 1.08rem;
    }

    .home-logo small {
        display: none;
    }

    .home-search {
        min-height: 38px;
    }

    .home-search input {
        padding: 0 10px;
        font-size: 0.86rem;
    }

    .home-search button {
        min-height: 30px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .home-nav {
        gap: 10px;
        font-size: 0.78rem;
    }

    .home-page {
        width: min(100% - 16px, 1220px);
        margin-top: 10px;
    }

    .home-section {
        border-radius: 14px;
        padding: 12px;
        margin-top: 12px;
    }

    .home-banner-carousel {
        min-height: 150px;
        border-radius: 14px;
    }

    .home-banner-slide span {
        left: 12px;
        right: 12px;
        bottom: 10px;
        font-size: 1rem;
    }

    .section-head {
        align-items: flex-start;
        gap: 8px;
    }

    .category-row {
        grid-auto-columns: 108px;
        gap: 10px;
    }

    .category-card {
        min-height: 106px;
        padding: 8px;
    }

    .category-card strong {
        font-size: 0.8rem;
    }

    .product-row {
        grid-auto-columns: 138px;
        gap: 10px;
    }

    .home-quick-cats {
        display: flex;
        overflow-x: auto;
        padding: 10px;
        min-height: 0;
    }

    .home-quick-cats h2,
    .home-quick-cats .home-muted {
        flex: 0 0 auto;
        align-self: center;
        margin: 0;
    }

    .home-quick-cats a {
        flex: 0 0 128px;
        min-height: 34px;
        font-size: 0.78rem;
    }

    .home-section-strip {
        min-height: 44px;
        padding: 7px;
        margin-bottom: 10px;
    }

    .home-section-strip a,
    .home-section-strip span {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .home-product-tags span {
        min-height: 20px;
        padding: 0 6px;
        font-size: 0.64rem;
    }

    .home-product-tags span:nth-child(n+3) {
        display: none;
    }

    .product-info {
        padding: 8px 2px 0;
    }

    .product-info strong {
        font-size: 0.84rem;
    }

    .product-info p {
        min-height: 0;
        font-size: 0.72rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .home-empty {
        padding: 12px;
        font-size: 0.82rem;
    }
}
