/* =====================================================================
   Storefront redesign (Sep 2026): header, homepage, cards, info pages.
   Loaded after app.css on public (main layout) pages. Layout follows the
   approved homepage blueprint: trust strip → header with search →
   category panel + banner → trust row → category tiles → latest listings
   → makers → how it works → seller sign-up → footer.
   ===================================================================== */
:root {
    --page-width: 1320px;
    --radius: 10px;
    --shadow-hover: 0 6px 18px rgba(16, 24, 40, 0.10);
    --color-ink-deep: #0f2a20;
}

.container { max-width: var(--page-width); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* --- Trust strip --- */
.top-strip {
    background: var(--color-primary-dark);
    color: #dff3ea;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.75rem;
    padding: 0.4rem 1rem;
}
.top-strip span::before { content: "✓ "; color: #8fe0b9; font-weight: 700; }

/* --- Header --- */
.header-main {
    max-width: var(--page-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
}
.header-main .brand-mark { width: 44px; height: 44px; }

.header-search {
    flex: 1;
    display: flex;
    min-width: 0;
    border: 2px solid var(--color-primary);
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}
.header-search select {
    border: 0;
    border-right: 1px solid #cfe6db;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.75rem;
    max-width: 170px;
    cursor: pointer;
}
.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0.6rem 0.9rem;
    font: inherit;
    font-size: 0.95rem;
    outline: none;
}
.header-search button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 0 1.1rem;
    cursor: pointer;
}
.header-search button:hover { background: var(--color-primary-dark); }
.header-search:focus-within { box-shadow: 0 0 0 3px rgba(27, 110, 79, 0.18); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    flex-shrink: 0;
}
a.icon-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.icon-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.account-guest,
.account-menu summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
}
.account-menu { position: relative; }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-label { display: flex; flex-direction: column; line-height: 1.2; font-size: 0.82rem; max-width: 170px; }
.account-label strong { color: var(--color-primary); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-label small { color: var(--color-muted); font-size: 0.78rem; }
.account-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.14);
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    z-index: 120;
}
.account-panel a,
.account-panel .link-button {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    text-align: left;
    width: 100%;
}
.account-panel a:hover,
.account-panel .link-button:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.account-panel form { border-top: 1px solid var(--color-border); margin-top: 0.3rem; padding-top: 0.3rem; }

.header-nav { border-top: 1px solid var(--color-border); }
.header-nav-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 0 1rem;
}
.header-nav-inner > a:not(.btn) {
    padding: 0.7rem 0;
    color: #33423c;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.header-nav-inner > a:not(.btn):hover { color: var(--color-primary); }
.header-nav-inner > a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.header-nav-spacer { flex: 1; }
.switcher { display: inline-flex; gap: 0.55rem; font-size: 0.8rem; font-weight: 600; }
.switcher a { color: var(--color-muted); text-decoration: none; }
.switcher a.active { color: var(--color-primary); }
.switcher a:hover { color: var(--color-primary-dark); }
.switcher + .switcher { padding-left: 0.9rem; border-left: 1px solid var(--color-border); }
.sell-btn { white-space: nowrap; }

@media (max-width: 960px) {
    .header-main { flex-wrap: wrap; gap: 0.6rem 0.75rem; padding: 0.6rem 1rem; }
    .header-main .brand { margin-right: auto; }
    .header-main .brand-mark { width: 38px; height: 38px; }
    .header-main .brand-name { font-size: 1.2rem; }
    .header-search { order: 3; flex-basis: 100%; }
    .header-search select { max-width: 120px; }
    .header-search button span { display: none; }
    .account-label { display: none; }
    .nav-toggle { display: flex; margin-left: 0; }

    .header-nav { display: none; }
    .header-nav.open { display: block; }
    .header-nav-inner { flex-direction: column; align-items: stretch; gap: 0; padding: 0.4rem 1rem 0.9rem; }
    .header-nav-inner > a:not(.btn) { border-bottom: 1px solid var(--color-border); padding: 0.7rem 0; }
    .header-nav-inner > a.active { border-bottom-color: var(--color-border); }
    .header-nav-spacer { display: none; }
    .switcher { padding: 0.7rem 0; font-size: 0.9rem; gap: 1rem; }
    .switcher + .switcher { border-left: 0; padding-left: 0; border-top: 1px solid var(--color-border); }
    .sell-btn { margin-top: 0.6rem; text-align: center; }
}
@media (max-width: 560px) {
    .top-strip span:not(:first-child) { display: none; }
    .header-search select { display: none; }
}

/* --- Footer --- */
.site-footer {
    background: var(--color-ink-deep);
    color: #b9cfc5;
    margin-top: 3rem;
    padding: 2.5rem 1rem 1.25rem;
    font-size: 0.9rem;
}
.footer-cols {
    max-width: calc(var(--page-width) - 2rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
}
.footer-cols > div { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.footer-cols h2 { color: #fff; font-size: 0.95rem; margin: 0 0 0.3rem; }
.footer-cols a { color: #b9cfc5; text-decoration: none; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-about p { margin: 0.3rem 0 0; color: #9fbab0; max-width: 38ch; }
.footer-brand { align-self: flex-start; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tld { color: #8fe0b9; }
.footer-brand .brand-mark { width: 40px; height: 40px; background: #fff; border-radius: 50%; padding: 3px; }
.footer-about .footer-csr a { color: #fff; }
.footer-bottom {
    max-width: calc(var(--page-width) - 2rem);
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid #23463a;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: #86a397;
    font-size: 0.82rem;
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: #b9cfc5; }
@media (max-width: 760px) {
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer-about { grid-column: 1 / -1; }
}

/* --- Homepage: category panel + banner --- */
.home-hero {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.hero-categories {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.hero-categories h2 {
    margin: 0;
    padding: 0.7rem 1rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.hero-categories a {
    display: flex;
    justify-content: space-between;
    padding: 0.62rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
}
.hero-categories a span { color: #9aa3ad; }
.hero-categories a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.hero-categories .hero-categories-all { color: var(--color-primary); font-weight: 700; border-bottom: 0; margin-top: auto; }

.banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 320px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background:
        radial-gradient(circle at 85% 20%, rgba(143, 224, 185, 0.18), transparent 45%),
        linear-gradient(120deg, var(--color-primary-dark), var(--color-primary) 75%);
    color: #fff;
}
.banner-slides { display: grid; padding: 2.4rem 2.5rem 3rem; align-items: center; }
.banner-slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}
.banner-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.banner-kicker { color: #bfe9d4; font-size: 0.95rem; font-weight: 600; }
.banner-title { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; color: #fff; }
.banner-text { margin: 0; color: #d6efe3; max-width: 46ch; font-size: 1.02rem; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.banner-actions .btn { margin-top: 0; }
.banner-btn-outline { background: transparent; border: 1.5px solid #fff; color: #fff; }
.banner-btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

.banner-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 8px;
    padding: 1.25rem 1.25rem 1.25rem 0;
    min-height: 0;
}
.banner-collage img {
    width: 100%; height: 100%;
    min-height: 0;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    display: block;
}
.banner-collage-2 img { grid-row: span 2; }
.banner-collage-3 img:first-child { grid-row: span 2; }

.banner-dots { position: absolute; left: 2.5rem; bottom: 1.1rem; display: flex; gap: 6px; z-index: 2; }
.banner-dots button {
    width: 8px; height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}
.banner-dots button.is-active { width: 22px; background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .banner-slide, .banner-dots button, .category-tile { transition: none; }
}
@media (max-width: 1100px) {
    .banner { grid-template-columns: 1fr; }
    .banner-collage { display: none; }
}
@media (max-width: 860px) {
    .home-hero { grid-template-columns: 1fr; }
    .hero-categories {
        flex-direction: row;
        overflow-x: auto;
        background: none;
        border: 0;
        border-radius: 0;
        gap: 0.5rem;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }
    .hero-categories::-webkit-scrollbar { display: none; }
    .hero-categories h2 { display: none; }
    .hero-categories a {
        flex-shrink: 0;
        border: 1px solid var(--color-border);
        border-radius: 999px;
        background: #fff;
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
        font-weight: 600;
    }
    .hero-categories a span { display: none; }
    .hero-categories .hero-categories-all { order: -1; margin-top: 0; background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
    .banner { min-height: 0; }
    .banner-slides { padding: 1.5rem 1.25rem 2.6rem; }
    .banner-dots { left: 1.25rem; bottom: 0.9rem; }
}

/* --- Trust row --- */
.trust-row {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.trust-row > div { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.1rem; border-right: 1px solid var(--color-border); min-width: 0; }
.trust-row > div:last-child { border-right: 0; }
.trust-row strong { display: block; font-size: 0.93rem; }
.trust-row small { display: block; color: var(--color-muted); font-size: 0.8rem; line-height: 1.35; }
.trust-icon {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9rem;
}
@media (max-width: 900px) {
    .trust-row { grid-template-columns: 1fr 1fr; }
    .trust-row > div:nth-child(2) { border-right: 0; }
    .trust-row > div:nth-child(-n + 2) { border-bottom: 1px solid var(--color-border); }
}
@media (max-width: 460px) {
    .trust-row > div { padding: 0.7rem; gap: 0.55rem; }
    .trust-icon { width: 32px; height: 32px; font-size: 0.8rem; }
    .trust-row small { display: none; }
}

/* --- Section headings --- */
.home-section { margin-top: 2.25rem; }
.section-heading { gap: 1rem; }
.home-section > .section-heading { margin-top: 0; }
.section-heading h2 { font-weight: 800; letter-spacing: -0.01em; }
.section-heading > a { color: var(--color-accent-dark); font-weight: 700; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.section-heading > a:hover { text-decoration: underline; }

/* --- Category tiles --- */
.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
}
.category-tile {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.category-tile:hover { border-color: var(--color-primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.category-tile img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; display: block; background: #eef1f0; }
.category-tile strong { padding: 0.6rem 0.8rem 0; font-size: 0.95rem; }
.category-tile small { padding: 0 0.8rem 0.7rem; color: var(--color-muted); font-size: 0.8rem; }
@media (max-width: 560px) {
    .category-tiles { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}

/* --- Product card (shared by home, catalog, product and seller pages) --- */
.product-card { border-radius: var(--radius); }
.product-card:hover { box-shadow: var(--shadow-hover); }
.product-card-link { display: block; text-decoration: none; color: inherit; }
.product-card-media { position: relative; }
.product-card-media .item-type-badge { z-index: 2; }
.product-card-noimg {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: repeating-linear-gradient(135deg, #eef1f0 0 10px, #f6f8f7 10px 20px);
}
.product-card-body { display: flex; flex-direction: column; gap: 0.1rem; }
.product-card-seller {
    color: var(--color-muted);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-seller::after { content: " ✓"; color: var(--color-primary); font-weight: 800; }
.product-card-district { color: #8a939d; font-size: 0.72rem; }
.product-card .price { display: block; }
.product-card .price .hint { color: var(--color-muted); margin-left: 0.2rem; }
.product-card-share {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.95);
    color: #1877f2;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.product-card-share svg { width: 14px; height: 14px; }
.product-card-share:hover { background: #1877f2; color: #fff; border-color: #1877f2; }

/* --- Sellers --- */
.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}
.seller-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    min-width: 0;
}
.seller-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-hover); }
.seller-avatar {
    width: 56px; height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    background: var(--color-primary-light);
}
.seller-avatar-initial { display: grid; place-items: center; color: var(--color-primary); font-weight: 800; font-size: 1.3rem; }
.seller-card-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.seller-card-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-card-body small { color: var(--color-muted); font-size: 0.8rem; }
.verified-tag { color: var(--color-primary); font-size: 0.78rem; font-weight: 700; }
.verified-tag::before { content: "✓ "; }
.sellers-lede { margin: -0.3rem 0 1.25rem; }

/* --- How it works (homepage) --- */
.how-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.how-box {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.how-box h2 { margin: 0; font-size: 1.1rem; }
.how-box > a { color: var(--color-accent-dark); font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.how-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    counter-reset: step;
}
.how-steps li { display: flex; flex-direction: column; gap: 0.2rem; counter-increment: step; }
.how-steps li::before {
    content: counter(step);
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}
.how-steps strong { font-size: 0.95rem; }
.how-steps small { color: var(--color-muted); font-size: 0.82rem; line-height: 1.4; }
@media (max-width: 860px) {
    .how-row { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
    .how-steps { grid-template-columns: 1fr; gap: 0.7rem; }
}

/* --- Seller sign-up band --- */
.seller-cta {
    margin-top: 2.25rem;
    border-radius: 12px;
    background: linear-gradient(110deg, var(--color-accent-dark), var(--color-accent));
    color: #fff;
    padding: 1.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.seller-cta h2 { margin: 0 0 0.3rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.seller-cta p { margin: 0; color: #fff1e4; max-width: 60ch; }
.seller-cta-btn { background: #fff; color: var(--color-accent-dark); margin-top: 0; white-space: nowrap; font-weight: 800; }
.seller-cta-btn:hover { background: #fff6ee; }
@media (max-width: 700px) {
    .seller-cta { flex-direction: column; align-items: flex-start; padding: 1.3rem 1.25rem; }
}

/* --- Catalog heading, type tabs --- */
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.catalog-title { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.catalog-count { font-size: 0.85rem; font-weight: 500; color: var(--color-muted); margin-left: 0.5rem; letter-spacing: 0; }
.catalog-clear { color: var(--color-accent-dark); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.type-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.type-tabs a {
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}
.type-tabs a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.type-tabs a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* --- Catalog toolbar: type tabs | location pickers + sort, on one row --- */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}
.catalog-toolbar .type-tabs { margin-bottom: 0; }
.catalog-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

.sort-form select {
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.42rem 0.9rem;
    cursor: pointer;
}
.sort-form select:hover { border-color: var(--color-primary); }

/* Location pickers — a pill that opens a panel (a bottom sheet on phones). */
.loc-picker { position: relative; }
.loc-picker summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}
.loc-picker summary::-webkit-details-marker { display: none; }
.loc-picker summary:hover { border-color: var(--color-primary); }
.loc-picker summary > svg:first-child { color: var(--color-primary); }
.loc-picker.is-set summary { background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary-dark); }
.loc-picker-label { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.loc-picker-caret { color: var(--color-muted); transition: transform 0.15s ease; }
.loc-picker[open] .loc-picker-caret { transform: rotate(180deg); }

.loc-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 130;
    width: 300px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
    display: flex;
    flex-direction: column;
    max-height: min(420px, 70vh);
}
.loc-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}
.loc-close { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--color-muted); cursor: pointer; padding: 0 0.2rem; }
.loc-close:hover { color: var(--color-text); }
.loc-panel-body { overflow-y: auto; padding: 0.35rem; overscroll-behavior: contain; }
.loc-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: 7px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
}
.loc-option:hover { background: var(--color-primary-light); }
.loc-option.active { background: var(--color-primary); color: #fff; }
.loc-option.active .loc-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.loc-option-all { font-weight: 700; color: var(--color-primary); }
.loc-option.is-empty { color: #a3abb4; cursor: default; }
.loc-option.is-empty:hover { background: none; }
.loc-option.is-empty .loc-count { color: #b6bdc5; background: transparent; }
.loc-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-muted);
    background: var(--color-bg);
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    font-variant-numeric: tabular-nums;
}
.loc-group {
    display: block;
    padding: 0.7rem 0.65rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}
.loc-empty { margin: 0; padding: 0.6rem 0.65rem; color: var(--color-muted); font-size: 0.85rem; }

/* Category chips (the picture cards live on the homepage) */
.category-chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 0.9rem;
    scrollbar-width: thin;
}
.category-chips a {
    flex-shrink: 0;
    padding: 0.36rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--color-border);
    color: #33423c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.category-chips a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.category-chips a.active { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }

/* Removable filter chips */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 1rem; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.5rem 0.28rem 0.75rem;
    border-radius: 999px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid #bfe3d2;
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
}
.filter-chip span {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(27, 110, 79, 0.14);
    font-size: 0.9rem;
    line-height: 1;
}
.filter-chip:hover span { background: var(--color-primary); color: #fff; }
.filter-clear { color: var(--color-accent-dark); font-size: 0.83rem; font-weight: 700; text-decoration: none; margin-left: 0.25rem; }

@media (max-width: 760px) {
    .catalog-toolbar { flex-direction: column; align-items: stretch; }
    .catalog-toolbar .type-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .catalog-toolbar .type-tabs a { flex-shrink: 0; }
    .catalog-controls { gap: 0.4rem; }
    .sort-form { margin-left: auto; }
    .category-chips { scrollbar-width: none; }
    .category-chips::-webkit-scrollbar { display: none; }

    /* Location panel becomes a bottom sheet with a dimmed backdrop. */
    .loc-panel {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: 72vh;
        border-radius: 16px 16px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 140;
    }
    .loc-panel-head { padding: 0.95rem 1.1rem; font-size: 1rem; }
    .loc-option { padding: 0.7rem 0.8rem; font-size: 0.97rem; }
    body.loc-sheet-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 20, 0.45);
        z-index: 125;
    }
}

/* --- Information pages --- */
.page { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.75rem; }
.page-head { display: flex; flex-direction: column; gap: 0.6rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--color-border); }
.page h1 { margin: 0; font-size: 2rem; letter-spacing: -0.02em; text-wrap: balance; }
.page h2 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.page h3 { margin: 1.25rem 0 0.6rem; font-size: 1.05rem; }
.page p { margin: 0 0 0.7rem; max-width: 70ch; }
.page-head p { margin: 0; }
.page section { scroll-margin-top: 150px; }
.page a:not(.btn) { color: var(--color-primary); }
.page-lede { font-size: 1.08rem; color: #4a5560; max-width: 65ch; }
.page-meta { font-size: 0.85rem; color: var(--color-muted); }
.page-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page .page-jump a { padding: 0.35rem 0.85rem; border-radius: 999px; background: var(--color-primary-light); color: var(--color-primary-dark); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
.step-list { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; max-width: 70ch; }
.step-list li::marker { color: var(--color-accent-dark); font-weight: 800; }
.plain-list { margin: 0 0 0.7rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 70ch; }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.plan-table { min-width: 460px; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0 1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 0.85rem 0; }
.faq-item[open] summary { color: var(--color-primary-dark); }
.faq-item p { padding-bottom: 0.4rem; }
.contact-list { margin: 0; display: grid; gap: 0.75rem; }
.contact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 0.8rem 1rem; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); }
.contact-list dt { color: var(--color-muted); font-weight: 600; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }

/* --- Mobile bottom tab bar --- */
.mobile-tabbar { display: none; }
@media (max-width: 760px) {
    body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
    .mobile-tabbar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 110;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        background: #fff;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
        padding: 0.35rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
    }
    .mobile-tabbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--color-muted);
        text-decoration: none;
        position: relative;
    }
    .mobile-tabbar a.active { color: var(--color-primary); }
    .mobile-tabbar .icon-badge { top: -2px; right: calc(50% - 22px); }
    .site-footer { margin-top: 2rem; }
}
