/* ============================================
   即购即达 · 智慧社区零售服务平台
   Aesthetic: Neo-Oriental Warmth
   Palette: Deep teal + terracotta + warm gold
   ============================================ */

:root {
    --teal-deep: #0d3b3b;
    --teal-mid: #1a6b5a;
    --teal-light: #2d9b7a;
    --terracotta: #c75c2e;
    --terracotta-light: #e8845a;
    --gold: #d4a853;
    --gold-light: #f0d48a;
    --cream: #faf6f0;
    --warm-white: #fefcf9;
    --warm-gray: #6b5e54;
    --text-primary: #2a1f1a;
    --text-secondary: #7a6b60;
    --shadow-warm: 0 4px 24px rgba(13, 59, 59, 0.08);
    --shadow-hover: 0 12px 40px rgba(13, 59, 59, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Lattice pattern background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(45deg, rgba(13,59,59,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(13,59,59,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(13,59,59,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(13,59,59,0.02) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    pointer-events: none;
    z-index: 0;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ============ TOP BAR ============ */
.top-bar {
    background: var(--teal-deep);
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    padding: 6px 0;
    position: relative;
    z-index: 100;
}
.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.location-tag { font-weight: 500; }
.top-links a {
    margin-left: 20px;
    transition: color 0.2s;
}
.top-links a:hover { color: var(--gold-light); }

/* ============ HEADER ============ */
.header {
    background: var(--warm-white);
    border-bottom: 1px solid rgba(13,59,59,0.06);
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(12px);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo-mark {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--teal-mid), var(--teal-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(26,107,90,0.3);
}
.logo-char {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 900;
    color: white;
}
.logo-dot {
    position: absolute;
    top: -3px; right: -3px;
    width: 12px; height: 12px;
    background: var(--terracotta);
    border-radius: 50%;
    border: 2px solid var(--warm-white);
}
.logo-text h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--teal-deep);
    letter-spacing: 2px;
}
.logo-text p {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Search */
.search-box {
    flex: 1;
    max-width: 480px;
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid rgba(13,59,59,0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box:focus-within {
    border-color: var(--teal-mid);
    box-shadow: 0 0 0 4px rgba(26,107,90,0.1);
}
.search-box input {
    flex: 1;
    padding: 12px 24px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}
.search-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--teal-mid), var(--teal-light));
    color: white;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.2s;
}
.search-btn:hover { opacity: 0.9; }

/* Header actions */
.header-actions {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    align-items: center;
}
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    transition: transform 0.2s, color .15s;
    color: var(--text-secondary);
    text-decoration: none;
    min-width: 38px;
    cursor: pointer;
}
.action-item:hover { transform: translateY(-2px); color: var(--terracotta); }
.action-item:hover .action-label { color: var(--terracotta); }
.action-item.nav-item .action-icon { font-size: 18px; }
.action-icon { font-size: 22px; }
.action-label { font-size: 11px; color: var(--text-secondary); transition: color .15s; }
.badge {
    position: absolute;
    top: -4px; right: -8px;
    background: var(--terracotta);
    color: white;
    font-size: 10px;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px 60px;
    position: relative;
    z-index: 1;
}

/* ============ HERO / CAROUSEL ============ */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-bottom: 48px;
}
.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-warm);
    aspect-ratio: 2.4 / 1;
}
.carousel-track { width: 100%; height: 100%; position: relative; }
.carousel-slide {
    position: absolute;
    inset: 0;
    background: var(--slide-bg);
    display: flex;
    align-items: center;
    padding: 48px 56px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.carousel-slide.active { opacity: 1; }
.slide-content { position: relative; z-index: 2; }
.slide-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.3);
}
.slide-content h2 {
    font-family: 'ZCOOL KuaiLe', 'Noto Serif SC', serif;
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.slide-content p {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}
.slide-btn {
    padding: 10px 28px;
    background: white;
    color: var(--teal-deep);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.slide-visual {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px; height: 200px;
}
.float-element {
    position: absolute;
    font-size: 48px;
    animation: floatBounce 3s ease-in-out infinite;
}
.fruit-1 { top: 0; left: 20%; animation-delay: 0s; }
.fruit-2 { top: 30%; right: 0; animation-delay: 0.5s; }
.fruit-3 { bottom: 10%; left: 10%; animation-delay: 1s; }
.fruit-4 { bottom: 0; right: 20%; animation-delay: 1.5s; }

@keyframes floatBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}

/* Carousel controls */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 56px;
    display: flex;
    gap: 8px;
}
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
    cursor: pointer;
}
.dot.active {
    width: 24px;
    border-radius: 4px;
    background: white;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
}
.carousel-arrow:hover { background: rgba(255,255,255,0.4); }
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }

/* Notice panel */
.notice-panel {
    background: var(--warm-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-warm);
    border: 1px solid rgba(13,59,59,0.05);
}
.notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--teal-deep);
    padding-bottom: 14px;
    border-bottom: 2px solid var(--cream);
    margin-bottom: 12px;
}
.notice-icon { font-size: 18px; }
.notice-list { list-style: none; }
.notice-list li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(13,59,59,0.06);
}
.notice-list li:last-child { border-bottom: none; }
.notice-list a {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.notice-list a:hover { color: var(--teal-mid); }
.notice-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    background: var(--cream);
    color: var(--text-secondary);
    flex-shrink: 0;
}
.notice-tag.hot { background: #fff0e6; color: var(--terracotta); }
.notice-tag.new { background: #e6f7f0; color: var(--teal-mid); }

/* ============ SECTION HEADER ============ */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.section-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--teal-deep);
}
.title-decoration {
    width: 40px; height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--gold));
    border-radius: 2px;
}

/* ============ CATEGORY NAV ============ */
.category-nav { margin-bottom: 48px; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 12px;
    background: var(--warm-white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(13,59,59,0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInUp 0.5s ease both;
    animation-delay: calc(var(--delay) * 0.06s);
}
.category-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(26,107,90,0.15);
}
.cat-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: color-mix(in srgb, var(--cat-color) 10%, white);
    transition: transform 0.3s;
}
.category-item:hover .cat-icon { transform: scale(1.15) rotate(-5deg); }
.category-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ FLASH SALE ============ */
.flash-sale {
    margin-bottom: 48px;
    background: linear-gradient(135deg, #fff8f4 0%, #fff0e8 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid rgba(199,92,46,0.08);
    position: relative;
    overflow: hidden;
}
.flash-sale::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(199,92,46,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.countdown {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.countdown-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 8px;
}
.countdown-block {
    background: var(--teal-deep);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: center;
}
.countdown-sep {
    color: var(--teal-deep);
    font-weight: 700;
}
.flash-sale-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.flash-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(13,59,59,0.04);
}
.flash-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(199,92,46,0.12);
}
.flash-img {
    font-size: 52px;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.flash-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.flash-price {
    margin-bottom: 10px;
}
.price-now {
    font-size: 20px;
    font-weight: 700;
    color: var(--terracotta);
}
.price-old {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 6px;
}
.flash-progress {
    margin-bottom: 12px;
    position: relative;
    height: 20px;
    background: #f0e8e4;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--progress);
    background: linear-gradient(90deg, var(--terracotta), var(--terracotta-light));
    border-radius: 10px;
    transition: width 1s ease;
}
.flash-progress span {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: .5px;
    text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 2px rgba(0,0,0,.35);
}
.flash-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}
.flash-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ============ HOT PRODUCTS ============ */
.hot-products { margin-bottom: 48px; }
.tab-nav {
    margin-left: auto;
    display: flex;
    gap: 4px;
    background: var(--cream);
    border-radius: 30px;
    padding: 4px;
}
.tab {
    padding: 8px 20px;
    border-radius: 26px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    transition: all 0.3s;
}
.tab.active {
    background: var(--teal-mid);
    color: white;
    box-shadow: 0 2px 8px rgba(26,107,90,0.3);
}
.tab:hover:not(.active) { color: var(--teal-mid); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.product-card {
    background: var(--warm-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(13,59,59,0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.product-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f4f0 0%, #f0ebe5 100%);
    position: relative;
    overflow: hidden;
}
.product-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(26,107,90,0.04) 0%, transparent 60%);
}
.product-img span {
    font-size: 64px;
    transition: transform 0.4s;
}
.product-card:hover .product-img span { transform: scale(1.15) rotate(-3deg); }
.product-tag {
    position: absolute;
    top: 12px; left: 12px;
    padding: 3px 10px;
    background: var(--terracotta);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 2;
}
.product-tag.group {
    background: var(--teal-mid);
}
.product-info {
    padding: 16px 20px 20px;
}
.product-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.self-tag {
    color: #e53935;
    font-weight: 700;
    font-size: 13px;
    margin-right: 2px;
}
.product-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--terracotta);
}
.product-price::before {
    content: '';
    font-size: 13px;
}
.add-cart {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-mid), var(--teal-light));
    color: white;
    font-size: 20px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.add-cart:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(26,107,90,0.4);
}

/* ============ FOOTER ============ */
.footer {
    background: var(--teal-deep);
    color: rgba(255,255,255,0.8);
    padding-top: 48px;
    position: relative;
    z-index: 1;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--teal-light));
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px 40px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
}
.footer-brand h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    color: white;
    margin-bottom: 8px;
}
.footer-brand p {
    font-size: 13px;
    opacity: 0.7;
}
.footer-links {
    display: flex;
    gap: 60px;
}
.footer-col h4 {
    color: white;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}
.footer-col a {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}
.footer-col a:hover {
    opacity: 1;
    transform: translateX(4px);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 32px;
    text-align: center;
    font-size: 12px;
    opacity: 0.5;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .hero-section { grid-template-columns: 1fr; }
    .notice-panel { display: none; }
    .flash-sale-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .header-inner { gap: 16px; padding: 12px 16px; }
    .search-box { max-width: 100%; }
    .logo-text h1 { font-size: 18px; }
    .main-content { padding: 16px; }
    .category-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
    .category-item { padding: 14px 6px; }
    .cat-icon { width: 42px; height: 42px; font-size: 22px; }
    .flash-sale { padding: 20px; }
    .flash-sale-grid { grid-template-columns: 1fr 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 32px; }
    .footer-links { gap: 32px; }
    .slide-content h2 { font-size: 24px; }
    .slide-visual { display: none; }
}