/*
Theme Name: ChinoBarrio Portal
Theme URI: https://chinobarrio.com/
Author: WEIYOU
Author URI: https://chinobarrio.com/
Description: Lightweight portal theme for the ChinoBarrio merchant directory by WEIYOU.
Version: 0.1.6
Text Domain: chinobarrio-portal
*/

:root {
    --cbp-ink: #17201c;
    --cbp-muted: #667066;
    --cbp-line: #d9ded8;
    --cbp-bg: #f7f5ef;
    --cbp-panel: #ffffff;
    --cbp-accent: #b9212b;
    --cbp-accent-dark: #82161f;
    --cbp-gold: #c59a35;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--cbp-ink);
    background: var(--cbp-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.cbp-container {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
}

.cbp-site-header {
    position: sticky;
    z-index: 40;
    top: 0;
    border-bottom: 1px solid rgba(217, 222, 216, 0.86);
    background: rgba(247, 245, 239, 0.94);
    backdrop-filter: blur(12px);
}

.cbp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 70px;
}

.cbp-brand {
    display: grid;
    gap: 1px;
    color: var(--cbp-ink);
    text-decoration: none;
}

.cbp-brand strong {
    font-size: 22px;
    letter-spacing: 0;
}

.cbp-brand span {
    color: var(--cbp-muted);
    font-size: 13px;
}

.cbp-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--cbp-muted);
    font-size: 14px;
    font-weight: 700;
}

.cbp-nav a {
    text-decoration: none;
}

.cbp-nav a:hover {
    color: var(--cbp-accent);
}

.cbp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--cbp-accent);
    border-radius: 6px;
    padding: 0 18px;
    color: #fff;
    background: var(--cbp-accent);
    font-weight: 800;
    text-decoration: none;
}

.cbp-button-secondary {
    color: var(--cbp-accent-dark);
    background: #fff;
}

.cbp-hero {
    padding: 58px 0 34px;
    background: linear-gradient(180deg, #fffaf1 0%, #f7f5ef 100%);
    border-bottom: 1px solid var(--cbp-line);
}

.cbp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 28px;
    align-items: center;
}

.cbp-kicker {
    margin: 0 0 12px;
    color: var(--cbp-accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.cbp-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: 0;
}

.cbp-lead {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--cbp-muted);
    font-size: 19px;
}

.cbp-search-shell {
    max-width: 760px;
    margin-top: 28px;
}

.cbp-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.cbp-hero-stats span {
    min-height: 40px;
    border: 1px solid var(--cbp-line);
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--cbp-muted);
    background: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.cbp-hero-stats strong {
    color: var(--cbp-ink);
}

.cbp-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.cbp-quick-links a {
    border: 1px solid rgba(185, 33, 43, 0.22);
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--cbp-accent-dark);
    background: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.cbp-search-shell .chinobarrio-business-search {
    display: flex;
    gap: 10px;
    margin: 0;
}

.cbp-search-shell input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--cbp-line);
    border-radius: 6px;
    padding: 14px;
    font: inherit;
    background: #fff;
}

.cbp-search-shell button {
    min-height: 48px;
    border: 1px solid var(--cbp-accent);
    border-radius: 6px;
    padding: 0 18px;
    color: #fff;
    background: var(--cbp-accent);
    font-weight: 800;
}

.cbp-hero-panel {
    overflow: hidden;
    border: 1px solid var(--cbp-line);
    border-radius: 8px;
    background: var(--cbp-panel);
}

.cbp-hero-panel img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.cbp-hero-panel-content {
    padding: 16px;
}

.cbp-hero-panel h2 {
    margin: 0 0 6px;
    font-size: 20px;
    letter-spacing: 0;
}

.cbp-inline-link {
    display: inline-flex;
    margin-top: 8px;
    color: var(--cbp-accent-dark);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.cbp-section {
    padding: 38px 0;
}

.cbp-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.cbp-section-header h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0;
}

.cbp-section-header p {
    margin: 6px 0 0;
    color: var(--cbp-muted);
}

.cbp-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cbp-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 78px;
    border: 1px solid var(--cbp-line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    text-decoration: none;
}

.cbp-category strong {
    display: block;
    font-size: 16px;
}

.cbp-category span {
    color: var(--cbp-muted);
    font-size: 13px;
}

.cbp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 18px;
}

.cbp-guide-section {
    padding-top: 24px;
    background: #fff;
}

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

.cbp-guide-item {
    border: 1px solid var(--cbp-line);
    border-radius: 8px;
    padding: 18px;
    background: #fbfaf6;
}

.cbp-guide-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: 0;
}

.cbp-guide-item p {
    margin: 0;
    color: var(--cbp-muted);
    font-size: 14px;
}

.cbp-restaurant-section {
    background: #fdfcf8;
}

.cbp-restaurant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cbp-restaurant-card {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 14px;
    min-height: 154px;
    border: 1px solid var(--cbp-line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.cbp-restaurant-media {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    background: #ece7dc;
    color: var(--cbp-accent-dark);
    font-size: 36px;
    font-weight: 800;
    text-decoration: none;
}

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

.cbp-restaurant-card h3 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.cbp-restaurant-card h3 a {
    text-decoration: none;
}

.cbp-restaurant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.cbp-restaurant-actions a {
    min-height: 34px;
    border: 1px solid var(--cbp-line);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--cbp-accent-dark);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.cbp-restaurant-actions a:first-child {
    color: #fff;
    border-color: var(--cbp-accent);
    background: var(--cbp-accent);
}

.cbp-business-card {
    overflow: hidden;
    border: 1px solid var(--cbp-line);
    border-radius: 8px;
    background: #fff;
}

.cbp-business-card > a {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: #ece7dc;
    text-decoration: none;
}

.cbp-business-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cbp-card-body {
    padding: 15px;
}

.cbp-card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: 0;
}

.cbp-card-body h3 a {
    text-decoration: none;
}

.cbp-chip {
    margin: 0 0 8px;
    color: var(--cbp-accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.cbp-muted {
    margin: 0 0 8px;
    color: var(--cbp-muted);
    font-size: 14px;
}

.cbp-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cbp-card-actions a {
    flex: 1 1 calc(50% - 8px);
    min-height: 38px;
    border-radius: 6px;
    padding: 9px 10px;
    color: #fff;
    background: var(--cbp-accent);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.cbp-card-actions a:last-child {
    color: var(--cbp-accent-dark);
    background: #fff;
    border: 1px solid var(--cbp-line);
}

.cbp-card-meta {
    margin: 8px 0 0;
    color: #8a6a16;
    font-size: 13px;
    font-weight: 800;
}

.cbp-seo-band {
    border-top: 1px solid var(--cbp-line);
    border-bottom: 1px solid var(--cbp-line);
    background: #fff;
}

.cbp-seo-copy {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(280px, 0.25fr);
    gap: 26px;
    padding: 34px 0;
}

.cbp-seo-copy h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.cbp-seo-copy p {
    margin: 0 0 12px;
    color: var(--cbp-muted);
}

.cbp-ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    border: 1px dashed #c7bda7;
    border-radius: 8px;
    color: #8a7c62;
    background: #fbf8f0;
    font-size: 13px;
    text-align: center;
}

.cbp-page-main {
    padding: 40px 0 60px;
}

.cbp-content {
    max-width: 820px;
}

.cbp-site-footer {
    padding: 30px 0;
    border-top: 1px solid var(--cbp-line);
    color: var(--cbp-muted);
    background: #fff;
}

.cbp-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

@media (max-width: 760px) {
    .cbp-header-inner,
    .cbp-footer-inner,
    .cbp-section-header,
    .cbp-hero-grid,
    .cbp-seo-copy,
    .cbp-guide-grid,
    .cbp-restaurant-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cbp-restaurant-card {
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 112px;
    }

    .cbp-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .cbp-hero {
        padding-top: 34px;
    }

    .cbp-search-shell .chinobarrio-business-search {
        display: grid;
    }

    .cbp-hero-stats {
        display: grid;
    }
}
