/* ── Headymonster design tokens — matte black + brushed brass ───────────── */
:root {
  --bg:        #0d0b09;   /* warm near-black (was navy #000D17) */
  --surface:   #15110b;   /* card surface */
  --raised:    #1d1810;   /* expanded / sticky / hover surface */
  --line:      rgba(201,168,76,0.16); /* warm gold hairline */
  --gold:      #c9a84c;   /* brass — primary action + key accents ONLY */
  --gold-lite: #d4aa50;
  --gold-ink:  #0d0b09;   /* dark text on gold */
  --cream:     #e8d9b0;   /* product names / primary text */
  --text:      #cbb27e;   /* body detail (warm) */
  --muted:     #9a8a5a;   /* eyebrow labels / secondary */
  --shadow:    0 8px 30px rgba(0,0,0,0.45); /* soft elevation */
}

body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: 'Poppins', sans-serif;
  overflow-x: clip; /* contain the off-canvas cart slide without breaking position:sticky */
}

/* M3 — sticky app header (brand · member · logout) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(13, 11, 9, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.app-brand { font-weight: 700; letter-spacing: 0.18em; font-size: 14px; color: var(--gold); }
.app-header-right { display: flex; align-items: center; gap: 12px; }
/* member name is a link to the account/profile page */
.app-member { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; text-decoration: none; transition: color 0.15s; }
.app-member:hover { color: var(--cream); }
.app-member svg { color: var(--gold); opacity: 0.85; flex-shrink: 0; }
/* admin-only quick link back to the dashboard from the member menu */
.app-admin-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--gold); border-radius: 999px; color: var(--gold); text-decoration: none;
  font: 600 12px/1 'Poppins', sans-serif; letter-spacing: 0.04em; white-space: nowrap; transition: background 0.15s; }
.app-admin-link:hover { background: rgba(201, 168, 76, 0.12); }
/* Keep the admin-augmented header (brand + Admin + cart + logout = 4 items) from
   overflowing small phones. body has overflow-x:clip, so an intrinsic width over the
   viewport would silently CLIP the rightmost control (Logout) out of reach rather than
   scroll — so we trim every item enough to fit ~360px. Scoped to .has-admin: the regular
   member header (which shows the name instead of the Admin link) is untouched. */
@media (max-width: 480px) {
  .app-header.has-admin { padding: 9px 10px; }
  .app-header.has-admin .app-header-right { gap: 6px; }
  .app-header.has-admin .app-brand { letter-spacing: 0.04em; font-size: 13px; }
  .app-header.has-admin .app-member { display: none; }
  .app-header.has-admin .app-admin-link { padding: 6px 10px; }
  .app-header.has-admin .cart-button { padding: 8px 9px; min-height: 38px; }
  .app-header.has-admin .app-header-right form button { padding: 9px 11px; font-size: 12px; min-height: 38px; }
}
/* Ultra-narrow safety net (~320px, e.g. iPhone SE 1st gen): squeeze the last few px so
   overflow-x:clip never eats the Logout control. Rare, but the failure mode is "can't sign out". */
@media (max-width: 340px) {
  .app-header.has-admin { padding: 8px 7px; }
  .app-header.has-admin .app-header-right { gap: 4px; }
  .app-header.has-admin .app-brand { letter-spacing: 0; font-size: 12px; }
  .app-header.has-admin .app-admin-link { padding: 6px 8px; gap: 4px; }
  .app-header.has-admin .app-header-right form button { padding: 9px 9px; }
}

/* M1 — sticky filter / sort toolbar (sits just below the header; offset is set
   dynamically from the header's real height to avoid overlap at any viewport) */
.menu-toolbar {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 18px;
  background: rgba(13, 11, 9, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  width: auto;
  min-height: 44px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover:not(.is-active) { border-color: rgba(201,168,76,0.5); color: var(--cream); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip.is-active {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold);
  font-weight: 600;
}
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.sort-select {
  width: auto;
  min-height: 44px;
  background: var(--raised);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

/* Base styles for .menu-container — centered, comfortable column rhythm */
.menu-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Phone-first: single comfortable column */
@media (max-width: 768px) {
  .menu-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 20px;
    padding: 18px;
  }
}

.menu-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  background-color: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.menu-item:hover {
  border-color: rgba(201,168,76,0.32);
  box-shadow: 0 12px 38px rgba(0,0,0,0.55);
}

/* Eyebrow labels — small, uppercase, letter-spaced, muted gold */
.bold-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-right: 5px;
}
span.availability.bold-label { font-size: 11px; }

.product-detail {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  display: inline-block;
}

/* Secondary action — a quiet gold "Details" link, not a competing button */
.lineage-toggle {
  background: transparent;
  color: var(--gold);
  border: none;
  width: auto;
  padding: 8px 4px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.85;
}
.lineage-toggle:hover { opacity: 1; }

.lineage-details {
  text-align: left;
  padding-top: 5px;
  display: none; /* Hidden by default */
}

.product-image img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);            /* was #006d6c teal = 3.18:1, failed AA */
  text-decoration: none;
}
a:hover { color: var(--gold-lite); text-decoration: underline; }

input, button {
  background-color: #222;
  border: 1px solid #444;
  padding: 5px 10px;
  font-family: 'Poppins', sans-serif;
  color: #f7f6fa

}

button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background-color: var(--gold);   /* brass CTA, dark ink — on-brand + AA contrast */
  color: var(--gold-ink);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s ease;
}

button:hover { background-color: var(--gold-lite); }
button:active { transform: scale(0.98); }

/* Product name — the hero line: cream, refined weight, a little air */
.menu-item h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
  margin: 14px 0 8px;
}

/* M4 — community average rating (social proof) */
.agg-rating {
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.agg-rating .fa-star { font-size: 12px; }
.agg-rating .agg-count { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 2px; }

/* ♀/♂ glyphs carry the distinction; colour stays on-brand gold (was off-brand pink/blue) */
.female-parent, .male-parent { color: var(--gold); }

.login-container {
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: black;
}


.form-group {
  margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: black;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* (auth-page button — same brass treatment) */
button {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background-color: var(--gold);
    color: var(--gold-ink);
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 20px;
}

.login-container p {
    text-align: center;
    margin-top: 15px;
    color: black;
}

.error-message {
  color: #ff3860;
  background-color: #ffe5e7;
  border: 1px solid #ff3860;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
}

/* Additional styles for stars */
.stars-outer {
  display: inline-block;
  position: relative;
  font-family: 'FontAwesome'; /* Make sure FontAwesome is loaded */
}

.stars-outer::before {
  content: "\f006 \f006 \f006 \f006 \f006"; /* empty star */
  color: #ccc; /* Color for un-filled stars */
}

.stars-inner {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  color: #f8ce0b; /* Adjust the color code for gold if needed */
}

.stars-inner::before {
  content: "\f005 \f005 \f005 \f005 \f005"; /* filled star */
}

.fas.fa-calendar {
  color: #4d90fe; /* Or any color you want for the icon */
  margin-right: 5px; /* Space between icon and the label */
}

/* Hide the message box by default */
.message-box {
    display: none;
    /* Other styling here */
}

/* When the message box has content, it will be displayed */
.message-box:not(:empty) {
    display: block;
}

.neumorphic-progress-bar-container {
    width: 100%;
    background-color: rgba(255,255,255,0.06); /* warm dark track */
    padding: 3px;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.progress-bar {
    width: 100%;
    background-color: #bbb; /* Darker grey background */
    border-radius: 7px; /* Slightly smaller radius for the inner bar */
    overflow: hidden; /* Ensures the fill doesn't spill out */
}

.glightbox-clean .gslide-title {
    font-size: 1em;
    font-weight: 600 !important;
    font-family: Montserrat !important;
    color: #fff;
    margin-bottom: 19px;
    line-height: 1.4em;
}

/* ── Luxe pass: image framing, ghost logout, motion discipline ─────────── */

/* Product image — softly rounded with a whisper-thin frame */
.product-image img {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.25s ease;
}
.menu-item:hover .product-image img { transform: scale(1.02); }

/* "Your rating" eyebrow sits with the labels */
.star-rating-input .bold-label { color: var(--muted); }

/* Logout — slim ghost pill in the header; gold stays reserved for the CTA */
button[name="logout"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  width: auto;
  margin: 0;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}
button[name="logout"]:hover { background: var(--raised); color: var(--cream); }

/* ── Ordering: per-card control + slide-out cart (estimate only) ───────── */
/* Buy block — weight pills + live price + add to cart (Shopify-style) */
.pc-buy { margin-top: 16px; text-align: left; }
.pc-buy-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px; }
.pc-weights { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.weight-pill {
  width: auto; min-height: 40px; min-width: 40px; padding: 8px 12px;
  background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.weight-pill:hover { border-color: rgba(201,168,76,0.5); color: var(--cream); }
.weight-pill:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.weight-pill.is-sel { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; }
.pc-buyrow { display: flex; align-items: center; gap: 12px; }
.pc-price { font-size: 22px; font-weight: 700; color: var(--cream); min-width: 64px; }
.add-to-cart {
  flex: 1; width: auto; min-height: 46px; background: var(--gold); color: var(--gold-ink);
  border: none; border-radius: 10px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s ease;
}
.add-to-cart:hover { background: var(--gold-lite); }
.add-to-cart:active { transform: scale(0.98); }
.pc-hint { color: var(--muted); font-size: 11px; margin: 10px 0 0; line-height: 1.4; }
.pc-buy-disabled { text-align: center; margin-top: 16px; }
.pc-soon-label {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Cart: progress-to-discount + per-line qty bump */
.cart-progress { margin-bottom: 14px; }
.cart-progress-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 6px; }
.cart-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-lite)); transition: width 0.35s ease; }
.cart-progress-label { font-size: 12px; color: var(--gold); letter-spacing: 0.02em; }
.cart-progress.unlocked .cart-progress-label { color: var(--gold-lite); }
#cart-tier { color: var(--muted); font-weight: 400; font-size: 12px; }
.cart-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.cq-dec, .cq-inc {
  width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 999px;
  background: var(--bg); color: var(--gold); border: 1px solid var(--line);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.cq-val { min-width: 42px; text-align: center; color: var(--cream); font-size: 13px; }

/* Header cart button + count badge */
.cart-button {
  position: relative; width: auto; min-height: 40px; padding: 8px 12px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--cream); cursor: pointer; display: flex; align-items: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cart-button:hover { border-color: rgba(201,168,76,0.5); color: var(--gold); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--gold); color: var(--gold-ink); border-radius: 999px;
  font-size: 11px; font-weight: 700; align-items: center; justify-content: center;
}

/* Slide-out cart */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; z-index: 60;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 90vw);
  background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.28s ease; z-index: 70;
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,0.5);
}
.cart-panel.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-title { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); margin: 0; }
.cart-close { width: auto; background: transparent; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px; min-height: 40px; }
.cart-close:hover { color: var(--cream); }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-empty { color: var(--muted); text-align: center; padding: 44px 10px; font-size: 14px; line-height: 1.6; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row-main { flex: 1; text-align: left; }
.cart-row-name { display: block; color: var(--cream); font-weight: 600; font-size: 14px; }
.cart-row-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cart-row-total { color: var(--gold); font-weight: 600; font-size: 14px; }
.cart-remove { width: auto; background: transparent; border: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cart-remove:hover { color: #e0857a; }
.cart-foot { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--raised); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 16px; color: var(--cream); font-weight: 600; margin-bottom: 8px; }
.cart-total-row span:last-child { color: var(--gold); }
.cart-disclaimer { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0 0 12px; }
.cart-field { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
#cart-contact-method, #cart-contact-handle, #cart-note {
  width: 100%; box-sizing: border-box; background: var(--bg); color: var(--cream);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-family: inherit; font-size: 13px; margin-bottom: 8px;
}
#cart-submit {
  width: 100%; min-height: 48px; background: var(--gold); color: var(--gold-ink);
  border: none; border-radius: 10px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; margin-top: 4px;
}
#cart-submit:hover { background: var(--gold-lite); }
#cart-submit:disabled { opacity: 0.6; cursor: default; }
.cart-msg { color: var(--gold); font-size: 12px; text-align: center; margin: 10px 0 0; min-height: 16px; }

/* Member-initiated direct-contact deep links (the seamless path) */
.cart-direct { margin: 0 0 12px; }
.cart-direct-label { color: var(--cream); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 8px; }
.cart-direct-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cart-direct-btn {
  flex: 1 1 calc(50% - 4px); min-height: 44px; background: transparent; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 10px; font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.03em; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.cart-direct-btn:hover { background: var(--gold); color: var(--gold-ink); }
.cart-or {
  display: flex; align-items: center; text-align: center; color: var(--muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin: 14px 0 12px;
}
.cart-or::before, .cart-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cart-or span { padding: 0 10px; }

/* Motion discipline — honor the user's preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


