/* Shared storefront and staff theme. */
:root {
  --green: #165b40;
  --dark: #153c2c;
  --ink: #21372b;
  --muted: #536459;
  --cream: #f8f7f1;
  --line: #dfe4da;
  --mint: #eaf1e7;
  --gold: #806116;
}
body {
  background: var(--cream);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
.container { max-width: 1280px; }
.topbar {
  background: #17372d;
  color: #fff8ea;
}
.shop-header {
  background: #fffdf7;
  color: var(--dark);
}

.shop-header .nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 74px;
  gap: clamp(12px, 1.8vw, 23px);
}

.shop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 3px 3px 13px;
  border: 1px solid #bac8bc;
  border-radius: 9px;
  background: #f5f7ee;
}

.shop-search:focus-within { border-color: var(--green); }
.shop-search-icon {
  position: relative;
  flex: 0 0 13px;
  height: 13px;
  margin-inline-end: 5px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.shop-search-icon::after {
  position: absolute;
  top: 10px;
  left: 9px;
  width: 7px;
  border-top: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transform-origin: left;
  content: "";
}

.shop-search input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 6px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.shop-search input::placeholder { color: var(--muted); }
.shop-search input:focus-visible { outline-offset: 0; }
.shop-search .button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .85rem;
  line-height: 1.2;
}

.shop-header .shop-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px clamp(8px, 1.3vw, 16px);
}

.shop-header .shop-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 2px;
  color: var(--dark);
  font-size: .9375rem;
  font-weight: 700;
}

.shop-header .shop-actions a:hover { color: var(--green); }

.cart-feedback {
  position: fixed;
  z-index: 10;
  inset-inline-end: 16px;
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  max-inline-size: min(24rem, calc(100% - 32px));
  margin: 0;
  pointer-events: none;
}

.cart-feedback:not(:empty) {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--dark);
  color: #fffdf8;
  box-shadow: 0 4px 16px #142b2333;
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.cart-feedback[data-error]:not(:empty) { background: #8d3829; }
[data-add-to-cart][aria-busy="true"] button[type="submit"] { cursor: wait; opacity: .75; }

.shop-header .shop-actions a[aria-current="page"]:not(.cart-nav) {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.shop-header .brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  font-size: clamp(1.62rem, 2.5vw, 2.1rem);
}

.shop-header .market-lockup {
  --mark-gold: #8a641d;
  --mark-green: #3a7350;
  color: var(--dark);
}

.shop-header .shop-actions .cart-nav {
  gap: 7px;
  padding: 6px 10px 6px 12px;
  border: 1px solid #c7d4c5;
  border-radius: 8px;
  background: #e8efe4;
}

.shop-header .shop-actions .cart-nav:hover,
.shop-header .shop-actions .cart-nav[aria-current="page"] { background: #dbe8d9; }

.shop-header .count {
  min-width: 23px;
  margin: 0;
  padding: 2px 5px;
  border-radius: 100px;
  background: #24563e;
  color: white;
  text-align: center;
  font-size: .75rem;
}
.language-picker { position: relative; justify-self: end; margin: 0; }
.language-picker[open] { z-index: 12; }
.language-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: #0f5148;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.language-trigger::-webkit-details-marker { display: none; }
.language-trigger:hover, .language-picker[open] .language-trigger { background: #176356; }
.language-trigger:focus-visible { outline: 2px solid #efd092; outline-offset: 2px; }
.language-trigger svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.language-globe { width: 20px; height: 20px; color: #cde3dc; }
.language-chevron { width: 14px; height: 14px; }
.language-picker[open] .language-chevron { transform: rotate(180deg); }
.language-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 148px;
  margin: 0;
  padding: 4px;
  border: 1px solid #cdd9d0;
  border-radius: 10px;
  background: #fffdf8;
  color: var(--dark);
  box-shadow: 0 8px 24px #112d2329;
  list-style: none;
}
.language-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .875rem;
}
.language-options a:hover, .language-options [aria-current] { background: var(--mint); }
.language-options [aria-current] { font-weight: 700; }
.language-option-code { font-size: .75rem; color: var(--muted); }

/* Common forms, buttons and surfaces. */
.section h1, .section h2, .section-title h2 { color: #124c34; }
.eyebrow.green { color: #7f6514; }
.button.primary { background: #165b40; color: white; }
.button.primary:hover { background: #20764f; }
.button.outline {
  border: 1px solid #39795a;
  background: #fffef8;
  color: #15583e;
}
.button.outline:hover { background: #fbefb8; }
.button.add { background: #ebf2e8; color: #1b563b; }
.button.add:hover:not(:disabled) { background: #dce9dc; }
.panel, .product-card, .empty {
  background: #fffdf9;
  border-color: var(--line);
}
.panel { box-shadow: 0 6px 18px rgba(24, 79, 45, 0.035); }
.empty { border: 1px solid var(--line); }
.product-media, .detail-photo, .tiny-photo { background: #f0f3e4; }
.bag-placeholder {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.8em;
  height: 2.4em;
  margin-top: .65em;
  border: 1px solid currentColor;
  border-radius: .35em .35em .5em .5em;
  color: #487153;
  vertical-align: middle;
}
.bag-placeholder::before {
  position: absolute;
  content: "";
  top: -.65em;
  left: 50%;
  width: 1em;
  height: .95em;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 1em 1em 0 0;
  transform: translateX(-50%);
}
.bag-placeholder::after { content: "★"; font-size: .85em; }
.product-media .bag-placeholder, .detail-photo .bag-placeholder, .empty .bag-placeholder { font-size: 1.4rem; }
.tiny-photo .bag-placeholder { font-size: .85rem; }
.staff-table th { color: #315b42; }
.staff-table tbody tr:hover { background: #fff9e6; }
.ops-tabs .ops-tab { background: #fffdf5; border-color: #e5e6d1; }
.ops-tabs .ops-tab:hover { background: #f8eab2; }
.status-chip { background: #e8f0df; color: #20573b; }
.status-chip.status-warning { background: #fff0b5; color: #765309; }
:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #8a660f;
  outline-offset: 2px;
}
.footer { background: #17382b; padding-block: 31px; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 32px;
}
.footer-about { display: grid; justify-items: start; gap: 10px; }
.footer-about p { max-width: 36ch; margin: 0; color: #e1e9d9; }
.store-footer-links { display: flex; flex-wrap: wrap; gap: 0 17px; }
.store-footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff4dd; }
.store-footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.store-information-page { max-width: 850px; }
.store-business-details { margin: 0; }
.store-business-details dt { font-weight: 800; color: var(--dark); }
.store-business-details dd { margin: 3px 0 16px; overflow-wrap: anywhere; }
.store-business-details dd:last-child { margin-bottom: 0; }
.store-business-details a { text-decoration: underline; }
.store-policy-content { overflow-wrap: anywhere; }
.footer-brand { font-size: 1.45rem; }
.staff-masthead :is(a, select, button):focus-visible, .footer a:focus-visible { outline-color: #ffe4a9; }
@media (max-width: 1040px) {
  .shop-header .nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 13px;
    row-gap: 6px;
    padding-block: 9px;
  }

  .shop-header .shop-search { grid-row: 2; grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .shop-header .nav { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 0; }
  .shop-header .shop-actions {
    grid-row: 3;
    grid-column: 1 / -1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(min-content, max-content);
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding-block: 0 5px;
  }

  .shop-header .shop-actions a {
    min-width: 0;
    font-size: .8125rem;
    line-height: 1.25;
  }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .shop-header .shop-actions:has(> a:nth-child(4)) {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
  }

  .shop-header .shop-actions .cart-nav { justify-self: start; }
}


@media (prefers-reduced-motion: no-preference) {
  .storefront-page::before {
    position: fixed;
    z-index: 20;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #8dbc98, #efd092 76%);
    transform-origin: left;
    pointer-events: none;
    animation: storefront-progress 520ms ease-out both;
    content: "";
  }

  @keyframes storefront-progress {
    from { transform: scaleX(.12); }
    70% { transform: scaleX(1); opacity: 1; }
    to { transform: scaleX(1); opacity: 0; }
  }

  #main-content {
    animation: storefront-enter 420ms cubic-bezier(.22, .61, .36, 1);
  }

  @keyframes storefront-enter {
    from { transform: translateY(-14px); opacity: .82; }
  }
}
