@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;650;700;750;800&display=swap');

:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --surface: #fffefa;
  --ink: #232921;
  --muted: #61685e;
  --green: #254d3b;
  --green-deep: #18392b;
  --green-tint: #e9eee6;
  --border: #dddeda;
  --danger: #8c3a33;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.055em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.3rem, 6vw, 4.8rem); font-weight: 750; }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.035em; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .56; cursor: default; }
:focus-visible { outline: 2px solid #486e59; outline-offset: 3px; }
.shell { width: min(100% - 5rem, 1320px); margin-inline: auto; }
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  width: min(100% - 5rem, 1320px);
  margin-inline: auto;
  min-height: 81px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-nav { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.55rem; letter-spacing: -.07em; font-weight: 800; text-decoration: none; line-height: 1; overflow-wrap: anywhere; min-width: 0; }
.brand-mark { color: var(--green); font-size: 1.7rem; line-height: 1; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--ink);
  background: transparent;
  line-height: 1.2;
  text-decoration: none;
}
.primary { color: white; background: var(--green); border-color: var(--green); }
.primary:hover:not(:disabled) { background: var(--green-deep); }
.secondary, .icon-button { background: var(--surface); border-color: var(--border); }
.secondary:hover:not(:disabled), .quiet:hover, .icon-button:hover { background: var(--green-tint); }
.quiet { padding-inline: 10px; }
.danger { color: var(--danger); border-color: #e0c7c2; }
.danger:hover:not(:disabled) { background: #fbefec; }
.icon-button { font-size: 1.5rem; width: 44px; padding: 0; }
.cart-count { display: grid; place-items: center; border-radius: 50%; min-width: 21px; min-height: 21px; background: #fff2; font-size: .76rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  margin-top: 32px;
  background: #e8ece4;
  border-radius: 18px;
  overflow: hidden;
}
.hero:has(.hero-image[hidden]) { display: block; }
.hero-text { padding: clamp(30px, 6vw, 88px); align-self: center; }
.hero-text p { color: #485445; max-width: 29rem; margin-top: 16px; font-size: clamp(1rem, 1.7vw, 1.16rem); }
.hero-text .button { margin-top: 26px; min-height: 48px; }
.hero-image { min-height: 335px; background: #8d9583 url('/images/mug.webp') 50% 54% / cover no-repeat; }
.catalog, .order-area { margin-top: 48px; }
.section-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.section-top > * { min-width: 0; }
.muted { color: var(--muted); }
.filters, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { margin-block: 18px 20px; }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; min-height: 39px; background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 750; }
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.product-image { display: block; width: 100%; aspect-ratio: 1.12; object-fit: cover; background: var(--green-tint); }
.image-placeholder { display: grid; place-items: center; color: var(--green); font-size: 2em; background: var(--green-tint); }
.product-content { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.eyebrow { color: var(--green); font-size: .875rem; font-weight: 750; overflow-wrap: anywhere; }
.product-description { margin-bottom: 9px; font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }
.product-bottom { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.product-bottom strong { font-size: 1.15rem; white-space: nowrap; }
.add-button { border-color: #d5e0d5; background: #edf2eb; color: var(--green-deep); min-height: 40px; padding-inline: 11px; }
.add-button:hover:not(:disabled) { background: #dce9dc; }
.site-footer { margin-top: 58px; padding-block: 22px 35px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.site-footer span { font-weight: 800; }
.notice, .empty { padding: 14px 16px; border-radius: 9px; margin-block: 12px; }
.empty { border: 1px dashed var(--border); color: var(--muted); grid-column: 1 / -1; }
.notice { background: #faeae6; color: #7b3028; }
.notice[data-type="success"] { background: var(--green-tint); color: var(--green-deep); }
.drawer { margin: 0 0 0 auto; width: min(480px, 100%); height: 100%; max-width: none; max-height: none; border: 0; background: var(--paper); color: var(--ink); padding: 0; overscroll-behavior: contain; }
.drawer::backdrop { background: #15231cb0; }
body:has(.drawer[open]) { overflow: hidden; }
.drawer-inner { padding: 24px 24px max(24px, env(safe-area-inset-bottom)); }
.drawer-heading { margin-bottom: 16px; }
.cart-line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.thumb { width: 56px; height: 56px; object-fit: cover; flex: none; border-radius: 6px; }
.stepper { display: flex; gap: 5px; align-items: center; font-weight: 750; }
.stepper button { min-width: 36px; min-height: 38px; border: 1px solid var(--border); border-radius: 7px; color: var(--green); background: var(--surface); }
.subtotal { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; }
.stack { display: grid; gap: 13px; }
.stack .button { justify-self: start; }
.stack .stretch { justify-self: stretch; }
.stack label, .filter-form label { display: block; color: #313b32; font-weight: 750; font-size: .91rem; }
.stack input:not([type="checkbox"]), .stack select, .stack textarea, .filter-form input, .filter-form select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 8px 11px;
  border: 1px solid #cdd2ca;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 1rem;
}
select { appearance: none; padding-right: 32px !important; background-image: linear-gradient(45deg, transparent 50%, #536052 50%), linear-gradient(135deg, #536052 50%, transparent 50%) !important; background-position: calc(100% - 16px) 53%, calc(100% - 11px) 53% !important; background-size: 5px 5px !important; background-repeat: no-repeat !important; }
textarea { resize: vertical; }
.checkout-note { font-size: .9rem; }
.success { display: grid; gap: 12px; padding: 24px 0; justify-items: start; }
.order-area h1, .admin-heading h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.split { display: grid; grid-template-columns: minmax(260px, .86fr) minmax(0, 1.35fr); align-items: start; gap: 20px; margin-top: 18px; }
.list { display: grid; align-content: start; gap: 8px; }
.list-row { width: 100%; display: flex; justify-content: space-between; gap: 8px 14px; align-items: center; padding: 12px 14px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--ink); overflow-wrap: anywhere; }
.list-row:hover, .list-row[aria-pressed="true"] { border-color: #6e8b79; background: #f0f4ef; }
.list-row > span { display: grid; gap: 5px; }
.list-row > span:last-child { justify-items: end; text-align: right; }
.list-row small, .line-items small { color: var(--muted); font-size: .875rem; }
.badge { display: inline-block; color: #3f5445; background: #e8eee7; font-size: .875rem; font-weight: 800; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
.badge.new { color: #684d19; background: #fbefce; }
.badge.cancelled { color: var(--danger); background: #fae8e4; }
.panel { border: 1px solid var(--border); border-radius: 14px; padding: clamp(14px, 3vw, 24px); background: var(--surface); overflow-wrap: anywhere; }
.panel > .muted { margin-block: 8px; }
.panel h3 { margin-block: 20px 10px; }
.line-items { padding: 0; margin: 14px 0 0; list-style: none; border-top: 1px solid var(--border); }
.line-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.line-items strong { white-space: nowrap; }
.thread { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 7px; }
.thread li { width: fit-content; max-width: 92%; padding: 8px 12px; background: #efeee8; border-radius: 8px; }
.thread .admin { justify-self: end; background: var(--green-tint); }
.thread span { font-size: .875rem; color: var(--muted); }
.thread p { white-space: pre-wrap; }
#customer-thread > .muted, #admin-thread > .muted { margin-bottom: 12px; }
.admin-shell { margin-block: 36px 60px; }
.tabs { display: flex; gap: 20px; align-items: center; margin: 22px 0; border-bottom: 1px solid var(--border); }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 7px 3px 10px; color: var(--muted); font-weight: 800; }
.tabs button[aria-pressed="true"] { color: var(--green-deep); border-bottom-color: var(--green); }
.filter-form { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 210px) auto; justify-content: start; align-items: end; gap: 10px; }
.facts { display: grid; gap: 7px; margin: 14px 0; }
.facts div { display: grid; grid-template-columns: minmax(80px, .55fr) 1.45fr; gap: 8px; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 700; margin: 0; white-space: pre-wrap; }
#admin-products { margin-top: 16px; }
.product-row .product-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product-cell span { display: grid; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex !important; align-items: center; gap: 8px; min-height: 40px; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }

@media (max-width: 1000px) {
  .shell, .header-inner { width: calc(100% - 3rem); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .hero-image { min-height: 250px; }
  .hero-text { padding: 30px 24px; }
}
@media (max-width: 520px) {
  .shell, .header-inner { width: calc(100% - 1.75rem); }
  .header-inner { min-height: 64px; gap: 5px; }
  .header-nav { gap: 3px; }
  .header-nav .button { font-size: .84rem; padding-inline: 8px; }
  .brand { font-size: 1.3rem; gap: 5px; }
  .brand-mark { font-size: 1.35rem; }
  .hero { margin-top: 16px; grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 1.7; min-height: 0; background-position: 50% 53%; }
  .catalog, .order-area { margin-top: 32px; }
  .product-content { padding: 11px; }
  .product-content h3 { font-size: 1.1rem; }
  .product-bottom .button { width: 100%; }
  .section-top .muted { white-space: nowrap; }
  .form-pair, .filter-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filter-form .button { justify-self: start; }
  .drawer-inner { padding-inline: 16px; }
  .site-footer { margin-top: 36px; }
}
