:root {
    --bg: #f5f6f7;
    --surface: #ffffff;
    --surface-soft: #f8f9fa;
    --ink: #101214;
    --muted: #5f6770;
    --line: #e6e8eb;
    --line-strong: #d4d9de;
    --brand: #0f1113;
    --accent: #1f9d55;
    --accent-ink: #0f6c37;
    --shadow: 0 12px 30px rgba(16, 18, 20, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Public Sans", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink);
    font-family: "Archivo", sans-serif;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
    color: var(--muted);
}

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

.bg-layer,
.mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.bg-layer {
    z-index: -3;
    background:
        radial-gradient(circle at 88% 12%, rgba(31, 157, 85, 0.14), transparent 36%),
        radial-gradient(circle at 8% 76%, rgba(16, 18, 20, 0.08), transparent 40%),
        linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
}

.mesh-a,
.mesh-b {
    z-index: -2;
    opacity: 0.45;
    filter: blur(60px);
}

.mesh-a {
    background: radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.95), transparent 55%);
}

.mesh-b {
    background: radial-gradient(circle at 82% 86%, rgba(31, 157, 85, 0.22), transparent 52%);
}

.topbar {
    width: min(1600px, calc(100% - 3rem));
    margin: 1rem auto 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 14px rgba(16, 18, 20, 0.05);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0.8rem;
    z-index: 50;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-logo {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.15;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.15;
}

.brand-name {
    font-size: 0.92rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink);
}

.nav-beta {
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
    font-weight: 700;
    text-transform: uppercase;
    transform: translateY(-0.35em);
    -webkit-transform: translateY(-0.35em);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.main-nav a {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.48rem 0.72rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.18s ease;
}

.main-nav a:hover {
    color: var(--ink);
    border-color: var(--line);
    background: var(--surface-soft);
}

.main-nav a.is-active {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--surface-soft);
}

.nav-mobile-sep {
    display: none;
    height: 1px;
    background: var(--line);
    margin: 0.3rem 0.5rem;
}

.nav-mobile-logout {
    display: none;
    color: #dc2626 !important;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-cta {
    border: 1px solid var(--brand);
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    padding: 0.52rem 0.84rem;
    font-size: 0.83rem;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-wrap {
    width: min(1600px, calc(100% - 3rem));
    margin: 1.1rem auto 2.1rem;
    display: grid;
    gap: 1rem;
}

.hero {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
    gap: 1.1rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-ink);
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.hero h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
    max-width: 16ch;
    margin-bottom: 0.7rem;
}

.hero p {
    max-width: 58ch;
    font-size: 1rem;
}

.spotlight-card,
.card,
.merchant-hero,
.footer,
.filter-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.spotlight-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-block {
    padding: 0.2rem 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.section-head h1,
.section-head h2 {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-head a {
    color: var(--brand);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 0.08rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.filter-panel {
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.filter-panel label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 0.62rem 0.68rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(16, 18, 20, 0.1);
}

.filter-panel .actions {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
}

.location-controls {
    display: grid;
    align-content: flex-start;
    gap: 0.35rem;
}

.location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.location-actions .btn-ghost {
    padding: 0.45rem 0.64rem;
    font-size: 0.78rem;
}

.location-status {
    margin: 0;
}

.location-status.error {
    color: #b42318;
}

.btn-primary,
.btn-ghost {
    border-radius: 10px;
    padding: 0.62rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 700;
}

.btn-primary {
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}

.btn-ghost {
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
}

.card-grid {
    display: grid;
    gap: 0.82rem;
}

.list-stack {
    display: grid;
    gap: 0.72rem;
}

.result-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(16, 18, 20, 0.06);
    padding: 0.72rem;
}

.result-media {
    height: 160px;
    min-height: 160px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.result-media.no-image {
    background-image: linear-gradient(145deg, #eff2f6, #dde3e9);
}

.result-media--placeholder {
    background-image: url('/images/logo.png'), linear-gradient(145deg, #1a1d24, #272c38) !important;
    background-size: 80px auto, cover !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center, center !important;
}

.result-content {
    display: grid;
    align-content: flex-start;
    gap: 0.58rem;
}

.result-content h3 {
    font-size: 1.08rem;
    line-height: 1.2;
}

.result-content p {
    font-size: 0.9rem;
}

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

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

.card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.media {
    height: 192px;
    min-height: 192px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.media--placeholder {
    background-image: url('/images/logo.png'), linear-gradient(145deg, #1a1d24, #272c38) !important;
    background-size: 90px auto, cover !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center, center !important;
}

.card-body {
    padding: 0.86rem;
    display: grid;
    gap: 0.56rem;
}

.card-body h3 {
    font-size: 1.08rem;
    line-height: 1.2;
}

.card-body p {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-content .card-desc {
    -webkit-line-clamp: 3;
}

.card-readmore {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d8dee4;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    color: #1f2429;
    background: #f5f7f9;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}

.pill.alt {
    border-color: rgba(31, 157, 85, 0.32);
    color: var(--accent-ink);
    background: rgba(31, 157, 85, 0.08);
}

.score {
    color: var(--accent-ink);
    font-size: 0.75rem;
    font-weight: 700;
}

.muted {
    color: var(--muted);
    font-size: 0.81rem;
}

.link-cta {
    color: var(--brand);
    border-bottom: 1px solid var(--line-strong);
    font-size: 0.84rem;
    font-weight: 700;
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 999px;
    color: var(--ink);
    padding: 0.38rem 0.62rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.empty-state {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--muted);
    padding: 1rem;
    text-align: center;
}

.merchant-hero {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.merchant-hero .media {
    height: 300px;
    min-height: 300px;
    flex-shrink: 0;
}

.merchant-hero-content {
    padding: 1.15rem;
    display: grid;
    gap: 0.68rem;
}

.merchant-hero-content h1 {
    font-size: clamp(1.7rem, 2.4vw, 2.55rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Site footer ─────────────────────────────────────────────────── */
/* Border, background and shadow come from the shared surface rule above;
   the 780px media query further down matches its width to .page-wrap. */
.footer {
    width: min(1600px, calc(100% - 3rem));
    margin: 0 auto 2rem;
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem 1.05rem;
    font-size: 0.85rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1.6rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--line);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.62rem;
}

.footer-brand-top {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.footer-logo {
    height: 30px;
    width: auto;
}

.footer-brand-name {
    font-family: "Archivo", sans-serif;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.footer-brand-name small {
    display: block;
    font-family: "Public Sans", sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0;
    color: var(--muted);
}

.footer-brand p {
    font-size: 0.83rem;
    max-width: 36ch;
}

.footer-social {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin: 0.15rem 0 0;
    padding: 0;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--muted);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
    color: var(--accent-ink);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.footer-col h3 {
    font-family: "Public Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 0.62rem;
}

.footer-col ul {
    list-style: none;
    display: grid;
    gap: 0.42rem;
    margin: 0;
    padding: 0;
}

.footer-col a {
    color: var(--muted);
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--ink);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 1rem;
    padding-top: 0.95rem;
    /* Keeps the last row clear of the fixed cart FAB (56px + 28px offset). */
    padding-right: 4.75rem;
}

.footer-copy {
    font-size: 0.78rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.05rem;
}

.footer-legal a {
    font-size: 0.78rem;
    color: var(--muted);
    transition: color 0.15s ease;
}

.footer-legal a:hover {
    color: var(--ink);
}

@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .footer-bottom {
        justify-content: flex-start;
        /* Too narrow for a side gutter — drop the FAB below the links instead. */
        padding-right: 0;
        padding-bottom: 3.4rem;
    }
}

.profile-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
    box-shadow: var(--shadow);
    padding: 1.1rem;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0.9rem;
}

.profile-tier-row {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.progress-wrap {
    margin-top: 0.8rem;
}

.progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.35rem;
}

.progress-head strong {
    font-size: 0.92rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e9edf1;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1f9d55, #35b769);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
}

.kpi-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(16, 18, 20, 0.05);
    padding: 0.8rem;
    display: grid;
    gap: 0.28rem;
}

.kpi-card strong {
    font-family: "Archivo", sans-serif;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.kpi-card small {
    font-size: 0.78rem;
}

.activity-stack {
    display: grid;
    gap: 0.6rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(16, 18, 20, 0.05);
    padding: 0.72rem;
}

.activity-item h3 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.activity-item p {
    font-size: 0.88rem;
}

.activity-meta {
    text-align: right;
    display: grid;
    gap: 0.2rem;
}

.activity-meta strong {
    font-size: 0.95rem;
    color: var(--accent-ink);
}

.profile-recommendations {
    margin-top: 0.7rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

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

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

    .result-row {
        grid-template-columns: 180px minmax(0, 1fr);
    }

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

@media (max-width: 780px) {
    .topbar {
        width: calc(100% - 1.2rem);
        padding: 0.58rem 0.65rem;
    }

    .page-wrap,
    .footer {
        width: calc(100% - 1.2rem);
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 0.45rem);
        margin-left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        text-align: center;
    }

    .nav-mobile-sep { display: block; }
    .nav-mobile-logout { display: flex; align-items: center; gap: 6px; }

    .topbar-actions {
        display: none;
    }

    .card-grid.two,
    .card-grid.three,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .result-row {
        grid-template-columns: 1fr;
    }

    .result-media {
        min-height: 165px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .activity-item {
        flex-direction: column;
    }

    .activity-meta {
        text-align: left;
    }

    .filter-panel .actions {
        align-items: center;
    }

    .hero h1 {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Account Settings ─────────────────────────────────────── */
.account-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.account-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow);
}

.account-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.account-form {
    margin-top: 1rem;
}

.account-form label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.form-row input {
    flex: 1;
    min-width: 0;
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"],
.account-form input[type="number"],
.account-form select {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface-soft);
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s;
}

.account-form input:focus {
    border-color: var(--accent);
}

.account-form select:focus {
    border-color: var(--accent);
}

.account-msg {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.top-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    border-radius: 6px;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
}

.top-logout:hover {
    color: var(--ink);
    background: var(--line);
}

.wallet-balance-stack,
.wallet-coupon-stack,
.wallet-payment-stack {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.wallet-balance-row,
.wallet-coupon-row,
.wallet-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.62rem 0.72rem;
    background: var(--surface-soft);
}

.wallet-badge-grid {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.wallet-badge-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.55rem;
    background: var(--surface-soft);
}

.wallet-badge-item img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    background: #fff;
}

.wallet-badge-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    border: 1px dashed var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--muted);
    background: #fff;
}

.wallet-coupon-meta {
    display: grid;
    gap: 0.2rem;
    justify-items: end;
}

.wallet-payment-actions {
    margin-top: 0.85rem;
}

.wallet-payment-actions-inline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.wallet-card-setup {
    margin-top: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.72rem;
    background: var(--surface-soft);
    display: grid;
    gap: 0.55rem;
}

.wallet-card-setup label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.stripe-card-element {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 0.64rem 0.7rem;
}

.wallet-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-checkbox-row span {
    font-size: 0.82rem;
    color: var(--muted);
}

.wallet-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 780px) {
    .wallet-balance-row,
    .wallet-coupon-row,
    .wallet-payment-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .wallet-coupon-meta {
        justify-items: start;
    }

    .wallet-payment-actions-inline,
    .wallet-card-actions {
        width: 100%;
    }
}

/* ── Tab navigation ──────────────────────────────────────────────── */
.vl-tabs { margin-top: 0; }

.vl-tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    padding: 0 0 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.vl-tab-nav::-webkit-scrollbar { display: none; }

.vl-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.vl-tab-btn:hover { color: var(--ink); }
.vl-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.vl-tab-pane { display: none; padding: 28px 0; }
.vl-tab-pane.active { display: block; }

/* ── Menu tab ────────────────────────────────────────────────────── */
.menu-category { margin-bottom: 36px; }

.menu-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.menu-item-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: box-shadow 0.18s, border-color 0.18s;
}
.menu-item-card.bp-detail-card { cursor: pointer; }
.menu-item-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }

.menu-item-img {
    height: 160px;
    background-size: cover;
    background-position: center;
}
.menu-item-img--placeholder {
    background: var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-item-img--placeholder::after {
    content: '🍽';
    font-size: 2rem;
    opacity: 0.4;
}

.menu-item-body { padding: 14px 16px; }

.menu-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.menu-item-name { font-weight: 600; font-size: 0.95rem; flex: 1; }

.menu-item-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.menu-item-badge--veg    { background: #d1fae5; color: #065f46; }
.menu-item-badge--vegan  { background: #bbf7d0; color: #14532d; }
.menu-item-badge--halal  { background: #dbeafe; color: #1e40af; }
.menu-item-badge--unavailable { background: #fee2e2; color: #991b1b; }

.menu-item-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 10px;
}

.menu-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

/* ── Business hours grid ─────────────────────────────────────────── */
.business-hours {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 28px;
    max-width: 480px;
}
.business-hours h3 { font-size: 1rem; margin-bottom: 14px; }

.hours-grid { display: flex; flex-direction: column; gap: 6px; }

.hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--line);
}
.hours-row:last-child { border-bottom: none; }
.hours-row--closed .hours-time { color: #dc2626; }

.hours-day { font-weight: 600; color: var(--ink); }
.hours-time { color: var(--muted); }

/* ── Booking form ────────────────────────────────────────────────── */
.booking-form-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 560px;
}
.booking-form-wrap h3 { font-size: 1.1rem; margin-bottom: 20px; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group select,
.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.15s;
    width: 100%;
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 80px; }

@media (max-width: 640px) {
    .menu-items-grid { grid-template-columns: 1fr; }
    .menu-item-card { display: flex; flex-direction: row; align-items: stretch; }
    .menu-item-img {
        width: 90px;
        min-width: 90px;
        height: auto;
        min-height: 90px;
        flex-shrink: 0;
        border-radius: 0;
    }
    .menu-item-body { flex: 1; min-width: 0; padding: 10px 12px; }
    .booking-form-wrap { padding: 20px 18px; }
    .business-hours { padding: 16px 18px; }
    .vl-tab-btn { padding: 10px 14px; font-size: 0.84rem; }
}

/* ═══════════════════════════════════════════════════════════════
   Services tab — category filter, service cards, booking panel
   ═══════════════════════════════════════════════════════════════ */

/* ── Compact hours bar ──────────────────────────────────────────── */
.hours-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.hours-bar-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.76rem;
    min-width: 58px;
    text-align: center;
    gap: 3px;
}
.hours-bar-chip .hbc-day  { font-weight: 700; color: var(--ink); }
.hours-bar-chip .hbc-time { color: var(--muted); }
.hours-bar-chip--closed .hbc-time { color: #dc2626; font-weight: 600; }

/* ── Service category filter pills ──────────────────────────────── */
.svc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.svc-filter-btn {
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.svc-filter-btn:hover { color: var(--ink); border-color: var(--ink); }
.svc-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Service cards grid ─────────────────────────────────────────── */
.svc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.svc-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}
.svc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.svc-card.is-hidden { display: none; }
.svc-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }

.svc-card-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--line);
    position: relative;
    flex-shrink: 0;
}
.svc-card-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--line) 0%, color-mix(in srgb, var(--accent) 12%, var(--line)) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    flex-shrink: 0;
}

.svc-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.svc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: space-between;
}
.svc-name  { font-weight: 700; font-size: 0.97rem; color: var(--ink); flex: 1; line-height: 1.3; }
.svc-duration-badge {
    background: var(--line);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.svc-cat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.svc-desc {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.5;
    flex: 1;
}

.svc-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.svc-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
}
.svc-book-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.svc-book-btn:hover { opacity: 0.85; }

/* ── Booking panel (sidebar) — see bp-* section below ─────────────────── */
@keyframes panel-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.booking-contact { margin-top: 4px; }

.svc-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .svc-cards-grid    { grid-template-columns: 1fr; }
    .form-row          { grid-template-columns: 1fr; }
    .booking-panel     { padding: 20px 18px; }
    .hours-bar-chip    { min-width: 48px; padding: 6px 10px; }
}

/* ── Cart nav button & badge ────────────────────────────────────────────────── */
.cart-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s;
}
.cart-nav-btn:hover { background: var(--surface-soft); }
.cart-count-badge {
    position: absolute;
    top: 0; right: 0;
    transform: translate(40%, -40%);
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 99px;
    padding: 0 4px;
}

/* ── Menu: Add to Cart button ────────────────────────────────────────────────── */
.menu-add-to-cart-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.menu-add-to-cart-btn:hover  { background: var(--accent-ink); }
.menu-add-to-cart-btn:disabled { opacity: 0.6; cursor: default; }

/* ── Cart page ───────────────────────────────────────────────────────────────── */
.cart-page { padding: 40px 20px 80px; }
.cart-page-inner { max-width: 1060px; margin: 0 auto; }
.cart-page-title { font-size: 2rem; font-weight: 800; margin-bottom: 28px; }
.cart-alert { padding: 12px 18px; border-radius: var(--radius-md); margin-bottom: 20px; }
.cart-alert--error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.cart-empty {
    display: flex; flex-direction: column; align-items: center;
    gap: 16px; padding: 80px 20px; color: var(--muted); text-align: center;
}
.cart-empty svg { opacity: 0.3; }
.cart-empty p { font-size: 1.1rem; }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Items column */
.cart-merchant-label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.9rem; font-weight: 600; color: var(--muted);
    margin-bottom: 16px;
}
.cart-clear-btn {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 0.8rem; text-decoration: underline; padding: 0;
}
.cart-clear-btn:hover { color: #dc2626; }

.cart-items-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px;
}
.cart-item-img { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--surface-soft); flex-shrink: 0; }
.cart-item-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.cart-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-meta { font-size: 0.78rem; color: var(--muted); }
.cart-item-type-badge { display: inline-block; font-size: 0.68rem; font-weight: 600; background: #ede9fe; color: #6d28d9; border-radius: 99px; padding: 2px 8px; width: fit-content; }
.cart-item-type-badge--menu { background: #dcfce7; color: #166534; }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-qty-ctrl { display: flex; align-items: center; gap: 8px; }
.cart-qty-btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--surface); font-size: 1rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.cart-qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-qty-val { min-width: 20px; text-align: center; font-weight: 600; }
.cart-item-price { font-weight: 700; font-size: 0.95rem; }
.cart-remove-btn {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 0.85rem; padding: 2px 6px; border-radius: 6px;
}
.cart-remove-btn:hover { background: #fee2e2; color: #dc2626; }

/* Checkout column */
.cart-summary-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: sticky;
    top: 80px;
}
.cart-summary-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.cart-summary-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.cart-summary-divider { border-top: 1px solid var(--line); margin: 6px 0; }
.cart-summary-total { font-size: 1rem; }
.cart-wallet-offer {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-bottom: 0;
}
.cart-wallet-offer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}
.cart-points-offer {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-bottom: 0;
}
.cart-points-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 6px;
}
.cart-points-icon { color: #16a34a; display: flex; align-items: center; }
.cart-points-title { color: var(--muted); }
.cart-points-balance {
    font-size: 0.9rem;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 4px;
}
.cart-points-worth {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 4px;
}
.cart-points-slider-wrap { margin-top: 4px; }
.cart-points-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 2px;
}
.checkout-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 20px 0 12px; }
.stripe-mock-card { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.stripe-mock-badge { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.stripe-input { background: var(--surface); }
.stripe-mock-note { font-size: 0.72rem; color: var(--muted); margin-top: 8px; }
.checkout-submit-btn { width: 100%; margin-top: 4px; font-size: 1rem; padding: 14px; }

/* ── Cart success page ────────────────────────────────────────────────────────── */
.cart-success-page { padding: 60px 20px 100px; }
.cart-success-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.cart-success-icon { color: var(--accent); margin-bottom: 20px; }
.cart-success-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.cart-success-sub { font-size: 1.05rem; color: var(--muted); margin-bottom: 20px; }
.cart-success-ref { font-size: 0.85rem; color: var(--muted); margin-bottom: 28px; }
.cart-success-ref code { background: var(--surface-soft); padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; }
.cart-success-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; text-align: left; }
.cart-success-item { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.cart-success-item-icon { font-size: 1.6rem; }
.cart-success-item strong { font-weight: 700; display: block; margin-bottom: 4px; }
.cart-success-item p { font-size: 0.87rem; color: var(--muted); margin: 0; }
.cart-success-total { font-size: 1.1rem; margin-bottom: 28px; }
.cart-success-breakdown { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: 28px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.cart-success-breakdown-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.cart-success-breakdown-total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 1rem; }
.cart-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Orders page ─────────────────────────────────────────────────────────────── */
.orders-page { padding: 40px 20px 80px; }
.orders-page-inner { max-width: 860px; margin: 0 auto; }
.orders-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.orders-page-title { font-size: 1.8rem; font-weight: 800; margin: 6px 0 0; }
.orders-back-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.orders-back-link:hover { color: var(--ink); }

.orders-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.orders-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: 0.88rem; font-weight: 600; text-decoration: none;
    color: var(--muted); background: transparent;
    border: 2px solid transparent; border-bottom: none;
    margin-bottom: -2px; transition: color 0.15s, background 0.15s;
}
.orders-tab:hover { color: var(--ink); background: var(--surface); }
.orders-tab--active { color: var(--ink); background: var(--bg); border-color: var(--line); border-bottom-color: var(--bg); }
.orders-tab-count { background: var(--brand); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }

.orders-full-list { margin-top: 4px; }

.ohc-type-badge { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.ohc-type-badge--appointment { background: #ede9fe; color: #5b21b6; }
.ohc-type-badge--food { background: #fef3c7; color: #92400e; }

/* ── Order history ────────────────────────────────────────────────────────────── */
.order-history-group-title { font-size: 1rem; font-weight: 700; color: var(--muted); margin: 24px 0 12px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
.order-history-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.order-history-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
}
.ohc-icon { font-size: 1.4rem; text-align: center; }
.ohc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ohc-title { font-weight: 600; font-size: 0.95rem; }
.ohc-meta { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ohc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ohc-price { font-weight: 700; font-size: 0.95rem; }
.ohc-status { font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; text-transform: capitalize; }
/* fulfillment states */
.ohc-status--order-placed   { background: #f1f5f9; color: #475569; }
.ohc-status--confirmed      { background: #dcfce7; color: #166534; }
.ohc-status--preparing      { background: #fef3c7; color: #92400e; }
.ohc-status--ready          { background: #d1fae5; color: #065f46; }
.ohc-status--picked-up      { background: #dbeafe; color: #1e40af; }
.ohc-status--out-for-delivery { background: #dbeafe; color: #1e40af; }
.ohc-status--arrived        { background: #dbeafe; color: #1e40af; }
.ohc-status--delivered      { background: #dcfce7; color: #166534; }
.ohc-status--cancelled,.ohc-status--canceled { background: #fee2e2; color: #991b1b; }
/* billing fallback states */
.ohc-status--billed         { background: #ede9fe; color: #5b21b6; }
.ohc-status--paid           { background: #dcfce7; color: #166534; }
.ohc-status--payment-due    { background: #fff7ed; color: #9a3412; }
/* appointment states */
.ohc-status--pending        { background: #fef3c7; color: #92400e; }
.ohc-status--accepted       { background: #dcfce7; color: #166534; }
.ohc-status--completed      { background: #dcfce7; color: #166534; }
.ohc-status--rejected       { background: #fee2e2; color: #991b1b; }

@media (max-width: 720px) {
    .cart-layout          { grid-template-columns: 1fr; }
    .cart-summary-card    { position: static; }
    .cart-item            { grid-template-columns: 50px 1fr auto; }
    .order-history-card   { grid-template-columns: 36px 1fr auto; }
}

/* ── Floating cart button ────────────────────────────────────────────────────── */
.cart-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
    text-decoration: none;
    transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
}
.cart-fab:hover {
    background: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0,0,0,0.28);
}
.cart-fab--has-items { background: var(--accent); }
.cart-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: var(--accent-ink);
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 99px;
    padding: 0 5px;
    border: 2px solid var(--accent);
}

/* ── Checkout session hints ──────────────────────────────────────────────────── */
.checkout-session-warning,
.checkout-session-ok {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; margin-top: 10px; text-align: center; justify-content: center;
}
.checkout-session-warning { color: #b45309; }
.checkout-session-ok      { color: #16a34a; }

/* ── Checkout modal ──────────────────────────────────────────────────────────── */
body.co-modal-open { overflow: hidden; }

.co-modal[hidden] { display: none; }
.co-modal {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.co-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    opacity: 0; transition: opacity 0.25s;
}
.co-modal--visible .co-backdrop { opacity: 1; }

.co-dialog {
    position: relative; z-index: 1;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 36px 32px 32px;
    width: 100%; max-width: 460px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    opacity: 0; transform: translateY(20px) scale(0.97);
    transition: opacity 0.25s, transform 0.25s;
}
.co-modal--visible .co-dialog { opacity: 1; transform: none; }

.co-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; line-height: 1; color: var(--muted);
    padding: 4px 8px; border-radius: var(--radius-md);
    transition: background 0.15s, color 0.15s;
}
.co-close:hover { background: var(--surface); color: var(--ink); }

/* Steps */
.co-step-icon { font-size: 2.2rem; text-align: center; margin-bottom: 12px; }
.co-step-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; text-align: center; }
.co-step-sub { font-size: 0.85rem; color: var(--muted); text-align: center; margin-bottom: 28px; }

/* Auth buttons */
.co-auth-btns { display: flex; flex-direction: column; gap: 12px; }
.co-signin-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 20px; border-radius: var(--radius-md); font-size: 0.95rem;
}
.co-guest-btn { padding: 13px 20px; font-size: 0.95rem; }

/* Logged-in user badge */
.co-user-badge {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 20px;
}
.co-user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.co-user-info { flex: 1; min-width: 0; }
.co-user-info strong { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-user-info span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.co-user-pill {
    font-size: 0.68rem; font-weight: 700; padding: 3px 9px;
    background: #dcfce7; color: #166534; border-radius: 99px; white-space: nowrap;
}

/* Readonly fields */
.co-readonly-field { background: var(--surface-soft); color: var(--muted); cursor: default; }

.co-optional { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.co-back-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none; cursor: pointer;
    font-size: 0.82rem; color: var(--muted); padding: 0; margin-bottom: 14px;
    transition: color 0.15s;
}
.co-back-btn:hover { color: var(--ink); }

.co-switch-account { font-size: 0.78rem; color: var(--muted); }
.co-switch-account:hover { color: var(--ink); }

/* ── Order type picker in checkout ───────────────────────────────────────── */
.co-ot-picker { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.co-ot-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 99px;
    border: 2px solid var(--line); background: var(--surface);
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap; color: var(--ink);
}
.co-ot-btn:hover { border-color: var(--accent); }
.co-ot-btn--active { border-color: var(--accent); background: #f0fdf4; color: var(--accent-ink); }
.co-ot-icon { font-size: 1rem; line-height: 1; }

/* ── Saved-card selector in checkout ─────────────────────────────────────── */
.co-card-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.co-card-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-md);
    border: 2px solid var(--line); background: var(--surface);
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.co-card-option:hover { border-color: var(--accent); }
.co-card-option:has(input:checked) { border-color: var(--accent); background: #f0fdf4; }
.co-card-option input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.co-card-info { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink); flex: 1; }
.co-card-brand { font-weight: 700; text-transform: capitalize; }
.co-card-last4 { font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.co-card-exp { color: var(--muted); font-size: 0.78rem; }
.co-card-default-badge {
    font-size: 0.65rem; font-weight: 700; padding: 2px 8px;
    background: #dcfce7; color: #166534; border-radius: 99px; white-space: nowrap;
}

/* ── Wallet credit panel ─────────────────────────────────────────────────── */
.co-wallet-panel {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}
.co-wallet-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--ink);
}
.co-wallet-info svg { color: var(--accent); flex-shrink: 0; }
.co-wallet-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}
.co-wallet-toggle input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.co-wallet-saving {
    font-size: 0.8rem;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Additional order statuses ───────────────────────────────────────────── */
.ohc-status--billed       { background: #ede9fe; color: #5b21b6; }
.ohc-status--payment-due  { background: #fff7ed; color: #9a3412; }
.ohc-status--draft        { background: #f1f5f9; color: #475569; }
.ohc-status--placed       { background: #fef3c7; color: #92400e; }

/* ── Order type mini-badge on history card ───────────────────────────────── */
.ohc-order-type {
    font-size: 0.68rem; font-weight: 600; padding: 2px 8px;
    border-radius: 99px; background: #e0f2fe; color: #0369a1;
}

/* ── Orders page refresh controls ────────────────────────────────────────── */
.orders-refresh-row { display: flex; align-items: center; gap: 10px; }
.orders-refresh-btn {
    display: flex; align-items: center; gap: 5px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 99px; padding: 6px 14px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    color: var(--muted); transition: all 0.15s;
}
.orders-refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
.orders-refresh-btn svg { transition: transform 0.4s; }
.orders-refresh-btn.refreshing svg { transform: rotate(360deg); }
.orders-last-updated { font-size: 0.75rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE PAGE  (prf-* classes)
   ══════════════════════════════════════════════════════════════════════════ */

.prf-wrap { display: grid; gap: 1.25rem; }

/* ── Hero: avatar + identity + inline stats ──────────────────────────────── */
.prf-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #f7f9fb 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 16px rgba(16, 18, 20, 0.05);
}

.prf-hero-top {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.prf-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f9d55, #35b769);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Archivo", sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    box-shadow: 0 6px 16px rgba(31, 157, 85, 0.32);
}

.prf-identity { flex: 1; min-width: 0; }
.prf-name { font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.prf-since { font-size: 0.82rem; color: var(--muted); }

/* Inline stats strip inside hero */
.prf-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}

.prf-hstat {
    padding: 0.95rem 1.1rem;
    border-right: 1px solid var(--line);
}
.prf-hstat:last-child { border-right: none; }

.prf-hstat strong {
    display: block;
    font-family: "Archivo", sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.prf-hstat > span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prf-hstat > small {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.prf-hstat--accent strong { color: var(--accent-ink); }
.prf-hstat--primary { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.prf-hstat--primary strong { color: var(--accent-ink); }

/* ── Main two-column layout ──────────────────────────────────────────────── */
.prf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 1.25rem;
    align-items: start;
}

.prf-main    { display: grid; gap: 1.25rem; }
.prf-sidebar { display: grid; gap: 1.25rem; }

/* ── Generic card ────────────────────────────────────────────────────────── */
.prf-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.3rem;
    box-shadow: 0 2px 8px rgba(16, 18, 20, 0.04);
}

.prf-card--subtle {
    background: var(--surface-soft);
    box-shadow: none;
}

.prf-card--feature {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 70%);
    border-color: rgba(31, 157, 85, 0.22);
    box-shadow: 0 4px 16px rgba(31, 157, 85, 0.07);
}

.prf-card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.prf-card-hd h2 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.prf-card-sub { font-size: 0.78rem; color: var(--muted); }

/* ── See all — works as <a> or <button> ──────────────────────────────────── */
.prf-see-all {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-ink);
    border-bottom: 1px solid rgba(31, 157, 85, 0.3);
    padding-bottom: 1px;
    transition: opacity 0.15s;
    text-decoration: none;
}
button.prf-see-all {
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    font-family: inherit;
    padding-left: 0;
    padding-right: 0;
}
.prf-see-all:hover { opacity: 0.7; }

/* ── Wallet + activity colours ───────────────────────────────────────────── */
.prf-credit { color: var(--accent-ink) !important; }
.prf-debit  { color: #b91c1c !important; }

/* ── Convert Points card helpers ─────────────────────────────────────────── */
.prf-conv-rate {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.prf-conv-min {
    font-size: 0.79rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}
.prf-conv-balance {
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* ── Location mini-card controls ─────────────────────────────────────────── */
.prf-location-btns {
    display: flex;
    gap: 6px;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.prf-location-btns .btn-ghost { font-size: 0.8rem; padding: 5px 12px; }
.prf-refresh-btn { width: 100%; font-size: 0.8rem; text-align: center; margin-top: 0.2rem; }

/* ── Account + Payment side-by-side row ──────────────────────────────────── */
.prf-acct-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.prf-field-group { margin-bottom: 1.1rem; }
.prf-field-group:last-child { margin-bottom: 0; }

.prf-field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.prf-field-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.prf-field-label-row .prf-field-label { margin-bottom: 0; }

.prf-inline-form { }
.prf-inline-row { display: flex; gap: 0.5rem; align-items: stretch; }
.prf-inline-row input { flex: 1; min-width: 0; }
.prf-inline-btn { flex-shrink: 0; white-space: nowrap; padding-left: 1rem; padding-right: 1rem; }

.prf-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    white-space: nowrap;
}
.prf-verified--ok  { background: #dcfce7; color: #166534; }
.prf-verified--no  { background: #fee2e2; color: #991b1b; }

.prf-field-hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; margin-bottom: 0; }

.prf-section-divider { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }

.prf-pw-mismatch { font-size: 0.78rem; color: #b91c1c; margin-top: -0.3rem; margin-bottom: 0.2rem; }

/* ── Activity tabs ───────────────────────────────────────────────────────── */
.prf-tabs {
    display: flex;
    gap: 2px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
}

.prf-tab-btn {
    background: none;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}

.prf-tab-btn.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 4px rgba(16, 18, 20, 0.1);
}

.prf-tab-btn:hover:not(.is-active) { color: var(--ink); }

.prf-tab-pane[hidden] { display: none; }

.prf-pane-footer {
    padding-top: 0.8rem;
    margin-top: 0.2rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

/* ── Payment Methods (pm-*) ──────────────────────────────────────────────── */

.pm-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 11px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--ink);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    line-height: 1.4;
}
.pm-add-btn:hover    { background: #f0fdf4; border-color: var(--accent); color: var(--accent-ink); }
.pm-add-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Add-card form panel */
.pm-add-form {
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: prf-slide-up 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.pm-add-form-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
}

.pm-add-form-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}
.pm-add-form-close:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

.pm-add-form > .stripe-card-element,
.pm-add-form-inner > .stripe-card-element {
    margin: 0.75rem 0.9rem 0;
}

/* Override Stripe element container styling when inside pm-add-form */
.pm-add-form .stripe-card-element {
    margin: 0.75rem 0.9rem 0;
}

.pm-name-field {
    padding: 0.6rem 0.9rem 0;
}
.pm-name-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}
.pm-name-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-soft);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.pm-name-input:focus { border-color: #0d9488; }
.pm-name-input::placeholder { color: var(--muted); }

.pm-default-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem 0;
    cursor: pointer;
}
.pm-default-toggle span { font-size: 0.8rem; color: var(--muted); }

.pm-add-form-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem 0.75rem;
}
.pm-add-form-actions .btn-primary,
.pm-add-form-actions .btn-ghost { font-size: 0.85rem; }

/* Card tiles */
.pm-cards {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.pm-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: box-shadow 0.2s;
}
.pm-card--default { border-color: rgba(31, 157, 85, 0.4); box-shadow: 0 0 0 2px rgba(31, 157, 85, 0.1); }
.pm-card:not(.pm-card--default):hover { box-shadow: 0 4px 12px rgba(16, 18, 20, 0.1); }

/* Card face */
.pm-card-face {
    position: relative;
    padding: 0.9rem 1rem 0.85rem;
    color: #fff;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Brand-specific gradients */
.pm-brand--visa        { background: linear-gradient(135deg, #0d2168 0%, #1a3a9c 100%); }
.pm-brand--mastercard  { background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%); }
.pm-brand--amex        { background: linear-gradient(135deg, #00574b 0%, #007a6a 100%); }
.pm-brand--discover    { background: linear-gradient(135deg, #b34400 0%, #d95700 100%); }
.pm-brand--jcb         { background: linear-gradient(135deg, #0a2d6e 0%, #1a4d9c 100%); }
.pm-brand--unionpay    { background: linear-gradient(135deg, #8b0000 0%, #b22222 100%); }
.pm-brand--diners      { background: linear-gradient(135deg, #1a2744 0%, #2c3e6b 100%); }

.pm-card-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    background: rgba(31, 200, 105, 0.9);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pm-card-chip {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(135deg, #c8952a 0%, #f0c860 45%, #b87d1a 100%);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.25);
}

.pm-card-number {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
    flex: 1;
    display: flex;
    align-items: center;
}

.pm-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 0.4rem;
}

.pm-card-holder {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-card-exp {
    text-align: right;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.04em;
}
.pm-card-exp small {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2px;
}

/* Action bar under each card */
.pm-card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
    gap: 0.5rem;
}

.pm-card-brandlabel {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.pm-card-bar-actions { display: flex; align-items: center; gap: 0.4rem; }

.pm-bar-default {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-ink);
}

.pm-bar-btn {
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 3px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    line-height: 1.5;
}
.pm-bar-btn:hover                 { background: var(--surface); border-color: var(--accent); color: var(--accent-ink); }
.pm-bar-btn--danger               { color: var(--muted); }
.pm-bar-btn--danger:hover         { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

/* Empty state */
.pm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.75rem 1rem 1.25rem;
    text-align: center;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.pm-empty svg { opacity: 0.35; margin-bottom: 0.25rem; }
.pm-empty p   { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin: 0; }
.pm-empty span { font-size: 0.8rem; color: var(--muted); }

/* Security note */
.pm-secure {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    color: var(--muted);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}
.pm-secure svg { flex-shrink: 0; color: var(--accent-ink); opacity: 0.7; }

/* ── Activity modal ──────────────────────────────────────────────────────── */
.prf-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.prf-modal[hidden] { display: none; }

.prf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 18, 20, 0.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    animation: prf-fade 0.2s ease;
}

.prf-modal-panel {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(16, 18, 20, 0.2), 0 2px 8px rgba(16, 18, 20, 0.08);
    animation: prf-slide-up 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.prf-modal-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.prf-modal-hd h2 { font-size: 0.97rem; font-weight: 700; letter-spacing: -0.01em; }

.prf-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.prf-modal-close:hover { background: var(--surface-soft); color: var(--ink); }

.prf-modal-body {
    overflow-y: auto;
    padding: 0 1.3rem 1rem;
    flex: 1;
}
.prf-modal-body .activity-item:first-child { border-top: none; }

@keyframes prf-fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes prf-slide-up { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .prf-layout   { grid-template-columns: 1fr; }
    .prf-acct-row { grid-template-columns: 1fr; }
    .prf-perks-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .prf-hero { padding: 1.2rem 1.1rem; }
    .prf-hero-top { margin-bottom: 1.1rem; }
    .prf-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prf-hstat:nth-child(2) { border-right: none; }
    .prf-hstat:nth-child(3) { border-top: 1px solid var(--line); }
    .prf-hstat:nth-child(4) { border-top: 1px solid var(--line); border-right: none; }
    .prf-avatar { width: 52px; height: 52px; font-size: 1.3rem; }
    .prf-name { font-size: 1.2rem; }
    .prf-perks-row { grid-template-columns: 1fr; }
    .prf-inline-row { flex-direction: column; }
    .prf-inline-btn { width: 100%; }
    .prf-modal-panel { max-height: 92vh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
    .prf-modal { align-items: flex-end; padding: 0; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   BUSINESS PROFILE PAGE  (bp-*)
   Fresha-style: full-width cover, identity strip, row-list services, sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Outer wrapper (no max-width — children use bp-inner) ─────────────────── */
.bp-wrap { width: 100%; }

/* ── Content width constraint ─────────────────────────────────────────────── */
.bp-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Full-bleed cover ─────────────────────────────────────────────────────── */
.bp-hero {
    position: relative;
    height: 300px;
    background: #111;
    overflow: hidden;
}
.bp-hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: transform 5s ease;
}

.bp-hero-img--placeholder {
    background-image: url('/images/logo.png'), linear-gradient(145deg, #111318, #1e2330) !important;
    background-size: 130px auto, cover !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center, center !important;
}
.bp-hero:hover .bp-hero-img { transform: scale(1.03); }
.bp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.45) 100%);
}

/* ── Identity strip ───────────────────────────────────────────────────────── */
.bp-ident-bar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 24px 0 20px;
}
.bp-ident-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.bp-ident-main { flex: 1; min-width: 0; }
.bp-type-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.bp-biz-name {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 10px;
    line-height: 1.15;
}
.bp-biz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-bottom: 10px;
}
.bp-biz-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--muted);
}
.bp-biz-meta-item svg { opacity: 0.6; flex-shrink: 0; }
.bp-biz-meta-link { transition: color 0.15s; }
.bp-biz-meta-link:hover { color: var(--ink); }
.bp-biz-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bp-ident-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-end;
    padding-top: 4px;
}
.bp-nav-link {
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}
.bp-nav-link:hover { color: var(--ink); }
.bp-view-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--ink, #111);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.18s, transform 0.18s;
    margin-bottom: 4px;
}
.bp-view-page-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Flash messages ───────────────────────────────────────────────────────── */
.bp-flash {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin: 16px 0 0;
}
.bp-flash--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.bp-flash--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Sticky tab bar ───────────────────────────────────────────────────────── */
.bp-tab-bar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.bp-tab-bar .bp-inner {
    display: flex;
    gap: 0;
}
.bp-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 14px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.bp-tab-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.bp-tab-btn:hover { color: var(--ink); }
.bp-tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Two-column layout ────────────────────────────────────────────────────── */
.bp-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
    padding: 32px 0 80px;
}
.bp-content { min-width: 0; }

/* ── Tab panes ────────────────────────────────────────────────────────────── */
.bp-tab-pane { display: none; }
.bp-tab-pane.active { display: block; }

/* ── Section headings (feed/nearby) ──────────────────────────────────────── */
.bp-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 28px 0 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}
.bp-section-head h2 { font-size: 1.2rem; }
.bp-section-sub { font-size: 0.85rem; color: var(--muted); }

/* ── Service category filter pills ───────────────────────────────────────── */
.bp-cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}
.bp-cat-btn {
    background: none;
    border: 1.5px solid var(--line-strong);
    border-radius: 99px;
    padding: 6px 16px;
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.bp-cat-btn:hover { color: var(--ink); border-color: var(--ink); }
.bp-cat-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Service section (per category group) ─────────────────────────────────── */
.bp-svc-section { margin-bottom: 8px; }
.bp-svc-cat-head {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 20px 0 12px;
    margin: 0;
    border-bottom: 1px solid var(--line);
}

/* ── Service row ──────────────────────────────────────────────────────────── */
.bp-svc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    transition: background 0.12s;
}
.bp-svc-row.bp-detail-card { cursor: pointer; }
.bp-svc-row:last-child { border-bottom: none; }
.bp-svc-row.is-hidden { display: none; }
.bp-svc-row.is-selected {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
    margin: 0 -12px;
    padding: 18px 12px;
    border-radius: 8px;
}

/* Service image thumbnail */
.bp-svc-img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface, #f4f6f8);
}
.bp-svc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.bp-svc-row:hover .bp-svc-img img { transform: scale(1.06); }

.bp-svc-info { flex: 1; min-width: 0; }
.bp-svc-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.bp-svc-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
}
.bp-svc-dur {
    font-size: 0.8rem;
    color: var(--muted);
}
.bp-arch-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.bp-arch-tag--class     { background: #dcfce7; color: #15803d; }
.bp-arch-tag--asset     { background: #fef9c3; color: #854d0e; }
.bp-arch-tag--home_visit { background: #e0f2fe; color: #075985; }

.bp-svc-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}
.bp-svc-days {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 4px 0 0;
}

.bp-svc-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.bp-svc-price {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--ink);
    white-space: nowrap;
}
.bp-book-btn {
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 22px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.15s;
    letter-spacing: 0.01em;
}
.bp-book-btn:hover { opacity: 0.75; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.bp-sidebar {
    position: sticky;
    top: 54px;
}
.bp-sidebar-info { display: block; }
.bp-sidebar:has(#booking-panel:not([hidden])) .bp-sidebar-info { display: none; }

/* ── Sidebar sections ─────────────────────────────────────────────────────── */
.bp-sidebar-section {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}
.bp-sidebar-section:first-child { padding-top: 0; }
.bp-sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

/* Hours */
.bp-hours-list { display: flex; flex-direction: column; gap: 0; }
.bp-hour-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    padding: 5px 0;
}
.bp-hour-day { font-weight: 600; color: var(--ink); }
.bp-hour-time { color: var(--muted); }
.bp-hour-row--today .bp-hour-day,
.bp-hour-row--today .bp-hour-time { color: var(--accent); font-weight: 600; }
.bp-hour-row--closed .bp-hour-time { color: #b91c1c; }

/* Contact */
.bp-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--muted);
    padding: 4px 0;
    text-decoration: none;
    transition: color 0.15s;
}
.bp-contact-item svg { opacity: 0.55; flex-shrink: 0; }
.bp-contact-item[href]:hover { color: var(--ink); }

/* "Select a service" hint */
.bp-book-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--muted);
    padding: 16px 0 0;
    line-height: 1.5;
}
.bp-book-hint svg { opacity: 0.5; flex-shrink: 0; }

/* ── Booking panel ────────────────────────────────────────────────────────── */
.booking-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    animation: panel-in 0.18s ease;
}

/* Panel header */
.bp-panel-head { margin-bottom: 18px; }
.bp-panel-back {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.bp-panel-back:hover { color: var(--ink); }
.bp-panel-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 3px;
    line-height: 1.3;
}
.bp-panel-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

/* Steps */
.bp-booking-step { margin-bottom: 18px; }
.bp-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bp-step-note { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
.bp-loading { font-size: 0.75rem; color: var(--muted); font-style: italic; }

/* Chip group */
.bp-chip-group { display: flex; flex-wrap: wrap; gap: 7px; }

/* Booking chips — staff + time slots */
.booking-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 15px;
    border: 1.5px solid var(--line-strong);
    border-radius: 7px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
    white-space: nowrap;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.booking-chip:hover:not(:disabled) { border-color: var(--ink); background: var(--surface-soft); }
.booking-chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.booking-chip.is-full { opacity: 0.4; cursor: default; }
.chip-seats { font-size: 0.7rem; font-weight: 700; opacity: 0.75; }

/* Inputs */
.bp-input {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 0.87rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    display: block;
}
.bp-input:focus { border-color: var(--ink); }
.bp-textarea { resize: vertical; }

/* Confirm summary */
.bp-summary {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--ink);
    line-height: 1.75;
}

/* Submit button */
.bp-submit-btn {
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
    letter-spacing: 0.01em;
}
.bp-submit-btn:hover { opacity: 0.78; }
.bp-submit-btn:disabled { opacity: 0.5; cursor: default; }

.bp-cart-msg {
    text-align: center;
    font-size: 0.82rem;
    padding: 9px 12px;
    border-radius: 7px;
    margin-top: 8px;
    background: #d1fae5;
    color: #065f46;
}

/* ── No-tabs (feed+nearby only) ───────────────────────────────────────────── */
.bp-notabs { padding: 32px 0 80px; }

/* ── Responsive: 1200px — narrow sidebar ─────────────────────────────────── */
@media (max-width: 1200px) {
    .bp-layout { grid-template-columns: 1fr 300px; gap: 32px; }
}

/* ── Responsive: 900px — single column ───────────────────────────────────── */
@media (max-width: 900px) {
    .bp-inner { padding: 0 20px; }
    .bp-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 0;
    }
    .bp-sidebar {
        position: static;
        border-top: 1px solid var(--line);
        margin-top: 8px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .bp-sidebar-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0 32px;
    }
    .bp-sidebar-section { padding: 12px 0; }
    .bp-book-hint { padding-top: 12px; }
    .bp-content { padding-top: 0; }
    .bp-tab-bar { overflow: hidden; }
    .bp-tab-bar .bp-inner {
        overflow-x: auto;
        padding: 0 20px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .bp-tab-bar .bp-inner::-webkit-scrollbar { display: none; }
    .bp-ident-flex { flex-direction: column; gap: 12px; }
    .bp-ident-links { flex-direction: row; align-items: center; flex-wrap: wrap; }
}

/* ── Responsive: 640px — mobile ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .bp-hero { height: 200px; width: calc(100% - 32px); margin: 0 16px; border-radius: 12px; }
    .bp-biz-name { font-size: 1.5rem; }
    .bp-layout { padding-bottom: 48px; }
    .bp-svc-row { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
    .bp-svc-row--has-img { align-items: flex-start; }
    .bp-svc-img { width: 60px; height: 60px; border-radius: 8px; }
    .bp-svc-action { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
    .booking-panel { padding: 16px; }
}

/* ── Merchant public page gallery ──────────────────────────────────────────── */
.bp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 16px 0;
}
.bp-gallery-item {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}
.bp-gallery-item:hover { opacity: .9; transform: scale(1.01); }
.bp-gallery-item--active { outline: 3px solid var(--c-purple, #7c3aed); outline-offset: 2px; }

/* Gallery lightbox */
.bp-gallery-lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 15, 17, .92);
    padding: 32px;
}
.bp-gallery-lightbox[hidden] { display: none; }
.bp-gallery-lightbox-img {
    max-width: 100%; max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.bp-gallery-lightbox-close {
    position: absolute; top: 18px; right: 22px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff; border: none;
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.bp-gallery-lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ── Reservation tab: party-size stepper ─────────────────────────────────── */
.bp-reservation-form { max-width: 480px; }
.bp-party-stepper { display: flex; align-items: center; gap: 16px; }
.bp-party-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    background: #fff; color: var(--ink);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s, background .15s;
}
.bp-party-btn:hover { border-color: var(--ink); background: var(--surface-soft); }
.bp-party-val { font-size: 1rem; font-weight: 700; color: var(--ink); min-width: 90px; text-align: center; }

/* Hero gallery strip (thumbnails at bottom of hero image) */
.bp-hero-gallery-strip {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.bp-gallery-thumb {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255,255,255,.7);
    cursor: pointer;
}

/* Logo in identity bar */
.bp-biz-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    margin-bottom: 12px;
    padding: 6px;
}
.bp-biz-logo { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Make hero position relative for gallery strip */
.bp-hero { position: relative; }

/* ── Coupon input ─────────────────────────────────────────────────────────── */
.cart-coupon-wrap { margin-top: 14px; }
.cart-coupon-row {
    display: flex;
    gap: 6px;
}
.cart-coupon-input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--line-strong);
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: var(--surface-soft);
    color: var(--ink);
    outline: none;
    transition: border-color .15s;
}
.cart-coupon-input:focus { border-color: #0d9488; }
.cart-coupon-input::placeholder { font-weight: 400; letter-spacing: 0; color: var(--muted); }
.cart-coupon-apply-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid #0d9488;
    background: none;
    color: #0d9488;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.cart-coupon-apply-btn:hover { background: #0d9488; color: #fff; }
.cart-coupon-apply-btn:disabled { opacity: .5; cursor: default; }
.cart-coupon-msg {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0 2px;
}

/* ── Business-page coupon "deal tickets" ──────────────────────────────────── */
.bp-coupon-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}
.bp-coupon-ticket {
    --c-a: #f43f5e;          /* rose  */
    --c-b: #ea580c;          /* orange */
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(118deg, var(--c-a) 0%, var(--c-b) 100%);
    box-shadow: 0 10px 26px -8px rgba(244, 63, 94, 0.55);
    overflow: hidden;
    isolation: isolate;
    animation: bp-coupon-in .5s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
/* subtle radial sheen */
.bp-coupon-ticket::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%);
    pointer-events: none;
    z-index: 0;
}
.bp-coupon-main {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 18px;
}
.bp-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.bp-coupon-value {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.bp-coupon-cond {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}
/* right stub: dashed perforation + notch cutouts */
.bp-coupon-stub {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 132px;
    flex-shrink: 0;
    padding: 16px 14px;
    border-left: 2px dashed rgba(255, 255, 255, 0.55);
}
.bp-coupon-stub::before,
.bp-coupon-stub::after {
    content: "";
    position: absolute;
    left: -10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
}
.bp-coupon-stub::before { top: -9px; }
.bp-coupon-stub::after  { bottom: -9px; }
.bp-coupon-code-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}
.bp-coupon-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
}
.bp-coupon-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #e11d48;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 10px -3px rgba(0, 0, 0, 0.3);
    transition: transform .14s ease, box-shadow .14s ease, background .14s, color .14s;
}
.bp-coupon-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px -4px rgba(0, 0, 0, 0.36);
}
.bp-coupon-copy:active { transform: translateY(0); }
.bp-coupon-copy.is-copied {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    box-shadow: none;
}
.bp-coupon-copy-ic { flex-shrink: 0; }

@keyframes bp-coupon-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .bp-coupon-ticket { animation: none; }
}

/* ── Item / service detail popup ─────────────────────────────────────────── */
.bp-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 18, 20, 0.55);
    backdrop-filter: blur(3px);
    animation: bp-detail-fade 0.15s ease;
}
.bp-detail-overlay[hidden] { display: none; }
@keyframes bp-detail-fade { from { opacity: 0; } to { opacity: 1; } }
.bp-detail-modal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(16, 18, 20, 0.28);
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bp-detail-pop 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bp-detail-pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.bp-detail-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
    flex-shrink: 0;
}
.bp-detail-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.bp-detail-img--placeholder {
    background-image: none;
    background:
        linear-gradient(135deg, var(--surface-soft), var(--line));
}
.bp-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 18, 20, 0.15);
    transition: color 0.15s, transform 0.15s;
}
.bp-detail-close:hover { color: var(--ink); transform: scale(1.06); }
.bp-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px 24px 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.bp-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.bp-detail-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
}
.bp-detail-price {
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-ink);
}
.bp-detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.bp-detail-facts:empty { display: none; }
.bp-detail-fact {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.bp-detail-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink);
    white-space: pre-line;
}
.bp-detail-desc--empty { color: var(--muted); font-style: italic; }
.bp-detail-foot {
    flex-shrink: 0;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--line);
}
.bp-detail-action {
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}
.bp-detail-action:hover { opacity: 0.9; }
.bp-detail-action:disabled { opacity: 0.6; cursor: default; }
.bp-detail-oos {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}
@media (max-width: 560px) {
    .bp-detail-overlay { padding: 0; align-items: flex-end; }
    .bp-detail-modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    .bp-detail-media { height: 170px; }
}

/* Meta tag @push in layout head */

/* ============================================================
   Home page — customer hero, search, featured carousel
   ============================================================ */

/* Home hero: single column by default, two columns when a featured card exists */
.home-hero {
    display: block;
    padding: 1.9rem 1.9rem 1.7rem;
}

.home-hero.has-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.4rem;
    align-items: stretch;
}

.home-hero-copy {
    max-width: 720px;
    align-self: center;
}

.home-hero h1 {
    max-width: 22ch;
}

.home-hero p {
    color: var(--muted);
    margin-bottom: 1.15rem;
}

/* Hero search bar */
.home-search {
    display: flex;
    gap: 0.5rem;
    max-width: 560px;
}

.home-search-field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.home-search-field svg {
    position: absolute;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

.home-search-field input {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: 0.72rem 0.9rem 0.72rem 2.5rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.home-search-field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(16, 18, 20, 0.1);
}

.home-search .btn-primary {
    padding: 0.72rem 1.3rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* Active category chip */
.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.chip {
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

/* ---- Featured spotlight card carousel (inside the hero) ---- */
.home-hero-featured {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 300px;
    box-shadow: var(--shadow);
    background: #12141a;
}

.hhf-slides {
    position: absolute;
    inset: 0;
}

.hhf-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.15rem;
    color: #fff;
    background-color: #1a1d24;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.hhf-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.featured-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    color: #92400e;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.hhf-body {
    display: grid;
    gap: 0.42rem;
    max-width: 34ch;
}

.hhf-body .pill.alt {
    justify-self: start;
}

.hhf-body h3 {
    font-size: 1.5rem;
    line-height: 1.12;
    color: #fff;
}

.hhf-body p {
    font-size: 0.9rem;
    line-height: 1.42;
    color: rgba(255, 255, 255, 0.86);
    margin: 0;
}

.hhf-cta {
    font-size: 0.86rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.15rem;
}

/* Prev / next arrows */
.hhf-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #101214;
    border-radius: 999px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background 0.14s ease;
}

.hhf-arrow:hover {
    background: #fff;
}

.hhf-arrow svg {
    width: 18px;
    height: 18px;
}

.hhf-prev { left: 0.7rem; }
.hhf-next { right: 0.7rem; }

/* Dots */
.hhf-dots {
    position: absolute;
    bottom: 0.7rem;
    right: 0.9rem;
    display: flex;
    gap: 0.38rem;
    z-index: 3;
}

.hhf-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.14s ease, width 0.14s ease;
}

.hhf-dot.is-active {
    background: #fff;
    width: 20px;
}

@media (max-width: 860px) {
    .home-hero.has-featured {
        grid-template-columns: 1fr;
    }
    .home-hero-featured {
        min-height: 240px;
    }
}

@media (max-width: 780px) {
    .home-hero {
        padding: 1.4rem;
    }
    .home-search {
        flex-direction: column;
    }
}
