:root {
  color-scheme: light;
  --ink: #20342b;
  --muted: #788078;
  --green: #2f6848;
  --green-dark: #214e37;
  --cream: #f6f7f1;
  --paper: #fffefa;
  --line: #e7e9e1;
  --surface-soft: #edf2e8;
  --hero-surface: #e8eee1;
  --field: #fff;
  --field-line: #e7e9e1;
  --orange: #e49a5b;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef4ed;
  --muted: #a4b0a7;
  --green: #9acba3;
  --green-dark: #bad9b8;
  --cream: #141b17;
  --paper: #202a23;
  --line: #354138;
  --surface-soft: #29372d;
  --hero-surface: #26342a;
  --field: #1b241e;
  --field-line: #435147;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  transition: background .25s ease, color .25s ease;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.page-shell { max-width: 1440px; margin: 0 auto; padding: 0 6.1%; }
.topbar { position: relative; height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: Manrope, sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: white; font-size: 18px; }
.brand-accent { color: var(--green); }
.delivery-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.delivery-dot { width: 7px; height: 7px; border-radius: 50%; background: #65a577; box-shadow: 0 0 0 4px #65a57720; }
.developer-credit { position: absolute; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 2px; transform: translateX(-50%); }
.developer-credit strong { color: var(--green); font-family: Manrope, sans-serif; font-size: 20px; letter-spacing: 1.5px; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.welcome-user { max-width: 90px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 18px; transition: transform .18s ease, background .18s ease; }
.icon-button:hover { transform: translateY(-2px) rotate(-8deg); background: var(--surface-soft); }
.logout-button { padding: 8px; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.logout-button:hover { color: var(--green); }
.button { border: 0; border-radius: 9px; padding: 12px 16px; font-size: 12px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-dark { background: var(--ink); color: white; }
.cart-jump { display: flex; align-items: center; gap: 9px; padding: 10px 13px; }
.cart-count { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 20px; background: #ffffff25; font-size: 10px; }

.hero { position: relative; display: flex; min-height: 390px; align-items: center; justify-content: space-between; overflow: hidden; margin-top: 24px; padding: 43px 8.3%; border-radius: 15px; background: var(--hero-surface); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 13px; color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.eyebrow-line { display: inline-block; width: 17px; height: 1px; background: var(--green); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, sans-serif; }
.hero h1 { margin: 0; font-size: clamp(36px, 4.7vw, 61px); line-height: 1.14; letter-spacing: -2.7px; }
.hero h1 span { color: var(--green); }
.hero-description { max-width: 370px; margin: 15px 0 18px; color: #647367; font-size: 13px; line-height: 1.8; }
.hero-link { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 12px; font-weight: 700; }
.hero-link span { font-size: 16px; }
.hero-art { position: relative; width: min(39%, 390px); height: 280px; flex: 0 0 min(39%, 390px); }
.hero-photo { width: 100%; height: 100%; border: 7px solid #ffffffb8; border-radius: 46% 46% 18px 18px; box-shadow: 0 20px 46px #26392328; object-fit: cover; transform: rotate(2deg); }
.hero-photo-note { position: absolute; right: -17px; bottom: 12px; z-index: 2; padding: 12px 15px; border: 1px solid #ffffffa3; border-radius: 10px; background: var(--paper); box-shadow: 0 7px 20px #26392320; color: var(--ink); font-size: 10px; font-weight: 700; }
.hero-photo-note span { margin-right: 5px; color: var(--green); }
.stock-demo-note { margin: 14px 0 -29px; color: var(--muted); font-size: 9px; text-align: right; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 53px; padding: 20px 4%; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.benefit { display: flex; align-items: center; justify-content: center; gap: 12px; }
.benefit + .benefit { border-left: 1px solid var(--line); }
.benefit-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--green); font-size: 17px; font-weight: 700; }
.benefit strong, .benefit small { display: block; }
.benefit strong { font-size: 11px; }
.benefit small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; align-items: start; gap: 35px; padding-bottom: 65px; scroll-margin-top: 25px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2, .cart-heading-row h2 { margin: 0; font-size: 23px; letter-spacing: -.8px; }
.section-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.search-box { display: flex; width: 205px; flex: 0 0 205px; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: #79857c; }
.search-box span { font-size: 19px; line-height: 12px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.category-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 23px 0 17px; }
.category-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: #627067; font-size: 10px; transition: .18s ease; }
.category-button:hover, .category-button.active { border-color: var(--green); background: var(--green); color: white; }
.catalog-status { min-height: 16px; margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); animation: card-arrive .45s both; transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px #26392318; }
.product-visual { position: relative; display: grid; min-height: 124px; place-items: center; background: #f0f2e9; }
.product-card:nth-child(3n + 2) .product-visual { background: #f3eee5; }
.product-card:nth-child(3n) .product-visual { background: #eaf0e9; }
.product-photo { width: 100%; height: 154px; object-fit: cover; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.product-card:hover .product-photo { transform: scale(1.055); }
.product-emoji { font-size: 47px; filter: drop-shadow(0 6px 6px #26392313); }
.product-tag { position: absolute; z-index: 2; top: 9px; left: 9px; padding: 5px 7px; border-radius: 20px; background: #fffefaeb; color: var(--green); font-size: 8px; font-weight: 700; }
.product-info { padding: 12px 11px 11px; }
.product-category { margin: 0 0 5px; color: #879087; font-size: 8px; }
.product-name { margin: 0; overflow: hidden; font-family: Manrope, sans-serif; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.product-description { min-height: 27px; margin: 5px 0 11px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.product-buy-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.product-price { font-size: 13px; font-weight: 700; }
.product-unit { color: var(--muted); font-size: 8px; font-weight: 400; }
.product-actions { display: flex; align-items: center; gap: 5px; }
.add-button, .details-button { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border: 1px solid #cbd9cc; border-radius: 6px; background: var(--field); color: var(--green); font-size: 9px; font-weight: 700; }
.add-button:hover, .details-button:hover { border-color: var(--green); background: var(--surface-soft); }
.add-button span { font-size: 13px; }
.no-products { grid-column: 1 / -1; padding: 30px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.product-open-button { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; }
.product-open-button:focus-visible { outline: 3px solid var(--green); outline-offset: -5px; }
.product-visual:has(.product-photo) { overflow: hidden; background: var(--surface-soft); }
.product-photo + .product-open-button + .product-tag { z-index: 2; }
.product-image-wrap { position: absolute; inset: 0; overflow: hidden; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.product-card:hover .product-image-wrap img { transform: scale(1.07); }
.product-image-wrap .product-emoji { position: absolute; right: 10px; bottom: 8px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #ffffff80; border-radius: 50%; background: #ffffffd9; font-size: 19px; }
.product-detail-button { border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.product-detail-button:hover { color: var(--green); }
.dialog-add-button { width: 100%; margin-top: 4px; background: var(--green); color: var(--cream); }
.product-dialog { width: min(440px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #101a1466; }
.product-dialog::backdrop { background: #10191499; backdrop-filter: blur(4px); }
.product-dialog[open] { animation: dialog-arrive .3s cubic-bezier(.2,.8,.2,1); }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #ffffffa8; border-radius: 50%; background: #18251dcc; color: white; font-size: 23px; }
.dialog-photo { display: grid; height: 224px; place-items: center; overflow: hidden; background: var(--surface-soft); }
.dialog-photo img { width: 100%; height: 100%; object-fit: cover; }
.dialog-photo .product-emoji { font-size: 70px; }
.dialog-content { padding: 21px 23px 24px; }
.dialog-content .product-category { font-size: 10px; }
.dialog-content h2 { margin: 4px 0 8px; font-size: 23px; letter-spacing: -.5px; }
.dialog-description { color: var(--muted); font-size: 12px; line-height: 1.7; }
.product-date-list { display: grid; gap: 9px; margin: 17px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); }
.product-date-row { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.product-date-row span { color: var(--muted); }
.product-date-row strong { text-align: right; }
.sample-date-note { margin: 12px 0 0; color: #a17a4f; font-size: 9px; line-height: 1.5; }
.login-screen { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; overflow: auto; padding: 20px; background: radial-gradient(ellipse at 18% 82%, #cbdcc246, transparent 38%), radial-gradient(ellipse at 88% 18%, #ddc39c50, transparent 34%), var(--cream); }
.login-screen[hidden], [hidden] { display: none !important; }
.login-card { position: relative; width: min(410px, 100%); padding: 39px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 22px 65px #20342b12; animation: dialog-arrive .55s both; }
.login-brand-mark { width: 43px; height: 43px; margin-bottom: 31px; border-radius: 13px 13px 13px 4px; font-size: 23px; }
.login-card .eyebrow { margin-bottom: 10px; }
.login-card h1 { margin: 0; font-size: 32px; line-height: 1.18; letter-spacing: -1.4px; }
.login-card h1 span { color: var(--green); }
.login-description { margin: 12px 0 24px; color: var(--muted); font-size: 12px; }
.login-card label { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 700; }
.login-card input { width: 100%; margin-bottom: 12px; padding: 12px; border: 1px solid var(--field-line); border-radius: 8px; outline: 0; background: var(--field); color: var(--ink); font-size: 12px; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #2f684812; }
.button-green { background: var(--green); color: var(--cream); }
.login-submit { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; padding: 13px; }
.login-note { margin: 15px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

@keyframes card-arrive { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dialog-arrive { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.cart-panel { position: sticky; top: 18px; padding: 20px 17px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.cart-heading-row { display: flex; align-items: center; justify-content: space-between; }
.cart-heading-row .eyebrow { margin-bottom: 8px; font-size: 8px; }
.cart-heading-row h2 { font-size: 17px; }
.cart-heading-row h2 span { color: var(--muted); font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.cart-bag { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--surface-soft); font-size: 17px; }
.cart-items { max-height: 280px; overflow-y: auto; margin: 18px 0 9px; }
.empty-cart { display: flex; min-height: 128px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.empty-cart > span { margin-bottom: 2px; font-size: 25px; }
.empty-cart strong { color: var(--ink); font-size: 10px; }
.empty-cart small { font-size: 9px; }
.cart-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f0f0eb; }
.cart-row-emoji { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: #f0f2e9; font-size: 18px; }
.cart-row-name { overflow: hidden; margin: 0 0 4px; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cart-row-price { margin: 0; color: var(--muted); font-size: 8px; }
.quantity-control { display: flex; align-items: center; gap: 6px; }
.quantity-button { display: grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--green); font-size: 13px; }
.quantity-value { min-width: 10px; font-size: 9px; text-align: center; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: #9c6252; font-size: 9px; }
.clear-cart { margin: 0 0 9px; }
.cart-total { display: flex; align-items: center; justify-content: space-between; padding: 13px 0 6px; border-top: 1px solid var(--line); font-size: 11px; }
.cart-total strong { font-size: 16px; }
.delivery-caption { margin: 0 0 18px; color: var(--muted); font-size: 8px; }
.checkout-form { display: flex; flex-direction: column; }
.checkout-form h3 { margin: 0 0 13px; font-size: 13px; }
.checkout-form label { margin: 0 0 5px; font-size: 9px; font-weight: 700; }
.checkout-form label span { color: var(--muted); font-weight: 400; }
.checkout-form input, .checkout-form textarea { width: 100%; margin-bottom: 11px; padding: 9px 10px; border: 1px solid var(--field-line); border-radius: 6px; outline: 0; background: var(--field); color: var(--ink); font-size: 10px; resize: vertical; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color: #8ca992; box-shadow: 0 0 0 3px #2f684812; }
.checkout-form input::placeholder, .checkout-form textarea::placeholder { color: #a0a79f; }
.checkout-button { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 3px; padding: 12px; background: var(--green); color: var(--cream); }
.checkout-button:hover:not(:disabled) { background: var(--green-dark); }
.checkout-button:disabled { cursor: not-allowed; opacity: .46; }
.checkout-message { min-height: 14px; margin: 9px 0 0; color: var(--green); font-size: 9px; line-height: 1.5; }
.checkout-message.error { color: #a34436; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.footer-brand { color: var(--ink); font-size: 14px; }
.footer-brand .brand-mark { width: 25px; height: 25px; border-radius: 8px 8px 8px 2px; font-size: 15px; }
.footer p { margin: 0; }
.footer p strong { color: var(--green); }

@media (max-width: 1000px) {
  .page-shell { padding-right: 4%; padding-left: 4%; }
  .shop-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 22px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-right: 6%; padding-left: 6%; }
}

@media (max-width: 720px) {
  .topbar { height: 68px; }
  .developer-credit { left: 48%; font-size: 7px; letter-spacing: 1px; }
  .developer-credit strong { font-size: 15px; }
  .welcome-user { display: none; }
  .header-actions { gap: 5px; }
  .logout-button { display: none; }
  .hero { min-height: 310px; padding: 35px 7%; }
  .hero-art { width: 34%; height: 205px; flex-basis: 34%; }
  .hero-photo { border-width: 4px; }
  .hero-photo-note { right: -9px; bottom: 7px; padding: 8px 9px; font-size: 8px; }
  .stock-demo-note { margin: 12px 0 -20px; font-size: 8px; }
  .benefits { margin-bottom: 39px; padding: 16px 2%; }
  .benefit { gap: 7px; }
  .benefit-icon { width: 28px; height: 28px; font-size: 14px; }
  .benefit strong { font-size: 9px; }
  .benefit small { font-size: 8px; }
  .shop-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; grid-row: 1; }
  .catalog { grid-row: 2; }
  .cart-items { max-height: 200px; }
}

@media (max-width: 520px) {
  .page-shell { padding-right: 18px; padding-left: 18px; }
  .brand { font-size: 17px; }
  .topbar > .brand { gap: 6px; font-size: 15px; }
  .topbar > .brand .brand-mark { width: 26px; height: 26px; font-size: 15px; }
  .developer-credit { left: 49%; font-size: 6px; }
  .developer-credit strong { font-size: 12px; }
  .icon-button { width: 32px; height: 32px; }
  .cart-jump { gap: 5px; padding: 8px; font-size: 10px; }
  .header-actions { gap: 4px; }
  .hero { min-height: 285px; padding: 29px 7%; }
  .hero h1 { font-size: 37px; letter-spacing: -1.7px; }
  .hero-description { max-width: 235px; font-size: 11px; }
  .hero-art { position: absolute; right: -30px; bottom: -25px; width: 145px; height: 155px; opacity: .48; }
  .hero-copy { max-width: 280px; }
  .benefits { gap: 8px; padding: 13px 8px; }
  .benefit { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; padding-left: 8px; }
  .benefit + .benefit { padding-left: 12px; }
  .benefit small { line-height: 1.3; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h2 { font-size: 20px; }
  .search-box { width: 100%; flex-basis: auto; }
  .product-grid { gap: 9px; }
  .product-visual { min-height: 105px; }
  .product-emoji { font-size: 39px; }
  .product-info { padding: 10px 8px; }
  .product-name { font-size: 10px; }
  .product-description { font-size: 8px; }
  .product-photo { height: 105px; }
  .product-buy-row { align-items: flex-start; flex-direction: column; }
  .add-button { width: 100%; justify-content: center; }
  .product-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .details-button { justify-content: center; }
  .footer { align-items: flex-start; flex-wrap: wrap; }
  .footer p { order: 2; width: 100%; }
  .login-card { padding: 29px; }
}
