/* 生鲜展示站 - 精品风格 */
:root {
    --primary: #0d6b5c;
    --primary-light: #14967f;
    --accent: #e85d4c;
    --accent-soft: #fff0ee;
    --text: #1a1a1a;
    --text-secondary: #5c5c5c;
    --muted: #9a9a9a;
    --bg: #f7f6f3;
    --card: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 20px rgba(13, 107, 92, 0.08);
    --shadow-hover: 0 12px 32px rgba(13, 107, 92, 0.14);
    --radius: 12px;
    --radius-lg: 16px;
    --bottom-nav-h: 64px;
}

* { box-sizing: border-box; }

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.front-body {
    margin: 0;
    min-height: 100%;
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

.site-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .site-wrap { max-width: 720px; }
}

/* 顶栏 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 48px;
    background: rgba(247, 246, 243, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.back-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(13, 107, 92, 0.08);
    color: var(--primary);
}

/* 搜索 */
.search-bar {
    padding-top: 12px;
    padding-bottom: 8px;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 16px;
    background: var(--card);
    border-radius: 999px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 10px 0;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder { color: var(--muted); }

.btn-search {
    flex-shrink: 0;
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 107, 92, 0.35);
}

.site-main.has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}

/* 轮播 */
.banner-carousel {
    margin-bottom: 20px;
}

.banner-carousel .carousel-inner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banner-carousel .carousel-item img {
    height: 200px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .banner-carousel .carousel-item img { height: 260px; }
}

.banner-carousel .carousel-indicators [data-bs-target] {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* 分类 */
.category-nav { margin-bottom: 24px; }

.category-item {
    display: block;
    color: inherit;
    text-decoration: none;
}

.category-icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(13, 107, 92, 0.15), rgba(13, 107, 92, 0.05));
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-item:hover .category-icon-wrap {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(13, 107, 92, 0.2);
}

.category-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.category-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.page-intro-text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.block-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--primary);
}

/* 分区标题 */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 28px 0 16px;
}

.section-title .line {
    flex: 1;
    max-width: 72px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ccc, transparent);
}

.section-title .text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text);
}

.section-title .text.deco {
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.hot-section { padding-bottom: 8px; }

.empty-tip {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
    font-size: 0.9rem;
}

.search-result-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 12px;
}

/* 商品卡片 */
.product-grid { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }

.product-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: inherit;
}

.product-card-img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.04);
}

.product-card-body {
    padding: 12px 10px 14px;
    text-align: center;
}

.product-card-name {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分类 Tab */
.category-tabs .nav-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.category-tabs .nav-scroll::-webkit-scrollbar { display: none; }

.nav-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.nav-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(13, 107, 92, 0.25);
}

/* 详情页 */
.detail-page { padding-bottom: 24px; }

.detail-hero {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.detail-main-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.detail-name-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.price-deco {
    color: var(--accent);
    letter-spacing: 6px;
    font-size: 0.7rem;
    margin-bottom: 10px;
}

.detail-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.detail-category {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.detail-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.product-content {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-content table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.product-content table td,
.product-content table th {
    border: 1px solid #eee;
    padding: 8px;
}

.detail-actions { text-align: center; }

.btn-back-list {
    display: inline-block;
    padding: 12px 40px;
    border-radius: 999px;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-back-list:hover {
    background: var(--primary);
    color: #fff;
}

/* 底部导航（挂 body 下，移动端 viewport 贴底固定） */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bottom-nav-inner {
    display: flex;
    width: 100%;
    max-width: 480px;
    height: var(--bottom-nav-h);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .bottom-nav-inner {
        max-width: 720px;
    }
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}

.bottom-nav-item.is-active {
    color: var(--primary);
}

.bottom-nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-label { letter-spacing: 0.04em; }
