:root {
    --ink: #0a0a0a;
    --muted: #6b6b6b;
    --line: #e8e8e8;
    --surface: #ffffff;
    --surface-soft: #f6f6f6;
    --brand: #0b6e99;
    --brand-dark: #085578;
    --brand-soft: #e8f4fa;
    --blue: var(--brand);
    --blue-dark: var(--brand-dark);
    --cyan: #d7f3fb;
    --green: #dff3e5;
    --amber: #fff0cc;
    --navy: #dfe8f6;
    --danger: #e11900;
    --success: #0e8345;
    --shadow: 0 10px 35px rgb(11 110 153 / 10%);
    --radius: 8px;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.embed-mode .commerce-header,
body.embed-mode .explore-section,
body.embed-mode .apps-section,
body.embed-mode .commerce-footer,
body.embed-mode .account-dashboard {
    display: none !important;
}

body.embed-mode.vendor-mode .vendor-shell {
    display: block !important;
}

body.logged-in .request-copy {
    display: none;
}

body.logged-in .account-dashboard {
    display: block;
}

body.vendor-mode .account-dashboard,
body.vendor-mode .request-card-guest,
body.vendor-mode .results-section,
body.vendor-mode .explore-section,
body.vendor-mode .apps-section,
body.vendor-mode .orders-section {
    display: none !important;
}

body.vendor-mode .vendor-shell {
    display: block;
}

body.vendor-mode .desktop-nav {
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.vendor-shell {
    display: none;
    width: 100%;
}

.vendor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
}

.vendor-tab {
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}

.vendor-tab.active,
.vendor-tab[aria-selected="true"] {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.vendor-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

@media (min-width: 640px) {
    .vendor-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.vendor-stat {
    background: var(--surface-soft);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.vendor-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.vendor-stat strong {
    font-size: 1.25rem;
}

.vendor-panel-section {
    margin-top: 1.5rem;
}

.vendor-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vendor-panel-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.vendor-order-list,
.vendor-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-order-card,
.vendor-product-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--surface);
}

.vendor-order-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.vendor-order-card p {
    margin: 0.25rem 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.vendor-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.vendor-order-actions select {
    flex: 1;
    min-width: 8rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
}

.vendor-product-card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.vendor-stat-clickable {
    cursor: pointer;
    border: 1px solid transparent;
}

.vendor-stat-clickable:hover,
.vendor-stat-clickable:focus {
    border-color: var(--brand-soft);
    background: var(--brand-soft);
}

.vendor-back {
    margin-bottom: 0.75rem;
}

.vendor-stats-grid-wallet {
    margin-bottom: 1rem;
}

.vendor-withdraw-form {
    margin-bottom: 1rem;
}

.vendor-wallet-tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vendor-wallet-tx {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.875rem;
}

.vendor-product-card {
    cursor: pointer;
}

.vendor-product-card:hover {
    border-color: var(--brand);
}

.vendor-order-detail-body p {
    margin: 0.35rem 0;
    color: var(--muted);
}

.auth-form textarea {
    width: 100%;
    font: inherit;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    resize: vertical;
}

body.logged-in .request-shell {
    align-items: start;
    grid-template-columns: 1fr;
    max-width: var(--max-width);
}

body.logged-in .request-card-guest {
    display: none;
}

body.logged-in .request-hero {
    padding-top: 32px;
    padding-bottom: 28px;
}

body.embed-mode .request-hero {
    padding: 16px 16px 20px;
}

body.embed-mode .request-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: none;
}

body.embed-mode .request-copy {
    display: none;
}

body.embed-mode .request-card {
    max-width: none;
}

body.embed-mode .results-section {
    padding: 20px 16px 28px;
}

body.embed-mode .browse-strip-header {
    margin-bottom: 10px;
}

body.embed-mode .service-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

body.embed-mode .service-option span {
    padding: 10px 6px;
    font-size: 0.72rem;
}

button,
input {
    font: inherit;
}

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

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

.hidden {
    display: none !important;
}

.commerce-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 64px;
    padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
    background: rgb(255 255 255 / 98%);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    font-family: "Inter", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--brand-dark);
}

.brand::after {
    width: 7px;
    height: 7px;
    margin: 2px 0 0 3px;
    background: var(--brand);
    border-radius: 50%;
    content: "";
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.desktop-nav a,
.header-link {
    color: #292929;
    font-size: 0.875rem;
    font-weight: 500;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.header-link:hover {
    color: var(--brand);
}

.desktop-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--brand);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.button:hover {
    transform: none;
}

.button-dark,
.button-brand {
    color: #fff;
    background: var(--brand);
}

.button-dark:hover,
.button-brand:hover {
    background: var(--brand-dark);
}

.button-quiet {
    color: var(--ink);
    background: var(--surface-soft);
}

.button-quiet:hover {
    background: #e7e7e7;
}

.button-outline {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--ink);
}

.button-wide {
    width: 100%;
}

.user-menu-wrap {
    position: relative;
}

.user-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 12px 4px 5px;
    border: 0;
    border-radius: 24px;
    color: #fff;
    background: var(--brand);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.user-menu-caret {
    font-size: 0.65rem;
    opacity: 0.85;
}

.user-menu[aria-expanded="true"] .user-menu-caret {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 640px);
    overflow: auto;
    padding: 12px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 48px rgb(11 110 153 / 18%);
}

.user-dropdown-header {
    padding: 8px 16px 12px;
}

.user-dropdown-header strong {
    display: block;
    font-size: 0.9375rem;
}

.user-dropdown-header small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8125rem;
}

.user-dropdown-label {
    margin: 0;
    padding: 8px 16px 0;
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 700;
}

.user-dropdown-intro {
    margin: 4px 16px 8px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.user-dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--line);
}

.user-dropdown-item,
.user-dropdown-services .service-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.user-dropdown-item:hover,
.user-dropdown-services .service-menu-item:hover,
.service-menu-list .service-menu-item:hover {
    background: var(--brand-soft);
}

.user-dropdown-item i,
.user-dropdown-services .service-menu-item i,
.service-menu-list .service-menu-item i {
    width: 16px;
    margin-top: 2px;
    color: var(--brand);
    text-align: center;
}

.user-dropdown-item-danger {
    color: var(--danger);
}

.user-dropdown-item-danger i {
    color: var(--danger);
}

.user-dropdown-services .service-menu-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.user-dropdown-services .service-menu-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.explore-intro {
    max-width: 62ch;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.user-dropdown-services .service-menu-item strong,
.service-menu-list .service-menu-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-dropdown-services .service-menu-item small,
.service-menu-list .service-menu-item small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.account-dashboard h1 {
    margin: 8px 0 6px;
    font-family: "Inter", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.dashboard-status {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9375rem;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.dashboard-grid-activity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.services-panel {
    margin-top: 20px;
}

.dashboard-activity {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 20px 40px;
}

.dashboard-activity .dashboard-status {
    margin: 0 0 8px;
}

.services-panel h3 {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.services-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.service-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    color: var(--ink);
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease;
}

.service-row + .service-row {
    border-top: 1px solid var(--line);
}

.service-row:hover,
.service-row.active {
    background: var(--brand-soft);
}

.service-row-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    color: var(--brand);
    background: #fff;
    font-size: 1.0625rem;
}

.service-row-copy strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
}

.service-row-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.service-row-arrow {
    color: var(--muted);
    font-size: 0.8125rem;
}

.dashboard-panel h3 {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.dashboard-intro {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.dashboard-card {
    min-height: 140px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.dashboard-card-list {
    display: grid;
    gap: 8px;
    min-height: 180px;
}

.dashboard-placeholder {
    margin: 0;
    color: var(--muted);
    font-size: 0.8125rem;
}

.dashboard-order-row {
    display: grid;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.dashboard-order-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-order-row strong {
    font-size: 0.875rem;
}

.dashboard-order-row span {
    color: var(--muted);
    font-size: 0.75rem;
}

.dashboard-order-row em {
    color: var(--brand-dark);
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
}

.dashboard-link {
    margin-top: 10px;
}

.service-menu-list {
    display: grid;
    gap: 2px;
}

.service-menu-list .service-menu-item {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-dialog {
    width: min(480px, calc(100% - 30px));
}

.user-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
}

.request-hero {
    padding: 48px 24px 56px;
    background: #fff;
}

.request-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: clamp(32px, 6vw, 72px);
    align-items: start;
    max-width: var(--max-width);
    margin: 0 auto;
}

.request-copy h1 {
    max-width: 14ch;
    margin: 8px 0 16px;
    font-family: "Inter", sans-serif;
    font-size: clamp(1.875rem, 3.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.request-copy > p:last-child {
    max-width: 42ch;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.request-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid #e8e8e8;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.service-picker {
    padding: 0;
    margin: 0 0 24px;
    border: 0;
}

.service-picker legend,
.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.service-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.service-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-option span {
    display: grid;
    min-height: 68px;
    padding: 10px 4px;
    place-items: center;
    align-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #353535;
    background: var(--surface-soft);
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.service-option span i {
    font-size: 1.0625rem;
}

.service-option input:checked + span {
    border: 2px solid var(--brand);
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.service-option input:focus-visible + span {
    outline: 3px solid rgb(11 110 153 / 25%);
}

.location-field {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 48px;
    margin-bottom: 4px;
    padding-left: 14px;
    background: var(--surface-soft);
    border-bottom: 2px solid var(--brand);
}

.location-field input {
    width: 100%;
    min-width: 0;
    padding: 12px 10px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.9375rem;
}

.location-button,
.icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.location-button:hover,
.icon-button:hover {
    background: #e5e5e5;
}

.location-status {
    min-height: 20px;
    margin: 2px 0 16px;
    color: var(--muted);
    font-size: 0.78rem;
}

.signed-in-summary,
.results-section,
.orders-section,
.explore-section,
.apps-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px;
}

.signed-in-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    margin: 0;
    padding: 14px max(24px, calc((100vw - var(--max-width)) / 2));
    color: #fff;
    background: var(--brand-dark);
}

.signed-in-summary .eyebrow {
    margin: 0;
    color: rgb(255 255 255 / 62%);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: none;
}

.signed-in-summary h2 {
    margin: 2px 0 0;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.signed-in-summary .button-outline {
    color: #fff;
    background: transparent;
    border-color: rgb(255 255 255 / 35%);
}

.signed-in-summary .button-outline:hover {
    border-color: #fff;
}

.signed-in-summary .button-quiet {
    color: #fff;
    background: rgb(255 255 255 / 12%);
}

.signed-in-summary .button-quiet:hover {
    background: rgb(255 255 255 / 18%);
}

.section-heading h2,
.explore-section h2,
.apps-section h2 {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

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

.summary-actions {
    display: flex;
    gap: 8px;
}

.results-section {
    min-height: 360px;
    padding-top: 40px;
}

.cart-count {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--brand);
    font-size: 0.75rem;
}

.notice {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-left: 4px solid var(--brand);
    background: var(--brand-soft);
    color: #154152;
}

.notice.error {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff1f0;
}

.loading-state,
.empty-state {
    display: grid;
    min-height: 260px;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    color: var(--blue);
    font-size: 2rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

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

.commerce-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.browse-strip-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.browse-strip-header small {
    color: var(--muted);
    font-size: 0.8125rem;
}

.vendor-panel {
    overflow: visible;
}

.map-panel {
    grid-column: 1 / -1;
    min-height: min(70vh, 640px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.map-panel iframe {
    width: 100%;
    height: min(70vh, 640px);
    border: 0;
}

.vendor-grid {
    display: flex;
    gap: 14px;
    min-height: 280px;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
}

.vendor-scroll {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0 -2px;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.vendor-scroll::-webkit-scrollbar {
    height: 6px;
}

.vendor-scroll::-webkit-scrollbar-thumb {
    background: #c8d8e4;
    border-radius: 999px;
}

.vendor-card {
    flex: 0 0 min(220px, 72vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.vendor-card:hover,
.vendor-card.selected {
    box-shadow: 0 8px 24px rgb(11 110 153 / 14%);
}

.vendor-card.selected {
    border: 2px solid var(--brand);
}

.vendor-image {
    display: grid;
    width: 100%;
    height: 148px;
    place-items: center;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    color: var(--brand);
    background: linear-gradient(180deg, var(--brand-soft) 0%, #f7fbfd 100%);
    font-size: 1.75rem;
}

.vendor-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 12px;
}

.vendor-info {
    display: grid;
    gap: 6px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 96px;
    padding: 14px 12px 16px;
    text-align: center;
}

.vendor-info strong {
    display: block;
    margin: 0;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.vendor-info small {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.45;
    word-break: break-word;
}

.vendor-meta {
    display: block;
    margin-top: 2px;
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-panel {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header h3 {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.product-list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.product-list .empty-state {
    display: block;
    width: 100%;
}

.cart-items,
.order-list {
    display: grid;
    gap: 12px;
}

.product-item {
    flex: 0 0 min(280px, 78vw);
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.product-item:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.product-item-chevron {
    color: var(--muted);
    font-size: 0.85rem;
}

.product-detail-dialog {
    width: min(520px, calc(100% - 30px));
    padding: 0 24px 24px;
    border: 0;
    border-radius: var(--radius);
}

.product-detail-dialog .dialog-header {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 -24px 12px;
    padding: 16px 24px 8px;
    background: var(--surface);
}

.product-detail-back {
    margin-right: auto;
}

.product-detail-hero {
    display: grid;
    min-height: 220px;
    place-items: center;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--brand-soft) 0%, #f7fbfd 100%);
}

.product-detail-hero img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.product-detail-hero i {
    font-size: 3rem;
    color: var(--brand);
}

.product-detail-dialog h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.product-detail-description {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.product-detail-price {
    margin: 0 0 20px;
    font-size: 1.35rem;
    font-weight: 700;
}

.product-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: 700;
}

.product-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.product-qty-controls output {
    min-width: 2ch;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

.cart-item,
.order-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.product-thumb {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    color: var(--brand);
    background: linear-gradient(180deg, var(--brand-soft) 0%, #f7fbfd 100%);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-copy strong,
.product-copy small {
    display: block;
}

.product-copy small {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.price {
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

.add-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--brand);
    cursor: pointer;
}

.add-button:hover {
    background: var(--brand-dark);
}

.orders-section {
    padding-top: 40px;
    background: var(--surface-soft);
}

.order-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
}

.order-card p {
    margin: 4px 0 0;
    color: var(--muted);
}

.order-status {
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--surface-soft);
    font-size: 0.75rem;
    font-weight: 700;
}

.service-explorer {
    display: none;
}

.explore-section {
    border-top: 1px solid var(--line);
}

.explore-section h2 {
    margin: 0 0 24px;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

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

/* 7 products → last row has one card; keep it in the centre column */
.explore-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
}

.explore-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr auto;
    gap: 0 12px;
    min-height: 200px;
    padding: 22px 22px 18px;
    border: 0;
    border-radius: 16px;
    background: #f3f3f3;
    text-align: left;
    cursor: default;
}

.explore-card-copy {
    grid-column: 1;
    grid-row: 1 / 3;
}

.explore-card h3 {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.explore-card p {
    max-width: 26ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.explore-card-art {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    align-self: start;
    border-radius: 12px;
    color: var(--brand);
    background: rgb(255 255 255 / 72%);
    font-size: 2rem;
}

.explore-card-action {
    grid-column: 1;
    grid-row: 3;
    margin-top: 18px;
}

.explore-details-btn {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.explore-details-btn:hover {
    background: #fafafa;
}

.choose-dialog {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    padding: 28px 24px 24px;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgb(0 0 0 / 18%);
}

.choose-dialog::backdrop {
    background: rgb(0 0 0 / 45%);
}

.choose-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.choose-dialog-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    text-align: center;
}

.choose-dialog-logo {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: var(--brand);
    font-size: 1.75rem;
    font-weight: 700;
}

.choose-dialog-brand strong {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.02em;
}

.choose-dialog h2 {
    margin: 0 0 10px;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}

.choose-dialog-product {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.9375rem;
    text-align: center;
    line-height: 1.45;
}

.choose-dialog-actions {
    display: grid;
    gap: 12px;
}

.apps-section {
    max-width: none;
    padding-right: max(24px, calc((100vw - var(--max-width)) / 2));
    padding-left: max(24px, calc((100vw - var(--max-width)) / 2));
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
}

.apps-lead {
    max-width: 52ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.app-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: var(--max-width);
    margin: 20px auto 0;
}

.app-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #ececec;
    border-radius: var(--radius);
    background: #fff;
}

.app-card strong {
    font-size: 0.9375rem;
    font-weight: 600;
}

.app-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.8125rem;
}

.qr-placeholder {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: var(--radius);
    color: #fff;
    background: var(--brand-dark);
    font-size: 1.5rem;
}

.qr-placeholder.workspace {
    background: var(--brand);
}

.commerce-footer {
    padding: 48px max(24px, calc((100vw - var(--max-width)) / 2)) 20px;
    color: #fff;
    background: var(--brand-dark);
}

.footer-brand strong {
    font-family: "Inter", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-brand p {
    margin: 8px 0 0;
    color: #bcbcbc;
    font-size: 0.875rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    max-width: 720px;
    margin: 36px 0;
}

.footer-columns div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-columns div strong {
    font-size: 0.875rem;
}

.footer-columns a {
    color: #bcbcbc;
    font-size: 0.8125rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid rgb(255 255 255 / 18%);
    color: rgb(255 255 255 / 72%);
    font-size: 0.82rem;
}

dialog {
    width: min(520px, calc(100% - 30px));
    max-height: calc(100vh - 30px);
    padding: 24px;
    overflow: auto;
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 18px 80px rgb(0 0 0 / 28%);
}

dialog::backdrop {
    background: rgb(0 0 0 / 48%);
    backdrop-filter: blur(2px);
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dialog-header h2 {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.auth-tab {
    padding: 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab.active {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.auth-form,
.checkout-form {
    display: grid;
    gap: 16px;
}

.auth-form label,
.checkout-form label {
    display: grid;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 700;
}

.auth-form input,
.checkout-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    font-size: 0.9375rem;
}

.auth-form input:focus,
.checkout-form input:focus {
    border-color: var(--brand);
    outline: 2px solid rgb(11 110 153 / 16%);
}

.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-message {
    min-height: 20px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.cart-dialog {
    width: min(640px, calc(100% - 30px));
}

.cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.cart-item small {
    display: block;
    color: var(--muted);
}

.remove-cart-button {
    border: 0;
    color: var(--danger);
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.cart-step .cart-total {
    margin-bottom: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}

.sheet-handle {
    width: 100px;
    height: 2px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: var(--muted);
}

.payment-sheet {
    margin-top: 8px;
    padding-top: 4px;
}

.payment-sheet-section + .payment-sheet-section {
    margin-top: 20px;
    padding-top: 4px;
}

.payment-sheet-heading {
    align-items: center;
}

.payment-sheet-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.payment-sheet-row h3,
.payment-sheet-subtitle {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.delivery-summary {
    display: grid;
    gap: 10px;
}

.delivery-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 10px;
    align-items: center;
    font-size: 0.9rem;
}

.delivery-line-address {
    grid-template-columns: auto 1fr;
    align-items: start;
}

.delivery-line i {
    margin-top: 2px;
    color: var(--text);
}

.delivery-line .delivery-phone {
    font-weight: 600;
}

.mpesa-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 8px 0 16px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.mpesa-row:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.mpesa-logo {
    display: block;
    object-fit: contain;
}

.mpesa-number {
    color: var(--muted);
    font-size: 1.35rem;
}

.payment-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 700;
}

.payment-total-row strong {
    font-size: 1.65rem;
}

.payment-sheet-cancel {
    display: block;
    width: 100%;
    margin-top: 12px;
}

.text-button {
    border: 0;
    padding: 4px 0;
    background: transparent;
    color: var(--brand-dark);
    font-weight: 700;
    cursor: pointer;
}

.text-button-danger {
    color: var(--danger);
}

.mpesa-phone-dialog {
    width: min(480px, calc(100% - 30px));
    padding: 24px;
    border: 0;
    border-radius: var(--radius);
}

.mpesa-phone-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.mpesa-phone-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mpesa-phone-cancel {
    display: block;
    width: 100%;
    margin-top: 8px;
}

.payment-vendor-label {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--text);
}

.payment-vendor-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--brand-dark);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
}

.payment-vendor-call.hidden {
    display: none;
}

.payment-notify-panel {
    width: 100%;
    margin-top: 16px;
    text-align: left;
}

.payment-notify-heading {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
}

.payment-notify-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.payment-notify-table th,
.payment-notify-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.payment-notify-table th {
    color: var(--muted);
    font-weight: 700;
}

.checkout-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.payment-status {
    padding: 8px 0;
}

.payment-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 22px 10px;
    text-align: center;
}

.payment-state h3 {
    margin: 0;
    font-size: 1.05rem;
}

.payment-state p {
    margin: 0;
    max-width: 40ch;
    color: var(--muted);
    font-size: 0.88rem;
}

.payment-icon {
    font-size: 2.4rem;
}

.payment-icon.success {
    color: var(--success);
}

.payment-icon.error {
    color: var(--danger);
}

@media (max-width: 980px) {
    body.logged-in .request-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-activity {
        grid-template-columns: 1fr 1fr;
    }

    .desktop-nav,
    .header-link {
        display: none;
    }

    .commerce-header {
        gap: 18px;
    }

    .header-actions {
        margin-left: auto;
    }

    .request-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-activity {
        grid-template-columns: 1fr;
    }

    .request-copy {
        max-width: 760px;
    }

    .commerce-layout.with-products {
        grid-template-columns: 1fr;
    }

    .product-panel {
        position: static;
        max-height: none;
    }

    .vendor-card {
        flex-basis: min(200px, 68vw);
    }

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

    .explore-card:last-child:nth-child(3n + 1) {
        grid-column: auto;
    }

    .explore-card:last-child:nth-child(2n + 1) {
        grid-column: 1 / -1;
        width: calc((100% - 16px) / 2);
        justify-self: center;
    }
}

@media (max-width: 680px) {
    .commerce-header {
        min-height: 64px;
        padding: 0 16px;
    }

    .brand {
        font-size: 1rem;
    }

    .button {
        padding: 0 14px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-actions .button-quiet {
        display: none;
    }

    .user-menu span:last-child {
        display: none;
    }

    .request-hero {
        padding: 42px 16px 50px;
    }

    .request-copy h1 {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

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

    .signed-in-summary,
    .results-section,
    .orders-section,
    .explore-section,
    .apps-section {
        padding: 36px 16px;
    }

    .signed-in-summary {
        padding: 12px 16px;
    }

    .signed-in-summary,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid-activity {
        grid-template-columns: 1fr;
    }

    .vendor-grid,
    .app-cards,
    .footer-columns {
        grid-template-columns: 1fr;
    }

    .product-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
    }

    .product-thumb {
        width: 64px;
        height: 64px;
    }

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

    .explore-card:last-child:nth-child(3n + 1),
    .explore-card:last-child:nth-child(2n + 1) {
        grid-column: auto;
        width: auto;
        justify-self: stretch;
    }

    .explore-card {
        min-height: 0;
    }

    .explore-card-art {
        width: 72px;
        height: 72px;
        font-size: 1.65rem;
    }

    .app-card {
        grid-template-columns: 64px minmax(0, 1fr) auto;
    }

    .qr-placeholder {
        width: 64px;
        height: 64px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .field-pair {
        grid-template-columns: 1fr;
    }

    dialog {
        padding: 22px;
    }
}

body.static-page .commerce-header {
    gap: 18px;
}

body.static-page .header-actions {
    margin-left: auto;
}

.static-main {
    padding: 48px max(24px, calc((100vw - var(--max-width)) / 2)) 64px;
}

.static-main h1 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.static-intro {
    max-width: 62ch;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 1rem;
}

.legal-body {
    max-width: 760px;
}

.legal-body h2 {
    margin: 0 0 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

.legal-body h3 {
    margin: 28px 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
}

.legal-body p,
.legal-body li {
    color: #333;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.legal-body ul {
    margin: 0 0 16px;
    padding-left: 1.25rem;
}

.legal-body a {
    color: var(--brand);
    font-weight: 600;
}

.legal-body a:hover {
    color: var(--brand-dark);
}

.legal-note {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: var(--max-width);
}

.contact-card {
    display: grid;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.contact-card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 1.125rem;
}

.contact-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.contact-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.contact-card a {
    color: var(--brand);
    font-weight: 600;
}

.contact-card a:hover {
    color: var(--brand-dark);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.footer-columns a[aria-current="page"] {
    color: #fff;
}

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

@media (max-width: 680px) {
    .static-main {
        padding: 36px 16px 48px;
    }
}
