/* =====================================================================
   Pinakabarato sa Cabadbaran — Shared theme
   "Local Market" palette: refined emerald + warm paper neutrals + ink.
   Minimal, professional, community-first (goods, food, homes, services).

   Single source of truth for tokens, typography and the button system.
   Loaded by main_layout.php and auth_layout.php.
   ===================================================================== */

:root {
    /* ── Brand (green — matches the Figma designs) ───────────────── */
    --pb-primary:      #16A34A;   /* primary action / accent   */
    --pb-primary-h:    #15803D;   /* hover                     */
    --pb-primary-soft: #EAF7EF;   /* soft green tint           */

    /* ── Neutrals ────────────────────────────────────────────────── */
    --pb-ink:     #16191C;        /* headings / strong text    */
    --pb-body:    #474D54;        /* body text                 */
    --pb-muted:   #8A9198;        /* muted / tertiary          */
    --pb-bg:      #FAFAF8;        /* page background (warm)     */
    --pb-surface: #FFFFFF;        /* cards / surfaces          */
    --pb-border:  #EAEBE6;        /* hairline border           */
    --pb-dark:    #101312;        /* footer                    */

    /* ── Radius (crisp, not pill) ────────────────────────────────── */
    --pb-radius-sm: 8px;
    --pb-radius:    12px;
    --pb-radius-lg: 16px;

    /* ── Focus ring ──────────────────────────────────────────────── */
    --pb-ring: 0 0 0 3px rgba(22,163,74,0.26);

    /* ── Fonts ───────────────────────────────────────────────────── */
    --pb-font:         'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --pb-font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Base typography ──────────────────────────────────────────────── */
body {
    font-family: var(--pb-font);
    background-color: var(--pb-bg);
    color: var(--pb-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
    /* This is a light UI — render native controls (select popups, etc.) in
       light mode so options don't get recoloured on dark-mode devices. */
    color-scheme: light;
}
h1, h2, h3, h4, h5, .pb-display {
    font-family: var(--pb-font-display);
    letter-spacing: -0.021em;
    color: var(--pb-ink);
}

/* Small uppercase section label */
.pb-eyebrow {
    font-family: var(--pb-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pb-primary);
}

/* =====================================================================
   Button system  (single source; class names kept for compatibility —
   .pb-btn-orange is the SOLID primary and is now emerald, not orange).
   ===================================================================== */
.pb-btn-orange,
.pb-btn-ghost,
.pb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--pb-radius-sm);
    font-family: var(--pb-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, border-color 0.16s ease,
                color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}

/* Larger variant for hero / primary page CTAs */
.pb-btn-lg { padding: 13px 26px; font-size: 15px; }

/* Solid primary (emerald) */
.pb-btn-orange {
    background: var(--pb-primary);
    color: #fff !important;
}
.pb-btn-orange:hover {
    background: var(--pb-primary-h);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16,121,90,0.20);
}
.pb-btn-orange:active { transform: translateY(0); box-shadow: none; }

/* Outline / ghost */
.pb-btn-ghost {
    background: var(--pb-surface);
    color: var(--pb-ink) !important;
    border-color: var(--pb-border);
}
.pb-btn-ghost:hover {
    border-color: var(--pb-primary);
    color: var(--pb-primary) !important;
}

/* Shared visible keyboard focus */
.pb-btn-orange:focus-visible,
.pb-btn-ghost:focus-visible,
.pb-btn-primary:focus-visible {
    outline: none;
    box-shadow: var(--pb-ring);
}

/* Disabled */
.pb-btn-orange[disabled],
.pb-btn-ghost[disabled],
.pb-btn-primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Neutral placeholder for listings with no photo (replaces the old emoji fallback) */
.pb-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #c2ccc2;
    font-size: 34px;
}
