:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #223126; background: #f7f4ec; }
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; }
.site-header { padding: 20px max(24px, calc((100% - 1050px) / 2)); background: #fff; border-bottom: 1px solid #dfe5dc; }
.site-header a { color: #214d32; font-weight: 800; text-decoration: none; }
.container { width: min(1050px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 90px 0 48px; max-width: 680px; }
.eyebrow { color: #2f6b45; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -.05em; }
p { color: #627067; font-size: 1.08rem; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-block; padding: 11px 16px; border-radius: 8px; background: #2f6b45; color: #fff; font-weight: 700; text-decoration: none; }
.button.secondary { background: #e8efe7; color: #214d32; }
.api-card { margin-bottom: 60px; padding: 25px; border: 1px solid #dfe5dc; border-radius: 14px; background: #fff; }
code { color: #2f6b45; font-weight: 700; }

/* Blazor marketplace UI */
body { color: #223126; background: #f7f4ec; }
a { color: #28643f; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid #e2e8df; backdrop-filter: blur(8px); }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { color: #214d32; font-size: 1.45rem; font-weight: 850; letter-spacing: -.07em; text-decoration: none; }
.brand span { color: #7eab57; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { font-weight: 700; text-decoration: none; }
.cart-link { white-space: nowrap; color: #214d32; }
.cart-trigger { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: #2f6b45; color: #fff; font-size: .75rem; }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; border: 1px solid #cbd8c7; border-radius: 99px; background: #f4f7f1; color: #214d32; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 750; }
.theme-toggle-icon { position: relative; width: 30px; height: 18px; border-radius: 99px; background: #b9c8b4; transition: background .2s ease; }
.theme-toggle-icon::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
[data-theme="dark"] .theme-toggle-icon { background: #7eab57; }
[data-theme="dark"] .theme-toggle-icon::after { transform: translateX(12px); }
.section { padding-top: 42px; padding-bottom: 62px; }
.hero { max-width: none; padding: 75px 0 60px; background: linear-gradient(115deg, #e5efdd, #f7f4ec 60%); }
.hero .container { max-width: 1050px; }
.hero h1 { max-width: 700px; font-size: clamp(2.3rem, 6vw, 4.3rem); }
.hero p { max-width: 620px; margin: 14px 0 25px; }
.search, .catalog-filters { display: flex; gap: 10px; align-items: center; }
.search select, .catalog-filters select, .catalog-filters input, .quantity input { min-height: 45px; border: 1px solid #cfdacb; border-radius: 8px; background: #fff; padding: 0 12px; color: #223126; font: inherit; }
.search select { width: min(370px, 100%); }
.catalog-filters { padding: 16px; margin: 24px 0 28px; border: 1px solid #dde7d9; border-radius: 12px; background: #fff; }
.catalog-filters input { flex: 1 1 320px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.section-heading h1, .section-heading h2 { font-size: clamp(1.75rem, 4vw, 2.45rem); letter-spacing: -.04em; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 8px 0 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { overflow: hidden; border: 1px solid #dfe8da; border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(32,63,40,.04); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(32,63,40,.1); }
.card-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.card-image, .image-large, .cart-page-image { display: grid; place-items: center; background: #e0edd9; }
.card-image { min-height: 155px; font-size: 4rem; }
.card-body { padding: 18px; }
.card-body h3 { margin: 0; font-size: 1.12rem; }
.meta { color: #6c786f; font-size: .93rem; }
.card-body .meta { margin: 9px 0 5px; }
.distance { margin: 0 0 9px; color: #52745b; font-size: .84rem; font-weight: 650; }
.price { color: #28643f; font-size: 1.05rem; font-weight: 800; }
.results-count { margin: 0 0 18px; color: #52655a; font-size: .9rem; }
.product-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 34px; align-items: start; }
.image-large { min-height: 420px; border-radius: 16px; font-size: 9rem; }
.panel { padding: 31px; border: 1px solid #dfe8da; border-radius: 16px; background: #fff; }
.panel h1 { margin: 12px 0 18px; font-size: clamp(2rem, 4vw, 3.2rem); }
.panel > p:not(.meta) { margin-bottom: 24px; }
.tag { display: inline-block; padding: 4px 9px; border-radius: 99px; background: #e7f0e3; color: #3b6847; font-size: .78rem; font-weight: 750; }
.large-price { margin: 20px 0 27px; font-size: 1.75rem; }
.seller-line { display: flex; justify-content: space-between; align-items: center; padding: 19px 0; border-top: 1px solid #e4eae2; }
.contact-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #254d34; background: #e8f0e5; text-decoration: none; font-size: 1.25rem; }
.quantity { display: flex; align-items: center; gap: 12px; margin: 4px 0 20px; }
.quantity input { width: 94px; }
.full-width { width: 100%; border: 0; cursor: pointer; font: inherit; }
.success-message { margin: 12px 0 0; color: #28643f; text-align: center; font-weight: 700; font-size: .93rem; }
.cart-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.cart-page-item { display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; margin-bottom: 14px; border: 1px solid #dfe8da; border-radius: 14px; background: #fff; }
.cart-page-image { width: 95px; height: 95px; border-radius: 10px; font-size: 2.6rem; }
.cart-page-info h2 { margin: 7px 0 3px; font-size: 1.12rem; }
.cart-page-info p { margin: 0; }
.text-button { margin-top: 9px; padding: 0; border: 0; background: transparent; color: #a13f3b; cursor: pointer; font: inherit; text-decoration: underline; }
.cart-page-controls { display: grid; justify-items: end; gap: 13px; white-space: nowrap; }
.quantity-stepper { display: inline-flex; align-items: center; border: 1px solid #dce6d8; border-radius: 9px; overflow: hidden; }
.quantity-stepper button { width: 34px; height: 34px; border: 0; background: #f2f6ef; color: #28643f; cursor: pointer; font-size: 1.15rem; }
.quantity-stepper b { min-width: 38px; text-align: center; font-size: .9rem; }
.order-sidebar { position: sticky; top: 92px; padding: 23px; border: 1px solid #dfe8da; border-radius: 14px; background: #fff; }
.order-sidebar h2 { margin: 0 0 18px; font-size: 1.23rem; }
.order-sidebar > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: #52655a; }
.order-total { margin-top: 7px; border-top: 1px solid #e1e8df; color: #223126 !important; font-size: 1.05rem; }
.delivery-note { color: #6c786f; font-size: .85rem; text-align: right; }
.checkout-button { width: 100%; margin-top: 15px; border: 0; cursor: pointer; text-align: center; font: inherit; }
.checkout-button:disabled { cursor: not-allowed; opacity: .6; }
.payment-note { margin: 15px 0 0; font-size: .82rem; }
.empty-state { margin: 35px auto; max-width: 540px; padding: 38px; border: 1px dashed #b7cbb4; border-radius: 14px; background: #fff; text-align: center; }
.empty-state h1, .empty-state h2 { font-size: 1.7rem; }
.continue-link { font-weight: 750; text-decoration: none; white-space: nowrap; }
footer { padding: 28px 0; background: #254b33; color: #eff6eb; font-size: .9rem; }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; justify-items: end; background: rgba(24, 38, 28, .45); }
.cart-modal { width: min(500px, 100%); height: 100%; overflow-y: auto; padding: 28px; background: #fff; box-shadow: -10px 0 35px rgba(20, 42, 28, .2); }
.modal-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.modal-header h2 { margin: 3px 0 0; font-size: 1.65rem; letter-spacing: -.04em; }
.modal-header h2 span { color: #4e774f; }
.modal-kicker { margin: 0; color: #688069; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eff4ec; color: #254d34; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.cart-progress { display: flex; align-items: center; gap: 8px; margin: 25px 0; color: #718071; font-size: .84rem; }
.cart-progress i { flex: 1; max-width: 55px; height: 1px; background: #cad7c7; }
.progress-dot { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #2f6b45; color: #fff; font-size: .75rem; }
.seller-cart-group { padding: 16px 0; border-top: 1px solid #e2eae0; }
.seller-cart-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.seller-cart-heading strong, .seller-cart-heading span { display: block; }
.seller-cart-heading span { margin-top: 3px; color: #708070; font-size: .82rem; }
.seller-status { padding: 4px 7px; border-radius: 99px; background: #e6f1e3; color: #3b7045 !important; font-weight: 700; font-size: .72rem !important; }
.mini-cart-item { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.mini-product { display: grid; place-items: center; width: 55px; height: 55px; border-radius: 9px; background: #e4efdf; font-size: 1.8rem; }
.cart-item-info strong, .cart-item-info span { display: block; }
.cart-item-info > span { margin: 3px 0 8px; color: #718071; font-size: .82rem; }
.item-price { display: grid; justify-items: end; gap: 8px; font-size: .92rem; }
.remove-item { padding: 0; border: 0; background: transparent; color: #a34a45; cursor: pointer; font: inherit; font-size: .78rem; text-decoration: underline; }
.checkout-summary { margin-top: 6px; padding: 15px 0; border-top: 1px solid #dfe8dc; border-bottom: 1px solid #dfe8dc; }
.checkout-summary > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: #5d6c60; font-size: .9rem; }
.checkout-summary .order-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid #e5ece3; color: #223126; }
.continue-shopping { display: block; width: 100%; margin: 13px 0 20px; border: 0; background: transparent; color: #315f3f; cursor: pointer; font: inherit; font-weight: 700; text-align: center; }
.checkout-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; color: #6c7b6e; font-size: .73rem; text-align: center; }
.drawer-empty { padding: 25px 5px; color: #69776c; text-align: center; }
.farmer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.farmer-card { display: flex; gap: 17px; align-items: center; padding: 21px; border: 1px solid #dfe8da; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.farmer-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(32,63,40,.1); }
.farmer-emoji, .profile-emoji { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #e2eedc; }
.farmer-emoji { width: 65px; height: 65px; font-size: 2rem; }
.farmer-card h2 { margin: 0; font-size: 1.16rem; }
.farmer-card p { margin: 4px 0; font-size: .9rem; }
.farmer-card span:last-child { color: #4a704f; font-size: .82rem; font-weight: 700; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #32764c; color: #fff; font-size: .7rem; vertical-align: 2px; }
.farmer-profile { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 27px; align-items: start; padding: 30px; border: 1px solid #dfe8da; border-radius: 16px; background: #fff; }
.profile-emoji { width: 135px; height: 135px; font-size: 4.5rem; }
.farmer-profile h1 { margin: 9px 0; font-size: clamp(2rem, 4vw, 3.1rem); }
.farmer-profile p { max-width: 690px; }
.profile-owner { margin: 0; color: #56705a; font-weight: 700; }
.farmer-products-heading { margin-top: 42px; }

/* Night mode */
[data-theme="dark"] body { color: #e5ede2; background: #131a15; }
[data-theme="dark"] a { color: #9dcb79; }
[data-theme="dark"] p, [data-theme="dark"] .meta, [data-theme="dark"] .results-count, [data-theme="dark"] .delivery-note,
[data-theme="dark"] .payment-note, [data-theme="dark"] .drawer-empty, [data-theme="dark"] .profile-owner { color: #aab8ac; }
[data-theme="dark"] .topbar { background: rgba(20,28,22,.96); border-color: #344139; }
[data-theme="dark"] .brand, [data-theme="dark"] .cart-link { color: #dcebd7; }
[data-theme="dark"] .button.secondary { background: #2d3c31; color: #dcebd7; }
[data-theme="dark"] .theme-toggle { border-color: #465549; background: #253129; color: #e5ede2; }
[data-theme="dark"] .hero { background: linear-gradient(115deg, #253329, #131a15 60%); }
[data-theme="dark"] .card, [data-theme="dark"] .panel, [data-theme="dark"] .catalog-filters,
[data-theme="dark"] .cart-page-item, [data-theme="dark"] .order-sidebar, [data-theme="dark"] .empty-state,
[data-theme="dark"] .cart-modal, [data-theme="dark"] .farmer-card, [data-theme="dark"] .farmer-profile,
[data-theme="dark"] .api-card { border-color: #344139; background: #1d2720; box-shadow: none; }
[data-theme="dark"] .card-image, [data-theme="dark"] .image-large, [data-theme="dark"] .cart-page-image,
[data-theme="dark"] .mini-product, [data-theme="dark"] .farmer-emoji, [data-theme="dark"] .profile-emoji { background: #2a3b2e; }
[data-theme="dark"] .search select, [data-theme="dark"] .catalog-filters select,
[data-theme="dark"] .catalog-filters input, [data-theme="dark"] .quantity input { border-color: #465549; background: #151d17; color: #e5ede2; }
[data-theme="dark"] .tag, [data-theme="dark"] .contact-icon, [data-theme="dark"] .seller-status,
[data-theme="dark"] .modal-close, [data-theme="dark"] .quantity-stepper button { background: #2b3e2f; color: #a9d586; }
[data-theme="dark"] .seller-line, [data-theme="dark"] .seller-cart-group, [data-theme="dark"] .checkout-summary,
[data-theme="dark"] .checkout-summary .order-total, [data-theme="dark"] .order-total { border-color: #344139; }
[data-theme="dark"] .order-sidebar > div, [data-theme="dark"] .checkout-summary > div,
[data-theme="dark"] .seller-cart-heading span, [data-theme="dark"] .cart-item-info > span,
[data-theme="dark"] .checkout-trust, [data-theme="dark"] .cart-progress { color: #9eada1; }
[data-theme="dark"] .order-total, [data-theme="dark"] .checkout-summary .order-total { color: #e5ede2 !important; }
[data-theme="dark"] footer { background: #0c120e; }
[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.62); }

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1050px); }
  .nav { min-height: 60px; }
  .nav-links { gap: 10px; }
  .nav-links .button { display: none; }
  .theme-toggle-text { display: none; }
  .theme-toggle { padding-right: 7px; }
  .hero { padding: 52px 0 45px; }
  .search, .catalog-filters { align-items: stretch; flex-direction: column; }
  .search select { width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-image { min-height: 112px; font-size: 3rem; }
  .card-body { padding: 13px; }
  .card-body h3 { font-size: 1rem; }
  .product-layout, .cart-page-layout { grid-template-columns: 1fr; gap: 20px; }
  .image-large { min-height: 260px; font-size: 6rem; }
  .panel { padding: 23px; }
  .order-sidebar { position: static; }
  .cart-page-item { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .cart-page-image { width: 70px; height: 70px; font-size: 2rem; }
  .cart-page-controls { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cart-modal { padding: 22px 17px; }
  .farmer-grid { grid-template-columns: 1fr; }
  .farmer-profile { grid-template-columns: 1fr; padding: 22px; }
  .profile-emoji { width: 100px; height: 100px; font-size: 3.4rem; }
}
