/**
 * Spirit Store: the product grid. Forked from the activities tile grid so a
 * store card and a fundraising card read as the same family; theme-token
 * fallbacks keep the module presentable on any theme.
 */

.rt-store-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 24px;
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto;
}
@media (min-width: 760px) {
  .rt-store-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .rt-store-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Fewer products than lanes: tracks size to a card and the set centers
   (RallyTrain rule: a short row never parks left). */
@media (min-width: 760px) {
  .rt-store-grid.rt-store-grid--n1 { grid-template-columns: repeat(1, minmax(0, 360px)); justify-content: center; }
  .rt-store-grid.rt-store-grid--n2 { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; }
}
@media (min-width: 1100px) {
  .rt-store-grid.rt-store-grid--n3 { grid-template-columns: repeat(3, minmax(0, 360px)); justify-content: center; }
}

.rt-store-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rt-store-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rt-shadow-lift, 0 10px 24px rgba(0, 0, 0, 0.12));
}

/* Artwork band: the product's own photo, or a branded fallback. */
.rt-store-art {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 150px;
  background-color: var(--rt-black, #141414);
  /* Product art over the brand mark: if the remote image is absent or fails,
     the mark shows through instead of an empty black band. */
  background-image: var(--rt-store-art, none), var(--rt-banner-logo, none);
  background-size: cover, 45%;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
/* No artwork: a slim branded strip instead of a tall empty rectangle. */
/* The band carries the card's title (Furi, 9-15: an empty black strip with
   the title under it read as a mistake). Site mark stays at the right. */
.rt-store-art--slim {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  min-height: 72px;
  height: auto;
  padding: 12px 86px 12px 18px;
  background-image: var(--rt-banner-logo, none);
  background-size: auto 54px;
  background-position: right 16px center;
  background-color: var(--rt-black, #141414);
  box-shadow: inset 0 -3px 0 var(--rt-primary, #f4b41c);
}

.rt-store-body {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rt-store-name {
  margin: 0 0 4px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.25rem;
}
.rt-store-name a {
  color: inherit;
  text-decoration: none;
}
.rt-store-name a:hover {
  text-decoration: underline;
}
.rt-store-art--slim .rt-store-name {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.15;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.rt-store-art--slim .rt-store-name a { color: #fff; }

/* The art band's link wrapper must not add anchor styling around a div. */
.rt-store-artlink {
  display: block;
  line-height: 0;
}

/* Secondary rather than primary for the numerals: primary is a light brand
   accent on Henry-family palettes, and a price has to be readable text. */
.rt-store-price {
  margin: 0 0 8px;
  color: var(--rt-secondary, #d99a00);
  font-weight: 700;
  font-size: 1.02rem;
}

.rt-store-ctas {
  margin-top: auto;
  padding-top: 12px;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  /* House rule (Furi, 8-24): action buttons center in their card; only a
     backwards action (Back, Cancel) earns an edge. */
  justify-content: center;
}

/* Same visual language as the activities lens buttons (.rt-act-btn),
   including the !important that outguns page-builder link colors. The button
   element needs the extra resets an anchor never did. */
.rt-store-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}
.rt-store-btn:hover {
  background: var(--rt-secondary, #d99a00);
}

/* Size / option picker next to the Add to Cart button. */
.rt-store-variations {
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 8px);
  background: #fff;
  font-size: 0.9rem;
}

/* Sold out: same quiet chip as a closed activity. */
.rt-store-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--rt-line, #e7e2d6);
  color: var(--rt-gray, #6b6b6b);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Filter toolbar (search + category chips) ----------------------------- */

.rt-store-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto 20px;
}

.rt-store-search {
  flex: 0 1 280px;
  min-width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: 999px;
  background: #fff;
  color: var(--rt-ink, #1f1f1f);
  font-family: inherit;
  font-size: 0.9rem;
}
.rt-store-search:focus {
  outline: none;
  border-color: var(--rt-secondary, #d99a00);
}

.rt-store-noresults {
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto 20px;
  color: var(--rt-gray, #6b6b6b);
}

.rt-store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rt-store-chipbtn {
  padding: 6px 16px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: 999px;
  background: #fff;
  color: var(--rt-ink, #1f1f1f);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: inherit;
  cursor: pointer;
}
.rt-store-chipbtn:hover {
  border-color: var(--rt-secondary, #d99a00);
}
.rt-store-chipbtn.is-active {
  background: var(--rt-primary, #f4b41c);
  border-color: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414);
  font-weight: 700;
}

/* A chip filtered this card out. */
.rt-store-card.is-filtered {
  display: none;
}

/* ---- Quantity stepper (grid cards and detail page) ------------------------ */

.rt-store-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rt-store-stepbtn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: 999px;
  background: #fff;
  color: var(--rt-ink, #1f1f1f);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.rt-store-stepbtn:hover {
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414);
}

.rt-store-qty {
  width: 52px;
  padding: 6px 8px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 8px);
  background: #fff;
  font: inherit;
  text-align: center;
}

/* ---- Modifier groups (detail page) ---------------------------------------- */

.rt-store-mods {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 6px;
}

.rt-store-mod-group {
  margin: 0;
  padding: 10px 14px 12px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
}
.rt-store-mod-group legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 0.9rem;
}
/* A MULTIPLE group whose min/max is not met yet, flagged on Add. */
.rt-store-mod-group.is-short {
  border-color: #b32d2e;
}
/* Required groups wear an asterisk so they never read as skippable. The
   is-required class comes from the template for always-required fields and
   from store-cart.js when a paid choice flips a text field to required. */
.rt-store-mod-group.is-required legend::after {
  content: " *";
  color: #b32d2e;
  font-weight: 700;
}
/* Add to Cart waits, unclickable, until required options are filled. A plain
   cursor, not a blocked one: the button's tooltip says why it is waiting. */
.rt-store-add:disabled {
  opacity: 0.55;
  cursor: default;
}

.rt-store-mod {
  display: block;
  margin: 4px 0;
}
.rt-store-mod input {
  margin-right: 6px;
}

/* Text personalization (Square TEXT modifiers): a plain input in the group. */
.rt-store-mod-text {
  width: 100%;
  max-width: 340px;
  padding: 8px 10px;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: 8px;
  font: inherit;
}
.rt-store-mod-group--text.is-short .rt-store-mod-text {
  border-color: #b32d2e;
}
.rt-store-mod-optional {
  font-weight: 400;
  color: var(--rt-gray, #6b6b6b);
}
.rt-store-mod-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--rt-gray, #6b6b6b);
}
.rt-store-mod-group--text.is-short .rt-store-mod-hint {
  color: #b32d2e;
}

/* ---- Store policies -------------------------------------------------------- */

.rt-store-policies {
  max-width: var(--rt-maxw, 1120px);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--rt-line, #e7e2d6);
}

.rt-store-policies-heading {
  margin: 0 0 6px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.3rem;
}

.rt-store-policy h3 {
  margin: 14px 0 4px;
  font-size: 1rem;
}
.rt-store-policy p {
  margin: 0 0 10px;
}

/* ---- Product detail page --------------------------------------------------- */

.rt-store-detail-page {
  padding: 24px 16px 48px;
}

.rt-store-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  width: 100%;
  max-width: var(--rt-maxw, min(1440px, 94vw));
  margin: 0 auto;
}
@media (min-width: 900px) {
  .rt-store-detail {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    align-items: start;
    gap: 40px;
  }
}

.rt-store-gallery-main {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* Portrait art (a membership badge) must not run the page: cap the
     height and let it sit centered in its column. */
  max-height: min(520px, 70vh);
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  background: #fff;
}

.rt-store-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.rt-store-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  line-height: 0;
  cursor: pointer;
}
.rt-store-thumb img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}
.rt-store-thumb.is-active {
  border-color: var(--rt-primary, #f4b41c);
}

.rt-store-detail-name {
  margin: 0 0 8px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--rt-black, #141414);
}

.rt-store-detail .rt-store-price {
  font-size: 1.3rem;
}

.rt-store-detail-desc {
  margin: 0 0 20px;
}

.rt-store-detail-ctas {
  padding-top: 4px;
}

.rt-store-back {
  margin: 28px 0 0;
}
.rt-store-back a {
  color: var(--rt-ink, #1f1f1f);
  font-weight: 600;
  text-decoration: none;
}
.rt-store-back a:hover {
  text-decoration: underline;
}

/* Foreign themes may not define WordPress's screen-reader-text helper. */
.rt-store-detail .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Standalone scope (foreign theme): match the site's heading face, as the
   other modules' standalone scopes do, and supply the type scaffold the
   fallback detail template gets from no theme. */
.rt-store-standalone .rt-store-name {
  font-family: Oswald, Helvetica, Arial, sans-serif;
}
.rt-store-standalone.rt-store-detail-page {
  font-family: var(--rt-font, "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif);
  color: var(--rt-ink, #1f1f1f);
  line-height: 1.6;
}
.rt-store-standalone .rt-store-detail-name,
.rt-store-standalone .rt-store-policies-heading {
  font-family: Oswald, Helvetica, Arial, sans-serif;
}

/* Donation: the typed amount next to the Any Amount option */
.rt-store-amount-wrap { display: inline-flex; align-items: center; gap: .35em; margin: 0 .5rem .5rem 0; font-weight: 700; }
.rt-store-amount-wrap .rt-store-amount-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-right: .3em; }
.rt-store-amount { width: 7em; padding: .45em .6em; border: 2px solid var(--rt-primary, #2566b6); border-radius: 8px; font-size: 1.05rem; font-weight: 800; }

/* Pick-one options are a dropdown, not a column of radios (Danielle, 8-31).
   The filter box only appears above a long list. */
.rt-store-mod-select,
.rt-store-mod-search {
  width: 100%;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--rt-line, #cbd5e0);
  border-radius: var(--rt-radius, 10px);
  background: var(--rt-paper, #fff);
  color: inherit;
  margin-top: 4px;
}
.rt-store-mod-search { margin-bottom: 6px; }

/* The hidden attribute has to beat the display rules above it. The amount
   box is inline-flex, which quietly outranked [hidden], so the custom
   amount field showed on every donation no matter which amount was picked
   (Danielle, 8-31). Same class of bug as the roster tiles. */
.rt-store-amount-wrap[hidden],
.rt-store-mod-group[hidden],
.rt-store-ctas[hidden] {
  display: none !important;
}

/* ---- Pink Out --------------------------------------------------------------
   A product named "Pink Out" (the October awareness shirt and its donation)
   wears pink wherever it shows: its grid card, its own page, and a page that
   sells only Pink Out items (the pairing page). The palette is the cause's,
   not the site's, so it reads the same on every club (Furi, 9-22). */
.rt-store-card--pink,
.rt-store-detail-page--pink,
.rt-store--pink {
  --rt-pink: #e6007e;
  --rt-pink-deep: #b8005f;
  --rt-pink-soft: #ff8ac6;
  --rt-pink-wash: #fff0f7;
}
.rt-store-card--pink {
  border-color: var(--rt-pink-soft);
  background: linear-gradient(180deg, #fff 0%, var(--rt-pink-wash) 100%);
  box-shadow: 0 6px 24px rgba(230, 0, 126, 0.18);
}
.rt-store-card--pink:hover { box-shadow: 0 12px 30px rgba(230, 0, 126, 0.28); }
.rt-store-card--pink .rt-store-art { box-shadow: inset 0 -4px 0 var(--rt-pink); }
.rt-store-card--pink .rt-store-art--slim {
  background-color: var(--rt-pink-deep);
  box-shadow: inset 0 -3px 0 var(--rt-pink-soft);
}
.rt-store-card--pink .rt-store-name a,
.rt-store-detail-page--pink .rt-store-detail-name { color: var(--rt-pink-deep); }
.rt-store-card--pink .rt-store-art--slim .rt-store-name a { color: #fff; }
.rt-store-card--pink .rt-store-price,
.rt-store-detail-page--pink .rt-store-price { color: var(--rt-pink); }
.rt-store-card--pink .rt-store-btn,
.rt-store-detail-page--pink .rt-store-btn {
  background: var(--rt-pink);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(230, 0, 126, 0.35);
}
.rt-store-card--pink .rt-store-btn:hover,
.rt-store-detail-page--pink .rt-store-btn:hover { background: var(--rt-pink-deep); }
.rt-store-card--pink .rt-store-variations:focus,
.rt-store-detail-page--pink .rt-store-variations:focus,
.rt-store-detail-page--pink .rt-store-amount:focus,
.rt-store-detail-page--pink .rt-store-qty:focus {
  outline: none;
  border-color: var(--rt-pink);
  box-shadow: 0 0 0 3px rgba(230, 0, 126, 0.18);
}

/* The ribbon chip: top left of the art band, inline on a slim band, and
   above the title on the item's own page. */
.rt-store-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
  background: var(--rt-pink, #e6007e);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.rt-store-tag .fa-ribbon { font-size: 0.95em; }
.rt-store-art--slim .rt-store-tag { position: static; flex: none; margin-right: 10px; }
.rt-store-detail-page--pink .rt-store-tag { position: static; margin: 0 0 10px; font-size: 0.78rem; }

/* Its own page: a blush panel with soft ribbon-pink light in two corners. */
.rt-store-detail-page--pink .rt-store-detail {
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--rt-pink-soft);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 138, 198, 0.28), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(230, 0, 126, 0.12), transparent 40%),
    linear-gradient(180deg, #fff 0%, var(--rt-pink-wash) 100%);
  box-shadow: 0 10px 34px rgba(230, 0, 126, 0.14);
}
.rt-store-detail-page--pink .rt-store-gallery-main {
  border: 3px solid #fff;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(230, 0, 126, 0.25);
}
.rt-store-detail-page--pink .rt-store-thumb.is-active { outline-color: var(--rt-pink); border-color: var(--rt-pink); }
.rt-store-detail-page--pink .rt-store-back a { color: var(--rt-pink-deep); }

/* A grid that is all Pink Out (the pairing page): the whole band goes blush
   with a soft confetti-dot pattern, so the page itself feels like the day. */
.rt-store--pink {
  padding: clamp(18px, 3vw, 30px) clamp(12px, 2vw, 24px);
  border-radius: 24px;
  background-color: var(--rt-pink-wash);
  background-image:
    radial-gradient(circle, rgba(230, 0, 126, 0.16) 1.5px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 138, 198, 0.24) 1.5px, transparent 2.2px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  box-shadow: inset 0 0 0 1px rgba(230, 0, 126, 0.14);
}
.rt-store--pink .rt-store-search { border-color: var(--rt-pink-soft); }
.rt-store--pink .rt-store-search:focus { border-color: var(--rt-pink); }
.rt-store--pink .rt-store-chipbtn.is-active {
  background: var(--rt-pink);
  border-color: var(--rt-pink);
  color: #fff;
}

/* You've Been Boo'd (the booed Railcar's item): pumpkin orange and twilight
   purple wherever the store shows it, the same pattern as pink. */
.rt-store-card--boo,
.rt-store-detail-page--boo,
.rt-store--boo {
  --boo-orange: #f26b1d;
  --boo-purple: #5b2a86;
  --boo-cream: #fff6e9;
}
.rt-store-card--boo { border-color: var(--boo-orange); background: linear-gradient(180deg, #fff 0%, var(--boo-cream) 100%); }
.rt-store-card--boo:hover { box-shadow: 0 12px 30px rgba(91, 42, 134, 0.28); }
.rt-store-card--boo .rt-store-art { box-shadow: inset 0 -4px 0 var(--boo-orange); }
.rt-store-card--boo .rt-store-art--slim { background-color: var(--boo-purple); box-shadow: inset 0 -3px 0 var(--boo-orange); }
.rt-store-card--boo .rt-store-name a,
.rt-store-detail-page--boo .rt-store-detail-name { color: var(--boo-purple); }
.rt-store-card--boo .rt-store-art--slim .rt-store-name a { color: #fff; }
.rt-store-tag--boo { background: var(--boo-purple, #5b2a86); color: #fff; }
.rt-store-tag--boo i { color: #ffd6b8; }

.rt-store-card--boo .rt-store-price,
.rt-store-detail-page--boo .rt-store-price { color: var(--boo-orange); }
.rt-store-card--boo .rt-store-btn,
.rt-store-detail-page--boo .rt-store-btn { background: var(--boo-orange); color: #fff; }
.rt-store-card--boo .rt-store-btn:hover,
.rt-store-detail-page--boo .rt-store-btn:hover { background: #c8520f; }
.rt-store-detail-page--boo .rt-store-detail {
  border: 1px solid #f7c59f;
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 107, 29, 0.14), transparent 45%),
    radial-gradient(circle at 96% 100%, rgba(91, 42, 134, 0.14), transparent 45%),
    linear-gradient(180deg, #fff 0%, var(--boo-cream) 100%);
}
.rt-store-detail-page--boo .rt-store-tag { position: static; margin: 0 0 10px; font-size: 0.78rem; }
.rt-store-detail-page--boo .rt-store-back a { color: var(--boo-purple); }
