:root {
    --ink: #20242b;
    --muted: #6d7480;
    --line: #e4e7eb;
    --surface: #ffffff;
    --canvas: #f6f7f8;
    --brand: #087f8c;
    --brand-dark: #05636d;
    --accent: #ee5d3a;
    --accent-dark: #cf4526;
    --success: #2d8a5b;
    --soft-brand: #eaf7f7;
    --soft-accent: #fff2ed;
    --soft-success: #f0faf5;
    --soft-success-line: #b9e4cc;
    --success-ink: #236c47;
    --error-line: #f2c1b4;
    --error-ink: #9b351e;
    --media-placeholder: #e9ecef;
    --disabled: #a9afb6;
    --old-price: #858d97;
    --shadow: 0 8px 24px rgba(33, 39, 45, 0.08);
    --header-surface: rgba(255, 255, 255, 0.94);
    --footer-surface: #1f2927;
    --hero-overlay: rgba(12, 31, 28, 0.46);
    --hero-text: #ffffff;
    --focus-ring: rgba(8, 127, 140, 0.14);
}

body[data-theme="urban"] {
    --ink: #1d2528;
    --muted: #687277;
    --line: #dfe3e5;
    --surface: #ffffff;
    --canvas: #f1f3f4;
    --brand: #314c55;
    --brand-dark: #20373e;
    --accent: #d94e38;
    --accent-dark: #ba3d2b;
    --success: #39765d;
    --soft-brand: #e9eff1;
    --soft-accent: #fff0ed;
    --soft-success: #edf6f1;
    --soft-success-line: #b5d8c6;
    --success-ink: #2f684d;
    --error-line: #edc2b8;
    --error-ink: #913825;
    --media-placeholder: #e4e8ea;
    --disabled: #9ca4a8;
    --old-price: #7e888d;
    --header-surface: rgba(250, 251, 251, 0.95);
    --footer-surface: #20282b;
    --hero-overlay: rgba(17, 29, 33, 0.54);
    --focus-ring: rgba(49, 76, 85, 0.14);
}

body[data-theme="night"] {
    --ink: #edf3f1;
    --muted: #9aa9a5;
    --line: #33413e;
    --surface: #1c2523;
    --canvas: #121816;
    --brand: #50b8a8;
    --brand-dark: #75cabc;
    --accent: #ff755b;
    --accent-dark: #ff927e;
    --success: #6cc59c;
    --soft-brand: #213a35;
    --soft-accent: #3b2825;
    --soft-success: #20372e;
    --soft-success-line: #376d57;
    --success-ink: #91d8b6;
    --error-line: #70453d;
    --error-ink: #ffb09f;
    --media-placeholder: #26302e;
    --disabled: #56615e;
    --old-price: #899793;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    --header-surface: rgba(18, 24, 22, 0.94);
    --footer-surface: #0b100f;
    --hero-overlay: rgba(4, 10, 9, 0.56);
    --focus-ring: rgba(80, 184, 168, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background: var(--canvas);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.container,
.directory-inner,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

/* Header */
.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: var(--header-surface);
    backdrop-filter: blur(18px);
}

.header-inner {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(240px, 520px) auto;
    align-items: center;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
}

.header-leading,
.logo,
.city-switch,
.main-nav,
.header-search {
    display: flex;
    align-items: center;
}

.header-leading {
    gap: 18px;
    min-width: 0;
}

.city-switch {
    gap: 5px;
    min-width: 72px;
    font-size: 15px;
    font-weight: 700;
}

.city-switch:hover,
.main-nav a:hover {
    color: var(--brand);
}

.city-switch-arrow {
    color: var(--muted);
    font-size: 14px;
}

.logo {
    gap: 8px;
    min-width: 0;
    font-size: 18px;
    font-weight: 800;
}

.logo-mark {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.logo-mark.large {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    font-size: 26px;
}

.header-search {
    overflow: hidden;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.header-search:focus-within {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.header-search button {
    align-self: stretch;
    padding: 0 18px;
    border: 0;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}

.main-nav {
    justify-content: flex-end;
    gap: 18px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 22px;
}

/* Location entry */
.location-entry {
    position: relative;
    overflow: hidden;
    background-color: #14221f;
    background-image: var(--entry-image);
    background-position: center;
    background-size: cover;
    color: var(--hero-text);
}

.location-entry::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    background: var(--hero-overlay);
    content: "";
}

.location-entry-main {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 12vh;
    text-align: center;
}

.location-brand h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.1;
}

.location-brand p {
    max-width: 520px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.location-status {
    display: flex;
    width: min(440px, 100%);
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 44px 0 28px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.location-status small {
    color: rgba(255, 255, 255, 0.68);
}

.location-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.location-actions {
    display: flex;
    width: min(440px, 100%);
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.primary-action,
.secondary-action,
.text-action,
.locate-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.primary-action {
    padding: 9px 20px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
}

.primary-action:hover {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
}

.secondary-action {
    padding: 9px 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
}

.text-action {
    width: 100%;
    color: #fff;
    font-size: 14px;
}

/* City directory */
.city-search-band {
    position: sticky;
    z-index: 60;
    top: 70px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    background: var(--header-surface);
    backdrop-filter: blur(16px);
}

.city-search-box {
    display: flex;
    height: 44px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.city-search-box:focus-within {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.city-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.city-search-box button {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    visibility: hidden;
}

.city-search-hint {
    min-height: 20px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.directory-content {
    padding-bottom: 64px;
}

.location-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.location-row strong {
    font-size: 20px;
}

.locate-button {
    gap: 6px;
    padding: 8px 15px;
    border: 1px solid var(--line);
    background: var(--soft-brand);
    color: var(--brand-dark);
}

.locate-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.directory-section {
    padding: 30px 0;
    border-bottom: 1px solid var(--line);
}

.directory-section h1,
.directory-section h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.hot-city-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.hot-city-link {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
}

.hot-city-link:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.city-letter-group {
    display: grid;
    grid-template-columns: 64px 1fr;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 140px;
}

.city-letter-group h3 {
    color: var(--brand);
    font-size: 20px;
}

.letter-city-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 26px;
}

.letter-city-link {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.letter-city-link strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.letter-city-link span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
}

.letter-city-link:hover strong {
    color: var(--brand);
}

.alphabet-index {
    position: fixed;
    z-index: 70;
    top: 50%;
    right: max(4px, calc((100vw - 1260px) / 2));
    display: flex;
    max-height: 78vh;
    flex-direction: column;
    justify-content: center;
    transform: translateY(-42%);
}

.alphabet-index a {
    display: grid;
    width: 22px;
    min-height: 18px;
    place-items: center;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
}

.empty-search {
    padding: 48px 0;
    color: var(--muted);
    text-align: center;
}

/* City product listing */
.city-overview {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.city-overview.has-city-image {
    min-height: 250px;
    border-bottom: 0;
    background-color: #18312c;
    background-image: var(--city-image);
    background-position: center 42%;
    background-size: cover;
    color: #fff;
}

.city-overview.has-city-image::before {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    content: "";
}

.city-overview.has-city-image .city-overview-inner {
    position: relative;
    z-index: 1;
}

.city-overview.has-city-image p,
.city-overview.has-city-image .section-kicker {
    color: rgba(255, 255, 255, 0.78);
}

.city-overview.has-city-image .platform-home-link {
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.city-overview-inner {
    display: flex;
    min-height: 156px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.city-overview h1 {
    font-size: 36px;
}

.city-overview p {
    margin-top: 5px;
    color: var(--muted);
}

.platform-home-link,
.change-city-link {
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
}

.platform-home-link {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--soft-brand);
}

.sort-nav {
    position: sticky;
    z-index: 50;
    top: 70px;
    border-bottom: 1px solid var(--line);
    background: var(--header-surface);
    backdrop-filter: blur(16px);
}

.sort-tabs {
    display: flex;
    min-height: 48px;
    align-items: stretch;
    gap: 28px;
}

.sort-tabs a {
    display: inline-grid;
    min-width: 54px;
    place-items: center;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sort-tabs a.active {
    border-bottom-color: var(--brand);
    color: var(--brand);
}

.product-list-section,
.search-results {
    padding-top: 30px;
    padding-bottom: 40px;
}

.list-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.list-heading h2 {
    font-size: 22px;
}

.list-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.inline-notice {
    margin-bottom: 18px;
    padding: 12px 15px;
    border-left: 3px solid var(--brand);
    background: var(--soft-brand);
    color: var(--brand-dark);
    font-size: 14px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(33, 39, 45, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.product-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--media-placeholder);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.025);
}

.product-image-placeholder,
.detail-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--muted);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.badge-featured {
    background: var(--accent);
}

.badge-muted {
    background: rgba(32, 36, 43, 0.78);
}

.product-body {
    display: flex;
    min-height: 196px;
    flex: 1;
    flex-direction: column;
    padding: 15px;
}

.product-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-subtitle {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-tags {
    display: flex;
    overflow: hidden;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.product-tags span {
    padding: 2px 6px;
    border: 1px solid var(--soft-success-line);
    border-radius: 4px;
    background: var(--soft-success);
    color: var(--success);
    font-size: 10px;
    white-space: nowrap;
}

.product-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 13px;
}

.product-price-block {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 7px;
}

.price-current,
.price-current-large {
    color: var(--accent);
    font-weight: 900;
}

.price-current {
    font-size: 19px;
}

.price-current-large {
    font-size: 30px;
}

.price-original {
    color: var(--old-price);
    font-size: 11px;
    text-decoration: line-through;
}

.sale-count {
    width: 100%;
    color: var(--muted);
    font-size: 10px;
}

.buy-link {
    display: inline-grid;
    min-width: 76px;
    min-height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.buy-link:hover {
    background: var(--accent-dark);
}

.buy-link.disabled,
.btn-buy.disabled {
    cursor: not-allowed;
    background: var(--disabled);
}

/* Product detail */
.breadcrumb {
    display: flex;
    overflow: hidden;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.breadcrumb a {
    color: var(--brand);
}

.breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.detail-media {
    min-height: 480px;
    background: var(--media-placeholder);
}

.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-summary {
    padding: 34px;
}

.detail-city {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.detail-summary h1 {
    margin-top: 8px;
    font-size: 25px;
    line-height: 1.45;
}

.detail-subtitle {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.detail-tags {
    margin-top: 18px;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 26px;
    padding: 18px 0 12px;
    border-top: 1px solid var(--line);
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 12px;
}

.btn-buy {
    display: inline-grid;
    width: min(240px, 100%);
    min-height: 48px;
    place-items: center;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.btn-buy:hover {
    background: var(--accent-dark);
}

.affiliate-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
}

.detail-content-section {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.detail-content-section > h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.article-content {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.85;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-bottom: 14px;
}

.article-content img,
.article-content video {
    max-width: 100%;
    height: auto;
    margin: 14px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.related-products {
    padding-top: 34px;
}

.product-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.purchase-qr-float {
    position: fixed;
    z-index: 110;
    right: 20px;
    bottom: 22px;
    width: 156px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(18, 25, 32, 0.18);
    text-align: center;
}

.purchase-qr-float a,
.purchase-qr-float span {
    display: block;
}

.purchase-qr-title {
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.purchase-qr-float img {
    display: block;
    width: 132px;
    height: 132px;
    margin: 0 auto;
    background: #fff;
    object-fit: contain;
}

.purchase-qr-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
}

.mobile-buy-bar {
    display: none;
}

/* Search */
.search-page {
    padding-top: 42px;
    padding-bottom: 44px;
}

.search-heading h1 {
    font-size: 30px;
}

.search-form-large {
    display: flex;
    width: min(700px, 100%);
    height: 48px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.search-form-large:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-form-large input {
    width: 100%;
    min-width: 0;
    padding: 0 15px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.search-form-large button {
    min-width: 92px;
    border: 0;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.search-scope {
    margin-top: 10px;
    color: var(--brand);
    font-size: 13px;
}

/* Shared states */
.empty-state,
.error-page {
    padding: 72px 24px;
    text-align: center;
}

.empty-state h2,
.error-page h1 {
    margin-bottom: 8px;
    font-size: 24px;
}

.empty-state p,
.error-page p {
    max-width: 580px;
    margin: 0 auto 22px;
    color: var(--muted);
}

.error-page strong {
    color: var(--brand);
    font-size: 72px;
    line-height: 1;
}

.msg-success,
.msg-error {
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 4px;
    font-size: 13px;
}

.msg-success {
    border: 1px solid var(--soft-success-line);
    background: var(--soft-success);
    color: var(--success-ink);
}

.msg-error {
    border: 1px solid var(--error-line);
    background: var(--soft-accent);
    color: var(--error-ink);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 34px 0 8px;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.pagination a:hover,
.pagination .current {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

/* Footer */
.site-footer {
    margin-top: 30px;
    padding: 34px 0;
    border-top: 1px solid #343a41;
    background: var(--footer-surface);
    color: #c5c9ce;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 13px 0;
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-disclaimer {
    color: #90969d;
    font-size: 11px;
}

@media (max-width: 1024px) {
    .header-inner {
        grid-template-columns: auto 1fr auto;
        gap: 14px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        right: 0;
        width: 180px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .main-nav.mobile-open {
        display: flex;
    }

    .main-nav a {
        padding: 10px 12px;
    }

    .menu-toggle {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hot-city-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .letter-city-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container,
    .directory-inner,
    .footer-inner,
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        grid-template-columns: auto 1fr auto;
        min-height: 62px;
    }

    .header-leading {
        gap: 12px;
    }

    .logo-text {
        display: none;
    }

    .city-switch {
        min-width: 60px;
        font-size: 14px;
    }

    .header-search {
        height: 38px;
    }

    .header-search button {
        width: 44px;
        padding: 0;
        font-size: 0;
    }

    .header-search button::after {
        content: "⌕";
        font-size: 19px;
    }

    .city-search-band,
    .sort-nav {
        top: 62px;
    }

    .city-overview-inner {
        min-height: 120px;
    }

    .city-overview h1 {
        font-size: 25px;
    }

    .platform-home-link {
        max-width: 120px;
        text-align: center;
    }

    .product-grid,
    .product-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-body {
        min-height: 190px;
        padding: 11px;
    }

    .product-title {
        min-height: 42px;
        font-size: 14px;
    }

    .product-subtitle {
        -webkit-line-clamp: 1;
    }

    .product-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .buy-link {
        width: 100%;
    }

    .hot-city-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .city-letter-group {
        grid-template-columns: 36px 1fr;
    }

    .letter-city-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
    }

    .alphabet-index {
        right: 0;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-media {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .detail-summary {
        padding: 22px;
    }

    .detail-summary h1 {
        font-size: 21px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-content-section {
        padding: 20px;
    }

    .purchase-qr-float {
        right: 12px;
        bottom: 78px;
        width: 118px;
        padding: 7px;
    }

    .purchase-qr-title {
        margin-bottom: 5px;
        font-size: 11px;
    }

    .purchase-qr-float img {
        width: 102px;
        height: 102px;
    }

    .purchase-qr-hint {
        margin-top: 4px;
        font-size: 9px;
    }

    .mobile-buy-bar {
        position: fixed;
        z-index: 120;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        min-height: 64px;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 8px 12px;
        border-top: 1px solid var(--line);
        background: var(--surface);
        box-shadow: 0 -5px 18px rgba(33, 39, 45, 0.08);
    }

    .mobile-buy-bar div {
        display: flex;
        min-width: 0;
        flex-direction: column;
    }

    .mobile-buy-bar strong {
        color: var(--accent);
        font-size: 20px;
    }

    .mobile-buy-bar span {
        color: var(--muted);
        font-size: 10px;
    }

    .mobile-buy-bar a {
        display: grid;
        min-width: 130px;
        min-height: 44px;
        place-items: center;
        border-radius: 5px;
        background: var(--accent);
        color: #fff;
        font-weight: 900;
    }

    .mobile-buy-bar + .site-footer {
        padding-bottom: 94px;
    }
}

@media (max-width: 460px) {
    .purchase-qr-float {
        right: 8px;
        width: 104px;
        padding: 6px;
    }

    .purchase-qr-float img {
        width: 90px;
        height: 90px;
    }

    .header-inner {
        width: calc(100% - 16px);
        gap: 7px;
    }

    .logo {
        display: none;
    }

    .header-leading {
        min-width: 66px;
    }

    .header-search input {
        padding: 0 10px;
        font-size: 13px;
    }

    .menu-toggle {
        width: 36px;
    }

    .city-overview-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        padding: 20px 0;
    }

    .platform-home-link {
        max-width: none;
    }

    .sort-tabs {
        justify-content: space-between;
        gap: 8px;
    }

    .product-grid,
    .product-grid.compact {
        grid-template-columns: 1fr;
    }

    .product-card {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .product-media {
        height: 100%;
        min-height: 176px;
        aspect-ratio: auto;
    }

    .product-body {
        min-height: 176px;
    }

    .product-subtitle {
        display: none;
    }

    .product-footer {
        align-items: end;
        flex-direction: row;
    }

    .buy-link {
        width: auto;
        min-width: 68px;
    }

    .hot-city-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .letter-city-list {
        grid-template-columns: 1fr;
    }

    .letter-city-link span {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .location-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .list-heading {
        align-items: flex-start;
    }
}
