:root {
    --ink: #151515;
    --muted: #667085;
    --line: #e6e8ec;
    --soft: #f6f7f9;
    --paper: #ffffff;
    --brand: #e24d22;
    --brand-dark: #b93816;
    --brand-soft: #fff2ed;
    --green: #16794c;
    --shadow: 0 14px 34px rgba(16, 24, 40, 0.10);
    --radius: 8px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: #fbfbfa;
    line-height: 1.5;
    padding-top: 72px;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.navbar-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
}

.logo span {
    font-size: 1.35rem;
}

.logo small {
    margin-top: 5px;
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border-radius: var(--radius);
    color: #344054;
    font-size: 0.9rem;
    font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
    background: #f1f2f4;
    color: var(--ink);
}

.cart-link {
    position: relative;
}

.cart-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 0.72rem;
}

.cart-badge:not(.show) {
    display: none;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--soft);
    color: var(--ink);
    font-size: 22px;
}

.main-content {
    min-height: calc(100vh - 260px);
}

.home-hero {
    background: #111;
    color: #fff;
    padding: 56px 0 64px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 12px;
}

.hero-copy h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-product {
    position: relative;
    min-height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #222;
    box-shadow: var(--shadow);
}

.hero-product img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.hero-product::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.hero-product-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
}

.hero-product-info span,
.hero-product-info em {
    display: block;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    font-style: normal;
}

.hero-product-info strong {
    display: block;
    margin: 4px 0;
    font-size: 1.35rem;
    line-height: 1.15;
}

.metrics-strip {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metrics-grid div {
    padding: 22px 18px;
    border-left: 1px solid var(--line);
}

.metrics-grid div:last-child {
    border-right: 1px solid var(--line);
}

.metrics-grid strong {
    display: block;
    font-size: 1.45rem;
}

.metrics-grid span {
    color: var(--muted);
    font-size: 0.88rem;
}

.section {
    padding: 56px 0;
}

.section-muted {
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-text {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 680px;
}

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

.vendor-card {
    min-height: 128px;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.vendor-card:hover {
    border-color: #cfd4dc;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
}

.vendor-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: #fff2ed;
    color: var(--brand);
    font-size: 21px;
}

.vendor-card strong {
    font-size: 1.05rem;
}

.vendor-card small {
    color: var(--muted);
}

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

.products-grid-spaced {
    margin-top: 18px;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-card:hover {
    border-color: #cfd4dc;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.09);
}

.product-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eef0f3;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.035);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
    font-size: 42px;
    background: #f0f2f5;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 6px;
    background: #111;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.product-vendor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
}

.product-vendor.large {
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.product-card-name {
    margin: 8px 0 0;
    font-size: 1rem;
    line-height: 1.25;
}

.product-card-desc {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price-current,
.detail-price-current {
    display: block;
    color: var(--ink);
    font-weight: 850;
}

.price-original,
.detail-price-original {
    color: #98a2b3;
    font-size: 0.82rem;
    text-decoration: line-through;
}

.btn-add-cart {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    font-size: 20px;
}

.btn-add-cart:hover {
    background: var(--brand);
}

.button-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    color: currentColor;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1;
}

.btn-add-cart .button-symbol {
    transform: translateY(-1px);
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: var(--radius);
    font-weight: 750;
    border: 1px solid transparent;
}

.btn-sm {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.88rem;
}

.btn-lg {
    min-height: 50px;
    padding: 0 20px;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-secondary,
.btn-outline {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.btn-secondary:hover,
.btn-outline:hover,
.btn-ghost:hover {
    background: #f1f2f4;
}

.btn-ghost {
    color: #344054;
    background: transparent;
}

.btn-block {
    width: 100%;
}

.split-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 32px;
    align-items: start;
}

.workflow-list {
    display: grid;
    gap: 10px;
}

.workflow-list div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 700;
}

.workflow-list i {
    color: var(--brand);
    font-size: 22px;
}

.menu-page,
.cart-page,
.checkout-page,
.auth-page,
.product-detail {
    padding: 38px 0 64px;
}

.menu-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
    gap: 22px;
    align-items: end;
    margin-bottom: 20px;
}

.menu-hero h1,
.page-title,
.product-detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.menu-hero p {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 600px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 6px 6px 6px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.search-bar input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
}

.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
    display: none;
}

.filter-row.compact {
    margin-bottom: 10px;
}

.filter-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #344054;
    font-size: 0.88rem;
    font-weight: 750;
}

.filter-chip.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.menu-results {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9rem;
}

.menu-results strong {
    color: var(--ink);
}

.empty-state,
.cart-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 54px 18px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.empty-state i,
.cart-empty i {
    color: #98a2b3;
    font-size: 44px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb span {
    color: var(--ink);
    font-weight: 700;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.72fr);
    gap: 34px;
    align-items: start;
}

.product-detail-image {
    overflow: hidden;
    border-radius: var(--radius);
    background: #eef0f3;
    border: 1px solid var(--line);
}

.product-detail-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-detail-info {
    position: sticky;
    top: 96px;
}

.product-detail-info p {
    color: var(--muted);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 11px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    color: #344054;
    font-size: 0.86rem;
    font-weight: 700;
}

.product-detail-price {
    margin: 22px 0;
}

.detail-price-current {
    font-size: 2rem;
}

.quantity-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 750;
}

.qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--ink);
}

.qty-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.qty-value,
.cart-qty-value {
    width: 46px;
    text-align: center;
    border: 0;
    font-weight: 800;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.related-products-section {
    padding-bottom: 0;
}

.cart-grid,
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 20px;
    align-items: start;
    margin-top: 22px;
}

.cart-items {
    display: grid;
    gap: 10px;
}

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

.cart-item-image {
    width: 82px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name,
.checkout-item-name {
    font-weight: 800;
}

.cart-item-price,
.checkout-item-qty {
    color: var(--muted);
    font-size: 0.88rem;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-item-subtotal {
    font-weight: 850;
}

.cart-item-remove {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: #fff1f0;
    color: #b42318;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.cart-item-remove:hover {
    background: #fee4e2;
}

.cart-summary,
.checkout-form,
.auth-card {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.cart-summary {
    position: sticky;
    top: 96px;
}

.cart-summary h3,
.checkout-form h2 {
    margin: 0 0 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: #344054;
}

.summary-row.total {
    margin-bottom: 16px;
    border-bottom: 0;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 850;
}

.summary-link {
    width: 100%;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 0.88rem;
    font-weight: 750;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    outline: none;
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(226, 77, 34, 0.14);
}

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

.payment-option {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.payment-option input {
    display: none;
}

.payment-option.selected {
    border-color: var(--brand);
    background: #fff5f1;
}

.pay-label {
    font-weight: 800;
}

.pay-desc {
    color: var(--muted);
    font-size: 0.8rem;
}

.payment-notice {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: #eef6ff;
    color: #175cd3;
    font-size: 0.88rem;
}

.is-hidden {
    display: none !important;
}

.checkout-order-items {
    display: grid;
    gap: 10px;
}

.checkout-order-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.checkout-item-total {
    font-weight: 800;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 320px);
}

.auth-card {
    width: min(430px, 100%);
}

.auth-card h1 {
    margin: 0 0 16px;
}

.auth-submit {
    width: 100%;
}

.footer {
    padding: 36px 0 22px;
    background: #111;
    color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 850;
}

.footer h4 {
    margin: 0 0 12px;
    color: #fff;
}

.footer a,
.footer p {
    display: block;
    margin: 7px 0;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.86rem;
}

.toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #111;
    color: #fff;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.toast.error {
    background: #b42318;
}

.toast.success {
    background: #067647;
}

.scroll-to-top {
    position: fixed;
    right: 18px;
    bottom: -52px;
    z-index: 70;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    opacity: 0;
    transition: all 0.2s ease;
}

.scroll-to-top.visible {
    bottom: 18px;
    opacity: 1;
}

.mt-md { margin-top: 14px; }
.mt-lg { margin-top: 22px; }
.icon-md { font-size: 18px; }

@media (max-width: 980px) {
    .hero-shell,
    .menu-hero,
    .product-detail-grid,
    .cart-grid,
    .checkout-grid,
    .split-panel {
        grid-template-columns: 1fr;
    }

    .hero-product,
    .hero-product img {
        min-height: 340px;
    }

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

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

    .product-detail-info,
    .cart-summary {
        position: static;
    }

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

@media (max-width: 760px) {
    body {
        padding-top: 64px;
    }

    .navbar-inner {
        height: 64px;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        display: grid;
        gap: 4px;
        padding: 8px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: all 0.2s ease;
    }

    .nav-links.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-link {
        justify-content: flex-start;
    }

    .home-hero {
        padding: 38px 0 46px;
    }

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

    .cart-item {
        grid-template-columns: 68px minmax(0, 1fr) 42px;
        align-items: start;
    }

    .cart-item-image {
        width: 68px;
    }

    .cart-item-qty,
    .cart-item-subtotal {
        grid-column: 2 / 4;
    }

    .cart-item-remove {
        grid-column: 3;
        grid-row: 1;
    }

    .payment-options,
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1160px);
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .products-grid,
    .vendor-grid,
    .metrics-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid div,
    .metrics-grid div:last-child {
        border-right: 1px solid var(--line);
    }

    .search-bar {
        flex-wrap: wrap;
    }

    .search-bar .btn {
        width: 100%;
    }
}
