/* 入驻雀庄地图 — 自适应布局 */

:root {
    --st-primary: #fa9715;
    --st-primary-dark: #e08610;
    --st-primary-soft: rgba(250, 151, 21, 0.12);
    --st-primary-glow: rgba(250, 151, 21, 0.28);
    --st-bg-deep: #1a1a2e;
    --st-text: #1f2937;
    --st-text-muted: #6b7280;
    --st-border: rgba(15, 23, 42, 0.08);
    --st-surface: rgba(255, 255, 255, 0.96);
    --st-radius: 14px;
    --st-radius-sm: 10px;
    --st-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --st-header-h: 56px;
    --st-map-h: clamp(280px, 42vh, 520px);
    --st-safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.st-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--st-text);
    line-height: 1.5;
    background-color: #f3f4f6;
    background-image:
        linear-gradient(180deg, rgba(250, 151, 21, 0.07) 0%, transparent 28%),
        url("/static/images/background.png");
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
}

.st-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--st-header-h);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--st-border);
}

.st-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 clamp(12px, 3vw, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.st-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--st-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.04);
    transition: background 0.2s, color 0.2s;
}

.st-back:hover {
    background: var(--st-primary-soft);
    color: var(--st-primary-dark);
}

.st-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--st-primary);
    font-weight: 700;
    font-size: 15px;
}

.st-brand-logo {
    border-radius: 8px;
    object-fit: contain;
}

@media (max-width: 480px) {
    .st-back-text {
        display: none;
    }
}

.st-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 24px) clamp(12px, 3vw, 24px) calc(28px + var(--st-safe-bottom));
}

.st-hero {
    margin-bottom: clamp(14px, 2.5vw, 20px);
}

.st-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--st-primary-dark);
    font-weight: 600;
}

.st-page-title {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 700;
    color: var(--st-bg-deep);
}

.st-lead {
    margin: 0;
    font-size: clamp(0.875rem, 2.2vw, 0.95rem);
    color: var(--st-text-muted);
    max-width: 36rem;
}

.st-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(16px, 2.5vw, 20px);
}

@media (min-width: 1024px) {
    .st-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        align-items: start;
    }
}

.st-map-panel,
.st-list-panel {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow);
    overflow: hidden;
}

.st-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px clamp(14px, 2.5vw, 18px);
    border-bottom: 1px solid var(--st-border);
}

.st-map-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--st-bg-deep);
}

.st-map-center {
    font-size: 12px;
    color: var(--st-text-muted);
    text-align: right;
}

#map {
    width: 100%;
    height: var(--st-map-h);
    min-height: 280px;
    background: #e5e7eb;
}

.st-list-head {
    padding: 14px clamp(14px, 2.5vw, 18px) 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.st-list-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--st-bg-deep);
}

.st-store-count {
    font-size: 13px;
    color: var(--st-text-muted);
}

.st-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px clamp(14px, 2.5vw, 18px) 14px;
}

@media (max-width: 640px) {
    .st-filter-form {
        grid-template-columns: 1fr;
    }
}

.st-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.st-filter-label {
    font-size: 12px;
    color: var(--st-text-muted);
    font-weight: 500;
}

.st-filter-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    font-size: 14px;
    color: var(--st-text);
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.st-filter-select:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 3px var(--st-primary-soft);
}

.st-store-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 clamp(14px, 2.5vw, 18px) 14px;
    max-height: none;
}

@media (min-width: 640px) {
    .st-store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .st-store-grid {
        grid-template-columns: 1fr;
        max-height: calc(100vh - var(--st-header-h) - 220px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.st-store-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.st-store-card:hover {
    border-color: rgba(250, 151, 21, 0.35);
    box-shadow: 0 6px 20px var(--st-primary-glow);
}

.st-card-top {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.st-store-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--st-border);
}

.st-store-info {
    flex: 1;
    min-width: 0;
}

.st-store-name {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--st-bg-deep);
    line-height: 1.35;
    word-break: break-word;
}

.st-store-meta {
    margin: 0;
    font-size: 12px;
    color: var(--st-text-muted);
    line-height: 1.5;
    word-break: break-word;
}

.st-card-actions {
    display: flex;
    gap: 8px;
}

.st-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.st-btn:active {
    transform: scale(0.98);
}

.st-btn-primary {
    background: linear-gradient(135deg, var(--st-primary) 0%, var(--st-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px var(--st-primary-glow);
}

.st-btn-primary:hover {
    filter: brightness(1.05);
}

.st-btn-ghost {
    background: #f3f4f6;
    color: var(--st-text);
}

.st-btn-ghost:hover {
    background: var(--st-primary-soft);
    color: var(--st-primary-dark);
}

.st-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--st-text-muted);
    font-size: 14px;
}

.st-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--st-text-muted);
}

.st-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--st-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: st-spin 0.75s linear infinite;
}

@keyframes st-spin {
    to {
        transform: rotate(360deg);
    }
}

.st-pagination-wrap {
    padding: 0 clamp(14px, 2.5vw, 18px) clamp(16px, 2.5vw, 18px);
}

.st-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.st-pagination a,
.st-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    color: var(--st-text);
    border: 1px solid var(--st-border);
    background: #fff;
}

.st-pagination a:hover {
    border-color: var(--st-primary);
    color: var(--st-primary-dark);
    background: var(--st-primary-soft);
}

.st-pagination .st-page-current {
    background: var(--st-primary);
    color: #fff;
    border-color: var(--st-primary);
}

.st-pagination .st-page-disabled {
    color: #cbd5e1;
    pointer-events: none;
}

.st-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px clamp(12px, 3vw, 24px) calc(20px + var(--st-safe-bottom));
    text-align: center;
}

.st-footer p {
    margin: 0;
    font-size: 12px;
    color: var(--st-text-muted);
}

.st-store-grid.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .st-spinner {
        animation: none;
    }
}
