/* gem-site-edits.css: site-wide refinements from the Oct 2026 name tag page
   review (design copy: css/99-design-edits.css). Loads after gem-h.css on
   every page: the footer fixes apply everywhere, and the buy card rules style
   the decluttered rail in woocommerce/content-single-product.php. */

/* Footer: gold frame line brought in from the edge, and the link columns
   shifted left so no link runs over the trophy watermark (bottom right). */
.foot::after { inset: 17px 17px auto 17px; }
@media (min-width: 1400px) {
  .fg { grid-template-columns: 340px clamp(36px, calc((100vw - 1440px) * .45 + 36px), 260px) 190px 48px 190px 48px 190px 1fr; }
}
@media (min-width: 1041px) and (max-width: 1399px) {
  .fg { grid-template-columns: 270px 24px 165px 36px 165px 36px 165px minmax(280px, 1fr); }
}

/* Footer at tablet/phone widths. The theme's own fallback (.fg 1fr 1fr) never
   applied, because the desktop column pins (.fg>div:nth-child(n)) outrank it,
   so the link groups were crammed into extra columns. Brand on its own row,
   link groups below; the trophy shrinks into the corner behind the base strip. */
@media (max-width: 1040px) {
  .fg { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; row-gap: 30px; }
  .fg > div:nth-child(n) { grid-column: auto; }
  .fg > div.b-brand { grid-column: 1 / -1; }
  .foot .wm { width: 230px; right: -50px; bottom: -70px; }
}
@media (max-width: 560px) {
  .fg { grid-template-columns: 1fr 1fr; }
  .fg > div.b-brand { grid-column: auto; }   /* phone: brand + Explore, then Resources + Company */
  .foot::after { inset: 14px 14px auto 14px; }
}

/* Buy card, decluttered: one proof pill, one quiet rating line, a one-line
   description, and a two-line price block (price, then member rate). Navy for
   what to read, grey for support, gold only for stars and the Join link. */
.rating-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px; margin-top: 8px; font-size: .9rem; color: var(--slate); }
.rating-line .rating-row { margin-top: 0; font-size: inherit; gap: 6px; }
.rating-line .rating-more { color: var(--slate); }
.rail-lead { color: var(--slate); font-size: .98rem; line-height: 1.5; margin: 12px 0 18px; }
.price-block { padding: 16px 0 18px; }
.price-block .price-line b { font-size: 1.9rem; }
.price-block .price-line span { font-size: .9rem; }
.mem-line { margin-top: 8px; font-size: .92rem; color: var(--slate); }
.mem-line b { color: var(--navy); font-weight: 600; }
.mem-line .mem-join { margin-top: 0; font-size: inherit; }
.rating-line .rating-more::before { content: "· "; }
@media (max-width: 560px) {
  .rating-line .rating-more { flex-basis: 100%; }
  .rating-line .rating-more::before { content: none; }
  .price-block .price-line { flex-wrap: wrap; row-gap: 2px; }
  .price-block .price-line span { flex-basis: 100%; }
}
@media (max-width: 560px) {
  /* no nowrap on the button: a long label ("Design Your Bell Engraving") set
     the rail column's minimum width and pushed the collage off a 375px screen.
     The text shrinks a little on narrow phones so most labels keep one line;
     longer ones wrap into two even lines. */
  /* !important only because the design vault plugin forces its own size and
     padding on .gnd-open-btn with !important (match-previous.css) */
  .rail .gnd-open-btn { font-size: clamp(.92rem, 4vw, 1.05rem) !important; line-height: 1.25 !important; text-wrap: balance; padding-left: 12px !important; padding-right: 12px !important; }
  /* taller tap targets for the small rail links, same visual layout */
  .rating-line .rating-row, .mem-line .mem-join { padding-top: 10px; padding-bottom: 10px; margin-top: -10px; margin-bottom: -10px; }
}

/* Footer, desktop (Treyson 11-03; supersedes the two desktop rules above): the three link columns centered between
   the brand and the trophy watermark, with the gaps between them growing as the
   screen widens. The trophy grows with the screen (260px wide at 1100 to its
   full 400px from 1760), and --fg-t is how far it reaches in from the right
   edge (its width less the 60px that hangs off the edge). The grid stops at the
   page margin (--fg-m), so --fg-wm reserves the trophy's share inside it, and
   --fg-x adds the margin's extra width on the left once the trophy sits out in
   the margin. Under ~1100px the columns sit just after the brand. */
@media (min-width: 1041px) {
  .foot .wm { width: clamp(260px, calc(25vw - 40px), 400px); }
  .fg {
    --fg-t: clamp(200px, calc(25vw - 100px), 340px);
    --fg-gap: clamp(36px, calc(5vw - 24px), 112px);
    --fg-m: max(72px, (100vw - 1576px) / 2);
    --fg-wm: clamp(0px, calc(var(--fg-t) - var(--fg-m)), 268px);
    --fg-x: clamp(0px, calc(var(--fg-m) - var(--fg-t)), 600px);
    grid-template-columns: 340px minmax(0, var(--fg-x)) minmax(36px, 1fr) 190px var(--fg-gap) 190px var(--fg-gap) 190px minmax(36px, 1fr) minmax(0, var(--fg-wm));
  }
  .fg > div:nth-child(2) { grid-column: 4; }
  .fg > div:nth-child(3) { grid-column: 6; }
  .fg > div:nth-child(4) { grid-column: 8; }
}
@media (min-width: 1280px) and (max-width: 1399px) {
  .fg { grid-template-columns: 270px minmax(0, var(--fg-x)) minmax(36px, 1fr) 165px var(--fg-gap) 165px var(--fg-gap) 165px minmax(36px, 1fr) minmax(0, var(--fg-wm)); }
}
@media (min-width: 1041px) and (max-width: 1279px) {
  .fg { grid-template-columns: 270px minmax(0, var(--fg-x)) minmax(36px, 1fr) 150px var(--fg-gap) 150px var(--fg-gap) 150px minmax(36px, 1fr) minmax(0, var(--fg-wm)); }
}

/* ---- added-to-cart message (inc/gem-pdp.php wc_add_to_cart_message_html;
   Treyson 11-11). A white confirmation card clear of the hanging logo
   plate: gold check, ink title, gray product name, gold View cart and a gray
   underlined Checkout link. ---- */
html body .woocommerce-notices-wrapper:has(.gem-atc) { margin: 52px auto 0; }
html body .woocommerce-message:has(.gem-atc) {
  display: block; margin: 0 0 8px; padding: 14px 16px 14px 18px; box-sizing: border-box;
  background: #fff; border: 1px solid #EBEBED; border-radius: 16px;
  box-shadow: 0 10px 30px -18px rgba(1, 1, 12, .35); color: #61616B;
}
html body .woocommerce-message:has(.gem-atc)::before,
html body .woocommerce-message:has(.gem-atc)::after { display: none !important; content: none !important; }
html body .gem-atc { display: flex; align-items: center; gap: 14px; font-family: "Quasimoda", system-ui, sans-serif; }
html body .gem-atc__check { flex: none; position: relative; width: 38px; height: 38px; border-radius: 50%; background: #FBF5E6; }
html body .gem-atc__check::after { content: ""; position: absolute; left: 14px; top: 10px; width: 8px; height: 14px; border: solid #B07E00; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
html body .gem-atc__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
html body .gem-atc__title { font-size: 1.02rem; font-weight: 700; line-height: 1.25; color: #01010C; }
html body .gem-atc__item { font-size: .92rem; line-height: 1.35; color: #61616B; overflow-wrap: anywhere; }
html body .gem-atc__act { display: flex; align-items: center; gap: 18px; flex: none; }
html body .woocommerce-message .gem-atc a.gem-atc__btn {
  float: none; margin: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px;
  border: 0; border-radius: 999px; background: linear-gradient(180deg, #EAC66E, #D39700); color: #fff;
  font: 700 .95rem/1 "Quasimoda", system-ui, sans-serif; text-decoration: none; box-shadow: none;
}
html body .woocommerce-message .gem-atc a.gem-atc__btn:hover { filter: brightness(1.05); color: #fff; }
html body .woocommerce-message .gem-atc a.gem-atc__link { color: #61616B; font-weight: 600; font-size: .95rem; text-decoration: underline; text-decoration-color: #61616B; text-underline-offset: 3px; }
html body .woocommerce-message .gem-atc a.gem-atc__link:hover { color: #01010C; text-decoration-color: #01010C; }
html body .woocommerce-message .gem-atc a:focus-visible { outline: 2px solid #D39700; outline-offset: 3px; }
@media (max-width: 640px) {
  html body .woocommerce-notices-wrapper:has(.gem-atc) { margin-top: 40px; }
  html body .gem-atc { flex-wrap: wrap; gap: 12px; }
  html body .gem-atc__act { width: 100%; justify-content: space-between; }
  html body .woocommerce-message .gem-atc a.gem-atc__btn { flex: 1; }
}

/* ---- added-to-cart toast (assets/gem-atc-toast.js moves the card here):
   bottom right, slides up, then a gold check flies into the header cart
   icon, which bumps. ---- */
html body .gem-atc-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 100000; width: min(400px, calc(100vw - 32px));
  opacity: 0; transform: translateY(18px) scale(.98); pointer-events: none;
  transition: opacity .32s cubic-bezier(.16, 1, .3, 1), transform .42s cubic-bezier(.16, 1, .3, 1);
}
html body .gem-atc-toast.is-in { opacity: 1; transform: none; pointer-events: auto; }
html body .gem-atc-toast.is-out { opacity: 0; transform: translateY(10px); transition-duration: .3s; }
html body .gem-atc-toast .woocommerce-message:has(.gem-atc) { margin: 0; padding: 16px 16px 16px 18px; box-shadow: 0 18px 44px -16px rgba(1, 1, 12, .38), 0 2px 6px rgba(1, 1, 12, .06); }
html body .gem-atc-toast .gem-atc { flex-wrap: wrap; row-gap: 14px; position: relative; }
html body .gem-atc-toast .gem-atc__txt { padding-right: 28px; }
html body .gem-atc-toast .gem-atc__act { width: 100%; justify-content: flex-end; gap: 20px; }
html body .gem-atc__close {
  position: absolute; top: -6px; right: -6px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #61616B; font: 400 22px/1 system-ui, sans-serif; cursor: pointer;
  display: grid; place-items: center;
}
html body .gem-atc__close:hover { color: #01010C; background: #F4F4F6; }
html body .gem-atc__close:focus-visible { outline: 2px solid #D39700; outline-offset: 1px; }
html body .gem-atc-ghost {
  position: fixed; z-index: 100001; width: 38px; height: 38px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(180deg, #EAC66E, #D39700); box-shadow: 0 6px 16px -4px rgba(176, 126, 0, .55);
}
html body .gem-atc-ghost::after { content: ""; position: absolute; left: 14px; top: 10px; width: 8px; height: 14px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
@keyframes gem-cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  60% { transform: scale(.94); }
  100% { transform: scale(1); }
}
html body header a.gem-cart-bump svg { animation: gem-cart-bump .6s cubic-bezier(.3, 1.4, .5, 1); color: #EAC66E; stroke: #EAC66E; }
html body .woocommerce-message:has(.gem-atc):focus { outline: none; }
@media (max-width: 640px) {
  html body .gem-atc-toast { right: 16px; left: 16px; bottom: 16px; width: auto; }
  html body .gem-atc-toast .gem-atc__act { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html body .gem-atc-toast { transform: none; transition: opacity .2s linear; }
}
