/* ========== BASE & VARIABLES ========== */
:root {
    --primary-red: #C62828;
    --dark-bg: #1a1a1a;
    --gold-accent: #FFC107;
    --light-bg: #F9F9F9;
    --text-dark: #1e293b;
    --text-light: #475569;
    --border-light: #e2e8f0;
    --tag-bg: #FFE0B2;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', 'Helvetica Neue', sans-serif;
}
body {
    background: var(--light-bg);
    color: var(--text-dark);
    scroll-behavior: smooth;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--dark-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-red), var(--gold-accent));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    color: white;
}
.nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0.5rem;
    list-style: none;
}
.nav-links.show { display: flex; }
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    color: white;
    padding: 0.5rem;
    transition: 0.2s;
}
.nav-links a:hover { color: var(--gold-accent); }
@media (min-width: 768px) {
    .hamburger { display: none; }
    .nav-links { display: flex !important; width: auto; flex-direction: row; padding: 0; gap: 2rem; }
    .navbar { padding: 1rem 2rem; }
    .logo { font-size: 1.6rem; }
}

/* ========== CAROUSEL ========== */
/* ========== CAROUSEL ========== */
.banner-container {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 0.75rem;
}
.carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    
    /* 尺寸自适应屏幕 */
    width: 100%;                 /* 宽度填满父容器 */
    max-width: 1200px;           /* 但不要过宽（可根据喜好调整） */
    max-height: 100vh;            /* 高度不超过视口高度的 70% */
    aspect-ratio: 1 / 1;        /* 移动端默认比例 */
    margin: 0 auto;              /* 居中（如果父容器宽度大于 max-width） */
}

/* 桌面端改为 3:1（宽度更大） */
@media (min-width: 768px) {
    .carousel {
        aspect-ratio: 1 / 1;
        max-height: 100vh;        /* 桌面端可稍小一点，避免横条太高 */
    }
}

/* 其余样式保持不变 */
.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}
.carousel-item {
    flex: 0 0 100%;
    height: 100%;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* 图片裁剪填充，保持比例 */
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.6rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    z-index: 10;
    min-width: 40px;
    min-height: 40px;
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.dots {
    text-align: center;
    margin-top: 0.5rem;
}
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    margin: 0 4px;
    cursor: pointer;
}
.dot.active {
    background: var(--primary-red);
    transform: scale(1.2);
}

/* ========== SEARCH BAR ========== */
.search-bar {
    max-width: 1400px;
    margin: 1rem auto 0.5rem;
    padding: 0 0.75rem;
}
.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 60px;
    background: white;
    transition: 0.2s;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}
@media (min-width: 768px) {
    .search-bar input { max-width: 400px; margin-left: auto; }
}

/* ========== SORT BAR & FILTER ROW ========== */
.sort-bar {
    max-width: 1400px;
    margin: 0.5rem auto 0;
    padding: 0 0.75rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.sort-bar select {
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    background: white;
    font-size: 0.9rem;
}
.filter-row {
    max-width: 1400px;
    margin: 0.5rem auto 0;
    padding: 0 0.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}
.zone-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
}
.zone-filter select {
    padding: 0.3rem 0.6rem;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    background: white;
}
.view-toggle {
    display: flex;
    gap: 0.5rem;
}
.view-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}
.view-btn.active {
    background: var(--primary-red);
    color: white;
}
@media (max-width: 640px) {
    .filter-row { flex-direction: column; align-items: stretch; }
    .zone-filter { justify-content: center; }
    .view-toggle { justify-content: center; }
}

/* ========== FILTER BAR (tags) ========== */
.filter-bar {
    max-width: 1400px;
    margin: 0.5rem auto 1rem;
    padding: 0 0.75rem;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.6rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.filter-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 60px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-red);
    color: white;
}
@media (min-width: 640px) {
    .filter-bar { flex-wrap: wrap; justify-content: center; overflow-x: visible; }
}

/* ========== RESULT BAR ========== */
.result-bar {
    max-width: 1400px;
    margin: 0.5rem auto 0;
    padding: 0 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.clear-filters {
    background: none;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
}
.clear-filters:hover {
    background: var(--primary-red);
    color: white;
}

/* ========== STORE GRID & CARDS ========== */
.stores-grid {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 0.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}
@media (min-width: 480px) { .stores-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stores-grid { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; } }

/* List view */
.stores-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.store-card.list-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}
.store-card.list-view .card-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    margin: 0;
}
.store-card.list-view .card-content { flex: 1; padding: 0; }
.store-card.list-view .store-name { font-size: 1.1rem; }
@media (max-width: 640px) {
    .store-card.list-view { flex-direction: column; text-align: center; }
    .store-card.list-view .card-img { margin: 0 auto; }
}

.store-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.store-card:active { transform: scale(0.98); }
@media (hover: hover) {
    .store-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 20px -8px rgba(0,0,0,0.15);
    }
}
.card-img {
    width: 100%;
    height: 140px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.card-img img {
    max-width: 80%;
    max-height: 100%;
    object-fit: contain;
}
.card-content { padding: 1rem; }
.store-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.store-name small {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
}
.store-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0; }
.tag {
    background: var(--tag-bg);
    color: var(--primary-red);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-weight: 500;
}
.store-desc {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0.5rem 0;
}
.member-info {
    font-size: 0.75rem;
    color: var(--primary-red);
    margin-top: 0.5rem;
    border-top: 1px solid #eef2ff;
    padding-top: 0.5rem;
}

/* ========== MAP SECTION ========== */
.map-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 0.75rem;
}
.map-section h3 { font-size: 1.2rem; margin-bottom: 0.8rem; }
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
}
.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}
@media (min-width: 768px) { .map-container iframe { height: 400px; } }

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--dark-bg);
    color: #e0e0e0;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* ========== STORE DETAIL PAGE (shared) ========== */
.container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 1.5rem;
}
.member-card { text-align: center; }
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    background: #f1f5f9;
}
.member-name { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.25rem; }
.member-chapter { color: var(--text-light); margin-bottom: 1.5rem; }
.linktree-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}
.btn {
    display: block;
    padding: 0.8rem;
    background: #f1f5f9;
    border-radius: 60px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
    transition: 0.2s;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    width: 100%;
}
.btn-primary {
    background: var(--primary-red);
    color: white;
}
.btn-primary:active { background: #8e0000; }
@media (hover: hover) {
    .btn:hover { transform: translateY(-2px); background: #e2e8f0; }
    .btn-primary:hover { background: #8e0000; }
}
.store-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}
.store-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.location { color: var(--text-light); font-size: 0.9rem; margin: 0.5rem 0; }
.desc { color: #334155; line-height: 1.5; margin: 1rem 0; }
.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0 1rem;
}
.small-btn {
    flex: 1 0 auto;
    min-width: 100px;
    background: #f1f5f9;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 40px;
    text-decoration: none;
    color: var(--text-dark);
    text-align: center;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}
.small-btn:hover { background: #e2e8f0; }
.extra-info {
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 1rem;
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover { text-decoration: underline; }
.loading, .error { text-align: center; padding: 2rem; color: var(--text-light); }
.hidden { display: none; }

/* ========== COUPON BOX ========== */
.coupon-box {
    background: #FFF8E1;
    border-left: 4px solid var(--primary-red);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 12px;
}
.coupon-title { font-weight: 700; font-size: 1rem; color: var(--primary-red); margin-bottom: 0.3rem; }
.coupon-desc { font-size: 0.9rem; color: #1e1e2a; margin-bottom: 0.3rem; }
.coupon-code { font-family: monospace; background: #f1f5f9; display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.coupon-expiry { font-size: 0.75rem; color: #888; margin-top: 0.3rem; }

/* ========== QR CODE SECTION ========== */
.qr-section {
    margin-top: 1rem;
    text-align: center;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 12px;
}
.qr-code img { width: 120px; height: 120px; }
.qr-code p { font-size: 0.75rem; color: #666; margin-top: 0.3rem; }

/* ========== SKELETON LOADERS ========== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}
.skeleton-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1rem;
}
.skeleton-img { height: 140px; background: #e2e8f0; border-radius: 12px; margin-bottom: 1rem; }
.skeleton-line { height: 1rem; background: #e2e8f0; border-radius: 8px; margin-bottom: 0.5rem; }
.skeleton-line.short { width: 60%; }
.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.skeleton-list-item {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.skeleton-list-img { width: 100px; height: 100px; background: #e2e8f0; border-radius: 12px; }
.skeleton-list-content { flex: 1; }
.skeleton-list-line { height: 1rem; background: #e2e8f0; border-radius: 8px; margin-bottom: 0.5rem; }

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-red);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 1000;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #8e0000;
    transform: translateY(-2px);
}