/* gem-header-edits.css: hand-written additions to the generated
   gem-header.css (the V216 header on every page). */

/* The nameplate hangs below the bar. Pages that start with breadcrumbs
   (shop and category archives) get the product page's room under it
   (V216: 72px, 54px on phones), so the crumbs never sit against the plate.
   Pages that start with a title (cart, checkout, account, posts, pages)
   already clear it through Blocksy's title spacing. */
html.gem-hdr6:not(.gem-pdp6) main .crumbs { padding-top: 72px; }
@media (max-width: 760px) {
  html.gem-hdr6:not(.gem-pdp6) main .crumbs { padding-top: 54px; }
}

/* V216 (Treyson 10-30): menu button + slide-in menu where the category nav
   is hidden (1040px and below). Markup and script: the header in
   inc/mockup-h.php, built from the same nav list as the bar. */
html.gem-hdr6 .top .r6-burger { display: none; border: 0; background: none; cursor: pointer; padding: 0; font: inherit; }
html.gem-hdr6 .top .r6-burger svg { width: 22px; height: 22px; }   /* same 32px box as search/account/cart */
@media (max-width: 1040px) { html.gem-hdr6 .top .r6-burger { display: inline-grid; place-items: center; width: 32px; height: 32px; } }
html.gem-hdr6.r6-nav-on, html.gem-hdr6.r6-nav-on body { overflow: hidden; }
.r6-nav { position: fixed; inset: 0; z-index: 1000; }
.r6-nav[hidden] { display: none; }
.r6-nav-scrim { position: absolute; inset: 0; background: rgba(1, 1, 12, .45); opacity: 0; transition: opacity .25s; }
.r6-nav-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: #fff; box-shadow: -12px 0 32px -12px rgba(1, 1, 12, .3); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .7, .2, 1); font-family: "Quasimoda", system-ui, sans-serif; }
.r6-nav.is-open .r6-nav-scrim { opacity: 1; }
.r6-nav.is-open .r6-nav-panel { transform: none; }
.r6-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 22px; background: #450910; color: #fff; font-weight: 700; font-size: 1.05rem; }
.r6-nav-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; }
.r6-nav-x:hover, .r6-nav-x:focus-visible { background: rgba(255, 255, 255, .12); }
.r6-nav-x svg { width: 22px; height: 22px; }
.r6-nav-panel ul { list-style: none; margin: 0; padding: 6px 0 24px; overflow-y: auto; }
.r6-nav-panel li { border-bottom: 1px solid #EBEBED; }
.r6-nav-panel li > a, .r6-nav-panel summary { display: flex; align-items: center; min-height: 52px; padding: 0 22px; font-size: 1rem; font-weight: 700; color: #01010C; text-decoration: none; cursor: pointer; list-style: none; }
.r6-nav-panel summary::-webkit-details-marker { display: none; }
.r6-nav-panel summary::after { content: "+"; margin-left: auto; color: #61616B; font-weight: 400; font-size: 1.25rem; }
.r6-nav-panel details[open] summary { color: #8A0F1A; }
.r6-nav-panel details[open] summary::after { content: "–"; }
.r6-nav-panel details > div { display: grid; padding: 0 0 10px; }
.r6-nav-panel details > div a { padding: 10px 22px 10px 34px; font-size: .95rem; color: #3A3A44; text-decoration: none; }
.r6-nav-panel :is(li > a, summary, details > div a):hover, .r6-nav-panel :is(li > a, summary, details > div a):focus-visible { background: #F7F3EC; color: #5B0209; }
@media (prefers-reduced-motion: reduce) { .r6-nav-panel, .r6-nav-scrim { transition: none; } }

/* V216 (Treyson 10-30): footer link groups (markup in inc/mockup-h.php). Here rather than in
   gem-site-edits.css because this file is versioned by its mtime.
   Above 1040px the headings stay plain and the lists stay open; on phones
   the logo + line are centered and each group opens and closes from its
   heading, with gold hairlines between groups. */
html.gem-hdr6 .foot .r6-fbtn { all: unset; display: block; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
@media (min-width: 1041px) { html.gem-hdr6 .foot .r6-fbtn { pointer-events: none; } }
@media (max-width: 1040px) {   /* phones and tablets (Treyson 10-30) */
  html.gem-hdr6 .foot .fg { grid-template-columns: 1fr !important; gap: 0 !important; }
  html.gem-hdr6 .foot .b-brand { text-align: center; margin-bottom: 22px; }
  html.gem-hdr6 .foot .b-brand .f-lockup { margin-left: auto; margin-right: auto; }
  html.gem-hdr6 .foot .b-brand p { max-width: 280px; margin-left: auto; margin-right: auto; }
  html.gem-hdr6 .foot .r6-fgrp { border-top: 1px solid rgba(234, 198, 110, .28); }
  html.gem-hdr6 .foot .r6-fgrp:last-child { border-bottom: 1px solid rgba(234, 198, 110, .28); }
  html.gem-hdr6 .foot .r6-fgrp h4 { margin: 0 !important; }
  html.gem-hdr6 .foot .r6-fbtn { display: flex; align-items: center; width: 100%; box-sizing: border-box; min-height: 52px; cursor: pointer; }
  html.gem-hdr6 .foot .r6-fbtn::after { content: "+"; margin-left: auto; font-family: "Quasimoda", system-ui, sans-serif; font-size: 1.3rem; letter-spacing: 0; color: #EAC66E; }
  html.gem-hdr6 .foot .r6-fgrp.is-open .r6-fbtn::after { content: "–"; }
  html.gem-hdr6 .foot .r6-fbtn:focus-visible { outline: 2px solid #EAC66E; outline-offset: 2px; }
  html.gem-hdr6 .foot .r6-fgrp ul { display: none; margin: 0 0 16px !important; }
  html.gem-hdr6 .foot .r6-fgrp.is-open ul { display: block; }
  html.gem-hdr6 .foot .fbase { border-top: 0 !important; margin-top: 24px !important; padding-top: 0 !important; }
}
/* V216 (Treyson 10-30): on phones and tablets the footer's bottom row is three lines:
   copyright, address, phone (replaces the <430px name/address split). */
@media (max-width: 1040px) {
  html.gem-hdr6 .foot .fbase { display: flex !important; flex-direction: column; align-items: flex-start; gap: 4px !important; }
  html.gem-hdr6 .foot .fbase .r6-fc, html.gem-hdr6 .foot .fbase .r6-fa { display: block; }
  html.gem-hdr6 .foot .fbase .r6-fsep { display: none; }
  html.gem-hdr6 .foot .fbase > span { margin: 0 !important; }
}
/* V216: under 374px the logo plate + four header icons (with the menu
   button) ran off the screen; the plate shrinks a little and the icon
   buttons go from 32 to 28px. */
@media (max-width: 373px) {
  html.gem-hdr6 .top .v204-shadow { zoom: .8; }
  html.gem-hdr6 .top .top-r .ib { width: 28px !important; height: 28px !important; }
  html.gem-hdr6 .top .top-r .ib svg { width: 19px !important; height: 19px !important; }
}
/* Footer on phones and tablets (Treyson 11-02): the white logo and line sit a little higher */
@media (max-width: 1040px) { html.gem-hdr6 .foot .b-brand { margin-top: -14px; } }

/* Store credit chip in the header for signed-in customers with a balance
   (inc/mockup-h.php; Treyson 11-12). Gold outline on the maroon bar. */
.gem-hdr-credit {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; margin-right: 4px;
  border: 1.5px solid rgba(234, 198, 110, .75); border-radius: 999px; color: #EAC66E; text-decoration: none;
  font: 600 .84rem/1 "Quasimoda", system-ui, sans-serif; white-space: nowrap;
}
.gem-hdr-credit b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.gem-hdr-credit .ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gem-hdr-credit:hover, .gem-hdr-credit:focus-visible { background: rgba(234, 198, 110, .14); border-color: #EAC66E; color: #EAC66E; }
.gem-hdr-credit:focus-visible { outline: 2px solid #EAC66E; outline-offset: 2px; }
@media (max-width: 760px) {
  .gem-hdr-credit { height: 32px; padding: 0 9px 0 8px; gap: 5px; font-size: .8rem; margin-right: 0; }
  .gem-hdr-credit-l { display: none; }
}
@media (max-width: 480px) {
  /* small phones: amount only, tighter icons, so the header row still fits */
  .gem-hdr-credit { height: 28px; padding: 0 8px; font-size: .76rem; border-width: 1px; }
  .gem-hdr-credit .ico { display: none; }
  .gem-hdr6 .top .ib, .top .ib { padding: 4px; }
}
@media (max-width: 480px) {
  .gem-hdr-credit { padding: 0 6px; font-size: .72rem; letter-spacing: -.01em; }
}

/* ==========================================================================
   SOFT LAUNCH HEADER (team meeting 11-25): a placeholder until the header is
   redesigned. The live store's shape (a light logo plate in the top left
   corner with a slanted right edge, on the maroon bar), but slimmer and with
   this header's smaller type; the dark red announcement strip sits directly
   BELOW the bar (markup: inc/mockup-h.php); the whole header stays in view
   when the page scrolls. Everything for it is in this one block: to go back
   to the hanging nameplate, delete the block and move the strip's markup back
   above <header class="top">.
   Heights: bar 72px (60px on phones), strip 32px. Increased slightly
   at Treyson's request on 11-25; sticky offsets follow the same variables.
   ========================================================================== */
html.gem-hdr6 { --gh-bar: 72px; --gh-strip: 32px; --gh-cut: 30px; --gh-edge: 28px; }
@media (max-width: 760px) { html.gem-hdr6 { --gh-bar: 60px; --gh-cut: 22px; --gh-edge: 14px; } }

/* The bar runs the full width of the window so the plate sits in the corner,
   as it does on the live store; the page below keeps its own margins. */
html.gem-hdr6.gem-hdr6 .top .top-in { max-width: none; padding: 0 var(--gh-edge) 0 0; }
html.gem-hdr6.gem-hdr6 .top .top-pill { height: var(--gh-bar); }
html.gem-hdr6.gem-hdr6 .top { box-shadow: 0 8px 16px -10px rgba(20, 2, 5, .6) !important; }

/* The plate: same height as the bar (it no longer hangs below it), white to
   light grey, right edge slanted. The soft shadow is on the wrapper because a
   clipped box cannot carry its own; it falls along the slant, so the plate
   reads as a separate piece on the maroon. Below it is always the bar's own
   bottom shadow or the dark strip, so it cannot run into a white, grey or
   photo page top. */
html.gem-hdr6.gem-hdr6 .top .v204-shadow { align-self: stretch; zoom: 1; filter: drop-shadow(2px 0 2px rgba(20, 2, 5, .28)) drop-shadow(5px 0 9px rgba(20, 2, 5, .22)); }
html.gem-hdr6.gem-hdr6 .top .brand { height: var(--gh-bar); align-self: stretch !important; padding: 0 calc(var(--gh-cut) + 18px) 0 var(--gh-edge) !important; margin: 0 10px 0 0 !important; background: linear-gradient(180deg, #fff 0%, #F0F0F2 100%) !important; clip-path: polygon(0 0, calc(100% - var(--gh-cut)) 0, 100% 100%, 0 100%); }
html.gem-hdr6.gem-hdr6 .top .brand::after { content: none !important; }
html.gem-hdr6.gem-hdr6 .top .brand-lockup { height: 44px; width: auto; min-width: 0; margin-top: 0; }
html.gem-hdr6.gem-hdr6 .top .brand:focus-visible { outline: 3px solid #D39700; outline-offset: -5px; border-radius: 0; }
@media (max-width: 760px) {
  html.gem-hdr6.gem-hdr6 .top .brand { padding: 0 calc(var(--gh-cut) + 10px) 0 var(--gh-edge) !important; margin-right: 0 !important; }
  html.gem-hdr6.gem-hdr6 .top .brand-lockup { height: 36px; }
}
@media (max-width: 373px) { html.gem-hdr6.gem-hdr6 .top .brand-lockup { height: 30px; } }

/* Product links sit by the plate; account, credit, cart, then search sit
   on the right (approved 11-25). */
html.gem-hdr6.gem-hdr6 .top .mainnav { position: static !important; transform: none; margin: 0 !important; padding: 0; }
html.gem-hdr6.gem-hdr6 .top .top-r { flex: 1 1 auto; justify-content: flex-end; min-width: 0; margin-left: 0 !important; gap: 6px; }
html.gem-hdr6 .top .mainnav > li > a { font-size: .88rem; }
@media (max-width: 1240px) { html.gem-hdr6 .top .mainnav > li > a { font-size: .8rem; } }
html.gem-hdr6 .top :is(.mainnav > li > a, .ib, .gem-hdr-credit):focus-visible { outline: 2px solid #EAC66E; outline-offset: 2px; }

/* The strip, below the bar. From tablets up it stays with the bar when the
   page scrolls: the bar reserves the strip's height (so anything that
   measures the header gets bar + strip) and the strip sticks inside that
   room, under the bar's menus. On phones the bar alone stays and the strip
   scrolls away, to keep the screen for the page. */
html.gem-hdr6 .ann { position: relative; z-index: 79; }
html.gem-hdr6 .ann .ann-in { height: var(--gh-strip); }
html.gem-hdr6 .ann { font-size: .84rem; }
@media (min-width: 761px) {
  html.gem-hdr6.gem-hdr6 .top { padding-bottom: var(--gh-strip); background-clip: content-box !important; }
  html.gem-hdr6 .ann { position: sticky; top: var(--gh-bar); margin-top: calc(-1 * var(--gh-strip)); }
}
@media (max-width: 760px) {
  html.gem-hdr6 .ann { font-size: .78rem; }
  html.gem-hdr6 .ann .ann-in { height: auto; min-height: var(--gh-strip); padding-top: 6px; padding-bottom: 6px; }
}

/* Signed in (11-25): "Hello, <first name>" beside the account icon; it links
   to My Account like the icon it belongs to. Long names are cut with "...".
   On phones the bar keeps the icon and the greeting leads the menu instead. */
html.gem-hdr6 .top .gem-hdr-hello { display: inline-flex; align-items: center; gap: 7px; width: auto; padding: 0 10px 0 8px; height: 36px; color: #fff; text-decoration: none; font: 600 .9rem/1 "Quasimoda", system-ui, sans-serif; white-space: nowrap; }
html.gem-hdr6 .top .gem-hdr-hello-t { max-width: 17ch; overflow: hidden; text-overflow: ellipsis; padding: 2px 0; }
@media (max-width: 760px) { html.gem-hdr6 .top .gem-hdr-hello-t { display: none; } html.gem-hdr6 .top .gem-hdr-hello { padding: 6px; height: auto; } }
.r6-nav-me { display: grid; background: #F7F3EC; border-bottom: 1px solid #EAC66E; }
.r6-nav-me a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 22px; font-size: 1rem; font-weight: 700; color: #01010C; text-decoration: none; }
.r6-nav-me a + a { border-top: 1px solid #EBEBED; }
.r6-nav-me a small { font-size: .84rem; font-weight: 500; color: #61616B; }
.r6-nav-me a b { color: #8A6200; font-variant-numeric: tabular-nums; }
.r6-nav-me a:hover, .r6-nav-me a:focus-visible { background: #F1E9DA; color: #5B0209; }

/* Pages that start with breadcrumbs left room for the plate that used to
   hang 32px (24px on phones) below the bar. It no longer hangs, so they keep
   the clear space they had under it and lose the rest. */
html.gem-hdr6.gem-hdr6.gem-hdr6.gem-hdr6 main .crumbs { padding-top: 40px !important; }
@media (max-width: 760px) { html.gem-hdr6.gem-hdr6.gem-hdr6.gem-hdr6 main .crumbs { padding-top: 30px !important; } }

/* Keep long names and balances out of the compact phone bar; both remain
   visible at the top of its menu. Header targets meet the 44px touch size. */
html.gem-hdr6 .top .ib { min-width: 44px; min-height: 44px; }
html.gem-hdr6 .top .r6-burger { min-width: 44px; min-height: 44px; }
@media (max-width: 760px) {
  html.gem-hdr6 .top .gem-hdr-credit { display: none; }
  html.gem-hdr6.gem-hdr6 .top .top-r { gap: 0; }
}
@media (min-width: 1041px) and (max-width: 1199px) {
  html.gem-hdr6 .top .gem-hdr-hello-t { max-width: 9ch; }
  html.gem-hdr6 .top .gem-hdr-credit { padding-inline: 7px; }
  html.gem-hdr6 .top .gem-hdr-credit-l { display: none; }
  html.gem-hdr6 .top .mainnav { gap: 4px; }
}
html.gem-hdr6 { scroll-padding-top: calc(var(--gh-bar) + var(--gh-strip) + 16px); }
@media (max-width: 760px) { html.gem-hdr6 { scroll-padding-top: calc(var(--gh-bar) + 16px); } }
.gem-skip:focus { position: fixed; z-index: 10001; top: 8px; left: 8px; padding: 12px 18px; background: #fff; color: #01010C; outline: 2px solid #D39700; }
.gem-hdr-search { width: min(560px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 12px; background: #fff; color: #01010C; box-shadow: 0 16px 48px rgba(1, 1, 12, .25); font-family: "Quasimoda", system-ui, sans-serif; }
.gem-hdr-search::backdrop { background: rgba(1, 1, 12, .5); }
.gem-hdr-search-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.gem-hdr-search h2 { margin: 0; color: #01010C; font-size: 1.5rem; line-height: 1.25; }
.gem-hdr-search [data-gem-search-close] { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: #F6F4F0; color: #01010C; cursor: pointer; }
.gem-hdr-search [data-gem-search-close] svg { width: 24px; height: 24px; }
.gem-hdr-search label { display: block; margin-bottom: 8px; font-weight: 600; }
.gem-hdr-search-fields { display: flex; gap: 10px; }
.gem-hdr-search input[type="search"] { min-width: 0; flex: 1; width: 100%; height: 48px; border: 1px solid #777; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 16px; color: #01010C; background: #fff; }
.gem-hdr-search input::placeholder { color: #61616B; }
.gem-hdr-search button[type="submit"] { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 8px; background: #EAC66E; color: #01010C; font: 700 1rem "Quasimoda", system-ui, sans-serif; cursor: pointer; }
.gem-hdr-search button:hover { background: #E1A91B; }
.gem-hdr-search :is(input,button):focus-visible { outline: 2px solid #01010C; outline-offset: 3px; }
@media (max-width: 480px) { .gem-hdr-search { padding: 20px; } .gem-hdr-search-fields { flex-wrap: wrap; } .gem-hdr-search button[type="submit"] { width: 100%; } }

/* Switch to the menu before the category links compete with a long greeting. */
@media (max-width: 1199px) {
  html.gem-hdr6.gem-hdr6 .top .mainnav { display: none !important; }
  html.gem-hdr6 .top .r6-burger { display: inline-grid; place-items: center; width: 44px; height: 44px; }
}

.gem-hdr-search h2 { font-family: inherit; }
.r6-nav :is(a, summary, button):focus-visible { outline: 2px solid #D39700; outline-offset: -3px; }

/* Cart count on the header icon (Treyson 11-30): gold with black numerals,
   ringed in the header colour so it reads against the icon. Empty cart: no
   badge at all. */
.top .gem-hdr-cart { position: relative; }
.top .gem-hdr-cart-n { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #E1A91B; color: #01010C; font: 700 11px/18px quasimoda, system-ui, sans-serif; font-variant-numeric: tabular-nums; text-align: center; box-shadow: 0 0 0 2px #450910; pointer-events: none; }
.top .gem-hdr-cart-n[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .top .gem-hdr-cart.is-bump .gem-hdr-cart-n { animation: gem-hdr-cart-bump .45s cubic-bezier(.2, .8, .2, 1); }
  @keyframes gem-hdr-cart-bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
}
