/* Website Menu page (menu.html): the shared browse-only menu (assets/tablet/menu.js) in the
   website's colors and fonts. Everything is scoped to .th-menu so it can't touch the site's
   Tailwind header and footer. */
.th-menu {
  --bark: #2c1810;
  --canopy: #2d5016;
  --canopy-light: #4a7c28;
  --moss: #516C40; /* labels: 4.5:1 on the menu backgrounds (was #6b8f55) */
  --line: #e2dccf;
  --paper: #fffdf8;
  --muted: #6e5d55;
  --soft: #edf1e6;
  color: var(--bark);
  font-family: 'Outfit', system-ui, sans-serif;
}
.th-menu [hidden] { display: none !important; }
/* The menu keeps the tapped heading in place itself (assets/tablet/menu.js); the browser's own scroll
   anchoring would otherwise make a second, different adjustment when headings switch. */
.th-menu, .th-menu * { overflow-anchor: none; }
.th-menu button, .th-menu input, .th-menu select { font: inherit; color: inherit; }
.th-menu button, .th-menu select { cursor: pointer; }
.th-menu button:focus-visible, .th-menu input:focus-visible, .th-menu select:focus-visible,
.th-menu summary:focus-visible { outline: 3px solid #c8943e; outline-offset: 3px; }

/* Order-ahead call to action */
.th-menu .order-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--canopy); color: #f5f0e8; border-radius: 18px; padding: 18px 22px; margin-bottom: 28px;
}
.th-menu .order-cta p { margin: 0; line-height: 1.5; }
.th-menu .order-cta strong { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 20px; display: block; }
.th-menu .order-cta span { font-size: 14px; color: #dfe7d4; }
.th-menu .order-cta a {
  background: #f5f0e8; color: var(--canopy); border-radius: 999px; padding: 11px 20px; font-weight: 600;
  font-size: 14px; text-decoration: none; white-space: nowrap;
}
.th-menu .order-cta a:hover { background: #fff; }

/* Layout: headings and filters beside the products, stacked on phones */
.th-menu .layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; }
.th-menu .browse-panel { border-right: 1px solid var(--line); padding-right: 24px; min-width: 0; }
.th-menu .selection { min-width: 0; }
.th-menu .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2.5px; color: var(--moss); margin: 0 0 12px; }
.th-menu #categories { display: flex; flex-direction: column; gap: 6px; }
.th-menu #categories :is(button, a) {
  color: inherit; text-decoration: none;
  text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 11px 14px;
  min-height: 46px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 15px;
}
.th-menu #categories :is(button, a):hover { background: var(--soft); }
.th-menu #categories :is(button, a) span { font-size: 12px; opacity: 0.7; }
.th-menu #categories :is(button[aria-pressed='true'], a[aria-current='page']) { color: #f5f0e8; background: var(--canopy); }

/* Sub-filters under the chosen heading */
.th-menu .category-facets { padding: 6px 8px 12px 12px; border-left: 3px solid #b5c5a3; margin: 14px 0 8px 0; }
.th-menu .category-facets fieldset { border: 0; padding: 0; margin: 8px 0 12px; min-width: 0; }
.th-menu .category-facets legend { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 4px; }
.th-menu .category-facets label { display: flex; gap: 9px; align-items: center; min-height: 40px; font-size: 14px; cursor: pointer; }
.th-menu .category-facets input { width: 18px; height: 18px; accent-color: var(--canopy); flex: none; }
.th-menu .category-facets small { margin-left: auto; color: var(--muted); }
.th-menu .category-facets label:has(input:disabled) { opacity: 0.45; cursor: default; }
/* By terpene: the list's one-line explanation, and each terpene's aroma under its name */
.th-menu .category-facets .facet-hint { font-size: 12px; color: var(--muted); margin: 2px 0 4px; line-height: 1.35; }
.th-menu .category-facets .terpene-option span { display: flex; flex-direction: column; line-height: 1.2; }
.th-menu .category-facets .facet-note { font-style: normal; font-size: 12px; color: var(--muted); }
.th-menu .category-facets > button,
.th-menu #categories .category-facets > button {
  font-size: 12px; text-decoration: underline; padding: 6px 0; border: 0; background: transparent; color: var(--canopy); min-height: 0;
}
/* Wide screens: the chosen heading's options as rows of pills above the products */
@media (min-width: 901px) {
  .th-menu .selection .category-facets { border: 0; margin: 14px 0 0; padding: 12px 14px 4px; background: var(--soft); border-radius: 12px; }
  .th-menu .selection .category-facets fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
  .th-menu .selection .category-facets legend { float: left; margin: 0 6px 0 0; padding: 0; min-width: 84px; }
  .th-menu .selection .category-facets label {
    min-height: 34px; padding: 5px 12px; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px;
  }
  .th-menu .selection .category-facets label:has(input:checked) { border-color: var(--canopy); background: #dfe8d3; }
  .th-menu .selection .category-facets input { width: 15px; height: 15px; }
  .th-menu .selection .category-facets small { margin-left: 2px; }
  .th-menu .selection .category-facets > button { margin: 0 0 8px; }
  .th-menu .selection .category-facets .facet-hint { flex-basis: 100%; margin: 0; }
  .th-menu .selection .category-facets .facet-note { display: none; }
}
/* Pinned under the site header once the options scroll away; it takes no room in the page */
.th-menu .facet-pin { position: sticky; height: 0; z-index: 15; }
.th-menu .facet-pin-bar {
  position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: inherit;
  box-shadow: 0 4px 16px rgba(44, 24, 16, 0.08); font-size: 14px; text-align: left; cursor: pointer;
}
.th-menu .facet-pin-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-menu .facet-pin-bar strong { flex: none; font-weight: 500; color: var(--canopy); text-decoration: underline; }

.th-menu .refine { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; }
.th-menu .refine h2 { font: 22px 'DM Serif Display', Georgia, serif; margin: 0; display: inline; }
.th-menu .refine summary { cursor: pointer; margin-bottom: 16px; list-style-position: outside; }
@media (min-width: 901px) { .th-menu .refine summary { list-style: none; pointer-events: none; } .th-menu .refine summary::-webkit-details-marker { display: none; } }
.th-menu .refine label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.th-menu select {
  display: block; width: 100%; margin-top: 6px; padding: 9px 10px; font-size: 15px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--bark);
}

/* Search, sort and result count */
.th-menu .toolbar { display: flex; gap: 12px; align-items: flex-end; }
.th-menu .search {
  display: flex; align-items: center; flex: 1; min-width: 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; padding-left: 16px; min-height: 52px;
}
.th-menu .search > span { font-size: 24px; color: var(--moss); }
.th-menu .search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 14px 12px; font-size: 16px; outline: none; }
.th-menu .sort { font-size: 11px; color: var(--muted); width: 190px; flex: none; }
.th-menu .results { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 60px; font-size: 13px; color: var(--muted); }
.th-menu .results p { margin: 0; }
.th-menu #clear { border: 0; background: transparent; text-decoration: underline; font-size: 13px; padding: 4px 6px; color: var(--canopy); }
.th-menu .results > span { margin-left: auto; font-size: 12px; }
.th-menu .notice { border: 1px solid #d8c7a7; background: #eee5d5; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; margin-bottom: 18px; }

/* Product cards */
.th-menu .products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.th-menu .product { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-width: 0; padding: 20px; }
/* Cards off screen skip layout and painting until they come near the screen, so switching headings or
   filtering stays quick on slow phones (Cloudflare showed slow taps on category pages, 11/11/26).
   500px is about a card's real height at every width; "auto" keeps each card's real size once drawn. */
.th-menu .product { content-visibility: auto; contain-intrinsic-size: auto 500px; }
.th-menu .product-photo { display: block; width: calc(100% + 40px); max-width: none; margin: -20px -20px 16px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.th-menu .product-top { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; align-items: flex-start; }
.th-menu .product-category { color: var(--muted); line-height: 1.5; }
.th-menu .product-type { padding: 4px 8px; border-radius: 6px; background: #e8ecde; letter-spacing: 0.3px; flex: none; }
.th-menu .product-type.indica { background: #ece5ed; }
.th-menu .product-type.sativa { background: #f1ead7; }
.th-menu .product-brand { font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: 1.2px; margin: 18px 0 6px; color: var(--canopy-light); }
.th-menu .product h2 { font: 24px/1.2 'DM Serif Display', Georgia, serif; overflow-wrap: anywhere; margin: 0 0 10px; }
.th-menu .potency { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.th-menu .variants { border-top: 1px solid var(--line); }
.th-menu .variant { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid #efe9de; font-size: 14px; }
.th-menu .variant:last-child { border: 0; }
.th-menu .variant strong { font-size: 20px; font-weight: 600; color: var(--canopy); }
.th-menu .variant small { display: block; font-size: 10px; text-align: right; color: var(--muted); margin-top: 2px; }
.th-menu .description { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 14px 0 0; }

/* Tap-to-open lab results */
.th-menu .lab { margin: -6px 0 16px; font-size: 12px; color: var(--muted); }
.th-menu .lab summary { cursor: pointer; color: var(--canopy); font-weight: 600; padding: 6px 0; }
.th-menu .lab-section { margin-top: 8px; }
.th-menu .lab-title { margin: 0 0 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.th-menu .lab-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 3px 0; }
.th-menu .lab-row strong { font-weight: 600; color: var(--bark); }
.th-menu .lab-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: #9db48b; }
.th-menu .lab-note { margin: 8px 0 0; font-size: 10px; }

.th-menu .empty { padding: 48px 20px; text-align: center; border: 1px dashed #b5c5a3; border-radius: 16px; }
.th-menu .empty h2 { font: 26px 'DM Serif Display', Georgia, serif; margin: 0 0 8px; }
.th-menu .empty p { color: var(--muted); line-height: 1.6; }
.th-menu .empty button { background: var(--canopy); color: #f5f0e8; border: 0; border-radius: 999px; padding: 11px 20px; margin-top: 10px; }
.th-menu .fine-print { font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 22px; }

/* Tablets and phones: headings become chips above the products */
@media (max-width: 900px) {
  .th-menu .layout { grid-template-columns: 1fr; gap: 20px; }
  .th-menu .browse-panel { border: 0; padding: 0; }
  .th-menu .browse-label { display: none; }
  .th-menu #categories { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .th-menu .refine summary { margin-bottom: 10px; }
  .th-menu .refine[open] { display: grid; }
  .th-menu #categories :is(button, a) { flex: none; border-color: var(--line); border-radius: 999px; min-height: 42px; padding: 8px 14px; font-size: 14px; }
  .th-menu #categories :is(button, a) span { margin-left: 2px; }
  .th-menu .category-facets {
    order: 1; width: 100%; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 6px 0 0; padding: 10px 16px;
    background: var(--soft); border: 0; border-radius: 12px;
  }
  .th-menu .category-facets fieldset { min-width: 150px; flex: 1; margin: 4px 0; }
  .th-menu .refine { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-top: 14px; padding-top: 14px; }
  .th-menu .refine summary { grid-column: 1 / -1; }
  .th-menu .refine h2 { font-size: 18px; }
}
@media (max-width: 580px) {
  /* One swipeable row of headings; the chosen heading's sub-filters drop below it. */
  .th-menu #categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .th-menu #categories > :is(button, a) { white-space: nowrap; }
  .th-menu .category-facets { margin-top: 10px; padding: 10px 12px; gap: 2px; }
  /* Compact pills instead of a tall checkbox list */
  .th-menu .category-facets fieldset { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; min-width: 100%; }
  .th-menu .category-facets legend { margin-bottom: 4px; }
  .th-menu .category-facets label {
    min-height: 36px; padding: 6px 12px; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px;
  }
  .th-menu .category-facets label:has(input:checked) { border-color: var(--canopy); background: #dfe8d3; }
  .th-menu .category-facets input { width: 15px; height: 15px; }
  .th-menu .category-facets small { margin-left: 2px; }
  .th-menu .category-facets .facet-hint { flex-basis: 100%; margin: 0 0 2px; }
  .th-menu .category-facets .facet-note { display: none; }
  .th-menu .toolbar { flex-direction: column; align-items: stretch; }
  .th-menu .sort { width: auto; }
  .th-menu .products { grid-template-columns: 1fr; }
  .th-menu .results > span { width: 100%; margin: 0 0 8px; }
  .th-menu .order-cta { padding: 16px 18px; }
}
