:root {
  color: #163b3b;
  background: #f4f4ed;
  font: 1rem/1.5 system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; }

main {
  max-width: 90rem;
  margin: auto;
  padding: clamp(1rem, 4vw, 3rem);
}

section {
  border: 1px solid #d9e0d5;
  border-radius: 1.2rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: #fffefa;
  box-shadow: 0 8px 32px #183e3210;
}

.shop-header {
  overflow: hidden;
  border-radius: clamp(1rem, 3vw, 2rem);
  background: radial-gradient(ellipse at 78% 42%, #235448, transparent 65%), #102e29;
  color: #faf8ed;
}
.masthead {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid #a2cbb748;
}
.masthead a { color: #f5f9ee; }
.wordmark { display: inline-flex; gap: .55rem; align-items: center; font-weight: 750; text-decoration: none; }
.mark { width: 1.35rem; height: 1.35rem; background: #bcf2d7; border-radius: .35rem; display: inline-block; }
.mark::before { content: ""; display: block; width: .6rem; height: .42rem; border-inline-start: 2px solid #143932; border-bottom: 2px solid #143932; transform: translate(.33rem, .36rem) rotate(-45deg); }
.hero { display: grid; grid-template-columns: 1fr; align-items: center; padding: clamp(1.2rem, 4.5vw, 4rem); gap: .75rem; }
.hero img { width: 100%; height: auto; max-height: 23rem; object-fit: contain; }
.hero h1 { font-size: clamp(2rem, 5vw, 4.7rem); line-height: 1.04; letter-spacing: -.055em; text-wrap: balance; }
.eyebrow { color: #b7ead1; font-size: .8rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.hero-lead { max-width: 37ch; color: #d5e9de; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-cta { display: inline-block; padding: .7rem 1rem; border-radius: 100vw; background: #c2f1d9; color: #153b32; font-weight: 750; text-decoration: none; }
.shop-header :focus-visible { outline-color: #f4d4ff; }
@media (min-width: 49rem) { .hero { grid-template-columns: 1.02fr 1fr; } }
.orders-title { display: none; margin-block: 1rem; font-size: clamp(1.8rem, 5vw, 3.5rem); line-height: 1.12; letter-spacing: -.035em; }
[data-page="orders"] .orders-title { display: block; }
[data-page="orders"] :is(.hero, #catalog-section, #cart-section, #cookie-settings, #cookie-banner) { display: none; }
[data-page="orders"] .workspace { grid-template-columns: 1fr; }
h1, h2, h3 { margin-block: 0 .6em; }
h2 { font-size: 1.4rem; }

nav { display: flex; justify-content: end; flex-wrap: wrap; gap: 1rem; }
a { color: #185b55; text-underline-offset: .15em; }
a[aria-current] { font-weight: 750; text-decoration: none; }

.notice, #status:not(:empty) {
  padding: .65rem .9rem;
  border-inline-start: .25rem solid #58418c;
  background: #f1ebf8;
  border-radius: .6rem;
}

#status:empty { margin: 0; }

#cart-toast {
  position: fixed;
  z-index: 5;
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  width: min(22rem, calc(100% - 2rem));
  display: grid;
  gap: .2rem;
  padding: .8rem 1rem;
  border: 1px solid #83bda7;
  border-radius: .85rem;
  background: #102e29;
  box-shadow: 0 12px 36px #102e2940;
  color: #f5f9ee;
  pointer-events: none;
}
#cart-toast:empty { opacity: 0; padding: 0; border: 0; }
#cart-toast span { font-size: .9rem; color: #d5e9de; }

#shop, .workspace, .checkout, .products, #history {
  display: grid;
  gap: 1rem;
}

#shop { margin-top: 1rem; }
.workspace { align-items: start; }
.workspace > * { min-width: 0; }
.products { grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); }

.catalog-toolbar, .cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-bottom: .75rem;
}

.catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: .4rem;
  background: #fffefa;
  border-bottom: 1px solid #d9e0d5;
}

.catalog-toolbar h2, .cart-header h2 { margin: 0; }
#cart-link {
  display: inline-block;
  padding: .625rem .75rem;
  border-radius: .45rem;
  background: #e6eee4;
  font-weight: 750;
}

.product, .product button { scroll-margin-block-start: 6rem; }
.product:target { outline: .15rem solid #185b55; outline-offset: .15rem; }

@media (min-width: 57rem) {
  .workspace { grid-template-columns: minmax(0, 1fr) clamp(17rem, 27vw, 23rem); }
}

.product, .history-order {
  overflow-wrap: anywhere;
  padding: .9rem;
  border: 1px solid #bacdca;
  border-radius: .7rem;
}

.product { display: flex; flex-direction: column; align-items: start; background: #fff; gap: .45rem; }
.product h3 { margin: 0; }
.product small { font-size: .72rem; letter-spacing: .075em; }
.product-art { display: block; width: 100%; height: auto; border-radius: .48rem; margin-bottom: .25rem; background: #e6eee4; }
.product-price { margin: auto 0 .25rem; font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; }
button:hover:not(:disabled) { background: #104239; }

small { color: #4f6967; }

button, input, select {
  font: inherit;
  border-radius: .45rem;
  max-width: 100%;
}

input, select {
  padding: .45rem .55rem;
  background: #fff;
  color: #163b3b;
  border: 1px solid #4f6967;
}

button {
  background: #185b55;
  color: #fff;
  border: 1px solid #185b55;
  padding: .45rem .8rem;
  min-height: 2.75rem;
  cursor: pointer;
}

button:disabled { background: #edf3f1; color: #4f6967; border-color: #bacdca; cursor: default; }
:focus-visible { outline: .2rem solid #58418c; outline-offset: .15rem; }
form { display: grid; justify-items: start; gap: .45rem; }
form label:not(:first-child) { margin-top: .5rem; }
form button { margin-top: .4rem; }

#cart-lines { list-style: none; padding: 0; }
#cart-lines li, .quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

#cart-lines li { justify-content: space-between; margin-block: .6rem; }
.quantity button { min-width: 2.75rem; }
#history + button, #payment-options button { margin-block-start: .5rem; }
