/* ============ home.css · 首页page section styles ============
   首屏, 服务保障, 分类展示, 畅销产品, 品牌故事 story.
   Loaded only on index.html. */

/* ============================================================
   1. 首屏 (left text + right image)
   ============================================================ */
.hero {
    position: relative;
    padding: calc(var(--header-offset, 104px) + clamp(28px, 5vw, 64px)) 0 clamp(76px, 7vw, 112px);
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(rgba(0, 84, 96, 0.05) 1px, transparent 1.4px) 0 0 / 24px 24px,
        radial-gradient(900px 540px at 4% -12%, rgba(var(--accent-rgb), 0.20), transparent 60%),
        radial-gradient(760px 480px at 98% 2%, rgba(var(--coral-rgb), 0.14), transparent 62%),
        radial-gradient(620px 420px at 52% 112%, rgba(255, 216, 77, 0.14), transparent 66%),
        linear-gradient(180deg, #effbfc 0%, #f9fefd 46%, #ffffff 100%);
}
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.18), transparent);
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(40px, 5vw, 88px);
    align-items: center;
}

/* 首屏 text */
.hero-text { max-width: 600px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-dark);
    font-weight: 800;
    margin-bottom: clamp(20px, 2vw, 28px);
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.12);
    backdrop-filter: blur(10px);
}
.hero-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 3px rgba(var(--coral-rgb), 0.18);
    animation: hero-dot 2.4s ease-in-out infinite;
}
@keyframes hero-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(var(--coral-rgb), 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(var(--coral-rgb), 0.06); }
}
.hero h1 {
    font-size: clamp(34px, 4.5vw, 70px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: clamp(18px, 2vw, 28px);
    color: var(--text);
    text-wrap: balance;
}
.gradient-text {
    background: linear-gradient(94deg, #00c2d1 0%, #00a6b4 36%, #ff8452 78%, #ff4d29 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent);
}
.hero-desc {
    font-size: clamp(15px, 1.02vw, 18px);
    color: var(--text-soft);
    line-height: 1.78;
    margin-bottom: clamp(28px, 3vw, 38px);
    max-width: 500px;
}

/* 首屏 CTA 按钮 */
.hero-cta {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 32px);
    margin-bottom: clamp(32px, 3.4vw, 48px);
    flex-wrap: wrap;
}
.hero-cta .btn-primary {
    background: linear-gradient(120deg, var(--coral) 0%, #ff8049 56%, var(--coral-dark) 100%);
    color: #fff;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(var(--coral-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
}
.hero-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(var(--coral-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: saturate(1.05) brightness(1.03);
}
.hero-cta .btn-primary svg { transition: transform 0.3s; }
.hero-cta .btn-primary:hover svg { transform: translateX(4px); }
.hero-cta .btn-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: gap 0.3s, color 0.3s, border-color 0.3s;
}
.hero-cta .btn-link:hover { gap: 14px; color: var(--accent); border-bottom-color: rgba(var(--accent-rgb), 0.4); }
.hero-cta .btn-link svg { transition: transform 0.3s; }
.hero-cta .btn-link:hover svg { transform: translateX(4px); }

/* 首屏数据条 */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 2.2vw, 36px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: clamp(16px, 2.2vw, 36px);
    border-right: 1px solid rgba(var(--shadow-rgb), 0.14);
}
.hero-stat:last-child { border-right: 0; padding-right: 0; }
.hero-stat strong {
    font-size: clamp(17px, 1.5vw, 23px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.hero-stat:nth-child(2) strong { color: var(--coral-dark); }
.hero-stat span { font-size: 12px; color: var(--text-soft); letter-spacing: 0.01em; }
.stat-star {
    width: 0.66em;
    height: 0.66em;
    margin-left: 3px;
    fill: var(--gold);
    vertical-align: 0.05em;
}

/* 首屏 visual */
.hero-visual { position: relative; z-index: 1; }
.hero-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    border-radius: clamp(20px, 1.9vw, 28px);
    overflow: hidden;
    box-shadow: 0 34px 74px rgba(var(--shadow-rgb), 0.2), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.hero-main-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hero-img-wrap:hover .hero-main-img { transform: scale(1.035); }
.hero-img-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(5, 24, 30, 0.58) 0%, rgba(5, 24, 30, 0.14) 34%, transparent 62%);
}

/* 图片浮动标签 */
.hero-chip { position: absolute; z-index: 2; }
.hero-chip-rating {
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 26px rgba(5, 24, 30, 0.22);
    font-size: 12px;
    color: var(--text);
    backdrop-filter: blur(6px);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}
.hero-img-wrap:hover .hero-chip-rating { transform: rotate(0deg); }
.hero-chip-rating .star { color: var(--gold); }
.hero-chip-rating strong { font-weight: 700; }
.hero-chip-rating .meta { color: var(--text-soft); }
.hero-chip-guarantee {
    left: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 42px rgba(5, 24, 30, 0.26);
    transform: rotate(2deg);
    transition: transform 0.3s;
}
.hero-img-wrap:hover .hero-chip-guarantee { transform: rotate(0deg); }
.hero-chip-guarantee .ico {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-dark);
}
.hero-chip-guarantee .g-text { display: flex; flex-direction: column; line-height: 1.25; }
.hero-chip-guarantee strong { font-size: 14px; font-weight: 700; color: var(--text); }
.hero-chip-guarantee span { font-size: 11.5px; color: var(--text-soft); }

/* Decorative glow behind 首屏 image */
.hero-visual::after {
    content: '';
    position: absolute;
    width: clamp(220px, 24vw, 360px);
    height: clamp(220px, 24vw, 360px);
    right: clamp(-100px, -6vw, -60px);
    bottom: clamp(-100px, -6vw, -60px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16) 0%, transparent 68%);
    filter: blur(6px);
    z-index: -1;
    pointer-events: none;
}

/* ============================================================
   2. 服务保障 (floating card 网格, overlaps 首屏 bottom)
   ============================================================ */
.services {
    background: var(--bg);
    padding: 0 0 var(--space-section-pc);
    position: relative;
    z-index: 2;
    margin-top: -40px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    background: var(--bg);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 26px 60px rgba(var(--shadow-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}
.service-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.service-card:hover { background: var(--accent-soft); transform: translateY(-4px); }
.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(160deg, #e8fcfe, #ccf2f6);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.service-card:nth-child(2) .service-icon { background: linear-gradient(160deg, #fff3ee, #ffe2d7); box-shadow: inset 0 0 0 1px rgba(var(--coral-rgb), 0.16); }
.service-card:nth-child(3) .service-icon { background: linear-gradient(160deg, #fffce9, #fff1c1); box-shadow: inset 0 0 0 1px rgba(255, 182, 72, 0.22); }
.service-card:nth-child(4) .service-icon { background: linear-gradient(160deg, #eef6ff, #dbebfc); box-shadow: inset 0 0 0 1px rgba(70, 130, 220, 0.14); }
.service-card:hover .service-icon { background: #fff; transform: translateY(-2px) rotate(-6deg) scale(1.06); box-shadow: 0 10px 22px rgba(var(--accent-rgb), 0.18), inset 0 0 0 1px rgba(var(--accent-rgb), 0.18); }
.service-icon img { width: 44px; height: 44px; object-fit: contain; }
.service-content h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.01em; }
.service-content p { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin: 0; }

/* ============================================================
   3. 分类展示 (3-column image card 网格)
   ============================================================ */
.section-alt { background: var(--bg-soft); }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 18px;
}
.cat-card {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
    display: flex;
    align-items: flex-end;
}
.cat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1), filter 0.4s;
}
.cat-card:hover img { transform: scale(1.06); filter: saturate(1.18); }
.cat-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(var(--shadow-rgb), 0.18), 0 0 0 1px rgba(var(--accent-rgb), 0.18); }
.cat-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 38, 48, 0.88) 0%, rgba(4, 52, 62, 0.34) 50%, transparent 76%);
    transition: background 0.4s;
}
.cat-card:hover .cat-overlay {
    background: linear-gradient(to top, rgba(3, 30, 40, 0.95) 0%, rgba(0, 92, 104, 0.48) 58%, transparent 82%);
}
.cat-content { position: relative; z-index: 1; padding: 22px; width: 100%; }
.cat-content h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; line-height: 1.2; letter-spacing: -0.02em; }
.cat-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0;
    line-height: 1.45;
    max-width: 340px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 畅销产品 section — hide 品牌故事 (all 产品s are Fish Keeper) */
#products .product-brand { display: none; }
/* "View All" text link button */
.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: var(--text-soft);
    background: transparent;
    transition: all 0.25s;
    white-space: nowrap;
    text-decoration: none;
}
.btn-outline-dark:hover { color: var(--accent); gap: 10px; }
.btn-outline-dark svg { width: 16px; height: 16px; transition: transform 0.25s; }
.btn-outline-dark:hover svg { transform: translateX(3px); }

/* 标签页 */
.home-tabs { justify-content: center; margin-bottom: 40px; }

/* ============================================================
   5. 品牌故事 story (left image + right text)
   ============================================================ */
.brand-section { background: var(--bg-soft); }
.brand-wrap {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: center;
}
.brand-visual { position: relative; }
.brand-img-main {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 30px 70px rgba(var(--shadow-rgb), 0.15);
    position: relative;
}
.brand-img-main img { width: 100%; height: 100%; object-fit: cover; }
.brand-img-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(var(--accent-rgb), 0.15) 100%);
}
.brand-badge {
    position: absolute;
    bottom: -24px;
    right: -24px;
    background: var(--bg);
    border-radius: 22px;
    padding: 20px 28px;
    box-shadow: 0 20px 46px rgba(var(--shadow-rgb), 0.16);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    transform: rotate(-2deg);
    transition: transform 0.3s;
}
.brand-visual:hover .brand-badge { transform: rotate(0deg) translateY(-2px); }
.brand-badge strong { font-size: 40px; font-weight: 800; color: var(--coral); line-height: 1; letter-spacing: -0.03em; }
.brand-badge span { font-size: 13px; color: var(--text-soft); line-height: 1.4; white-space: pre-line; }

.brand-text .section-eyebrow { text-align: left; }
.brand-text h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.brand-lead {
    font-size: 17px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.7;
}
.brand-text p { color: var(--text-soft); margin-bottom: 14px; font-size: 15px; line-height: 1.7; }

.brand-stats {
    display: flex;
    gap: 32px;
    margin: 32px 0;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.brand-stat strong {
    display: block;
    font-size: 30px;
    color: var(--accent-dark);
    font-weight: 800;
    margin-bottom: 4px;
}
.brand-stat strong .stat-star { fill: var(--gold); }
.brand-stat span { color: var(--text-soft); font-size: 13px; }

.brand-btn {
    background: linear-gradient(120deg, #ff5c3d, #ff7a45 55%, #e64226);
    color: #fff;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 700;
    gap: 10px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(var(--coral-rgb), 0.28);
    transition: all 0.25s;
}
.brand-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.1);
    box-shadow: 0 18px 34px rgba(var(--coral-rgb), 0.36);
}

/* ============================================================
   6. 响应式 — 平板端 (≤1199px)
   ============================================================ */
@media (max-width: 1199px) {
    /* 首屏 */
    .hero { padding-bottom: 84px; }
    .hero-inner { gap: 48px; }

    /* 服务保障 */
    .services { padding-bottom: var(--space-section-pad); }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 24px; }

    /* 分类展示 */
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .cat-content { padding: 18px; }
    .cat-content h3 { font-size: 18px; margin-bottom: 0; }
    .cat-content p { display: none; }

    /* 畅销产品 */
    .home-tabs { margin-bottom: 32px; }

    /* 品牌故事 */
    .brand-wrap { gap: 40px; }
    .brand-text h2 { font-size: 30px; }
    .brand-lead { font-size: 15px; }
    .brand-stats { gap: 24px; }
    .brand-stat strong { font-size: 24px; }
    .brand-badge { bottom: -16px; right: -16px; padding: 16px 22px; }
    .brand-badge strong { font-size: 32px; }
}

/* ============================================================
   7. 响应式 — Small 平板端 (≤991px)
   ============================================================ */
@media (max-width: 991px) {
    /* 品牌故事: stack vertically */
    .brand-wrap { grid-template-columns: 1fr; gap: 48px; }
    .brand-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* ============================================================
   8. 响应式 — 首屏堆叠 (≤900px)
   ============================================================ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 44px; }
    .hero-text { max-width: 640px; width: 100%; }
    .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
    .hero-stats { gap: 20px; }
    .hero-stat { padding-right: 20px; }
}

/* ============================================================
   9. 响应式 — 移动端 (≤767px)
   ============================================================ */
@media (max-width: 767px) {
    /* 首屏 */
    .hero { padding-bottom: 56px; }
    .hero-inner { gap: 36px; }
    .hero-eyebrow { font-size: 10px; letter-spacing: 1.2px; padding: 6px 12px 6px 10px; gap: 7px; white-space: nowrap; }
    .hero h1 { margin-bottom: 18px; }
    .hero-desc { margin-bottom: 28px; }
    .hero-cta { gap: 18px; margin-bottom: 32px; flex-wrap: wrap; }
    .hero-cta .btn-primary { padding: 14px 28px; font-size: 14px; }
    .hero-stats { gap: 14px; }
    .hero-stat { padding-right: 14px; }
    .hero-stat strong { font-size: 17px; }
    .hero-img-wrap { border-radius: 18px; }
    .hero-chip-rating { top: 12px; right: 12px; padding: 6px 12px; font-size: 11px; }
    .hero-chip-guarantee { left: 12px; bottom: 12px; padding: 10px 14px 10px 12px; gap: 10px; }
    .hero-chip-guarantee .ico { width: 30px; height: 30px; }
    .hero-chip-guarantee strong { font-size: 13px; }
    .hero-chip-guarantee span { font-size: 11px; }
    .hero-visual::before { display: none; }

    /* 服务保障 */
    .services { margin-top: -24px; padding-bottom: var(--space-section-mob); }
    .services-grid { grid-template-columns: 1fr; gap: 8px; padding: 12px; border-radius: 16px; }
    .service-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
    .service-icon { width: 48px; height: 48px; flex-shrink: 0; }
    .service-icon img { width: 30px; height: 30px; }
    .service-content h3 { font-size: 14px; margin-bottom: 2px; }
    .service-content p { font-size: 12px; line-height: 1.4; }

    /* 分类展示 */
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-content { padding: 14px; }
    .cat-content h3 { font-size: 14px; }
    .cat-content p { display: none; }

    /* 畅销产品 */
    .home-tabs {
        justify-content: center;
        margin-bottom: 24px;
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 6px;
    }
    .home-tabs .tab { padding: 6px 14px; font-size: 12px; }

    /* 品牌故事 */
    .brand-wrap { gap: 32px; }
    .brand-text h2 { font-size: 24px; margin-bottom: 14px; }
    .brand-lead { font-size: 15px; }
    .brand-text p { font-size: 14px; }
    .brand-stats { gap: 16px; flex-wrap: wrap; margin: 24px 0; padding: 20px 0; }
    .brand-stat { min-width: calc(33% - 11px); }
    .brand-stat strong { font-size: 20px; }
    .brand-stat span { font-size: 12px; }
    .brand-badge { bottom: -12px; right: 12px; padding: 12px 18px; gap: 12px; }
    .brand-badge strong { font-size: 26px; }
    .brand-badge span { font-size: 11px; }
    .brand-btn { padding: 12px 24px; font-size: 14px; }
}
