/* ==========================================================================
   Virts Packs — PLP cards + PDP (SPEC §2.2 Packs, §6.1 pack rows;
   pattern: lifeisgood.com/collections/solid-bundle-packs).
   House tokens come from virts-theme.css (:root --virts-*); every consumer
   repeats the var(--virts-x, #HEX) fallback style. Marigold stays on
   large text / pills / offer surfaces only (WCAG rule from the brief).
   ========================================================================== */

/* --- PLP: /collections/packs ------------------------------------------------ */
.virts-packs { padding-block: 2.25rem 3.5rem; }
.virts-packs-head { margin-bottom: 1.75rem; }
.virts-packs-title {
  font-family: "Libre Franklin", "Franklin Gothic", Arial, sans-serif;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 0 .4rem;
  color: var(--virts-ink, #393D3C);
}
.virts-packs-sub { margin: 0; color: var(--virts-teal, #526870); max-width: 46ch; }

.virts-pack-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) { .virts-pack-grid { grid-template-columns: 1fr; } }

.virts-pack-card { break-inside: avoid; }
.virts-pack-card-in {
  display: block; height: 100%;
  background: var(--virts-paper, #FFFFFF);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  color: var(--virts-ink, #393D3C);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--virts-ink, #393D3C) 8%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.virts-pack-card-in:hover { transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--virts-ink, #393D3C) 14%, transparent); }

/* media area: real flat-lay photo when attached, CSS/SVG tee stack until then */
.virts-pack-media {
  position: relative; display: block;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 90% at 50% 8%, #FBF7EE 0%, var(--virts-bg, #EFE9DB) 70%);
  border-bottom: 1px solid color-mix(in srgb, var(--virts-ink, #393D3C) 8%, transparent);
  overflow: hidden;
}
.virts-pack-media > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* square flat-lay renders (scripts/render_shirts.py): contain shows the whole
     stack in the 4:3 card; flip back to cover when wide real pack photos land */
  object-fit: contain; display: block;
}
.virts-pack-media-note {
  position: absolute; bottom: .7rem; left: 50%; transform: translateX(-50%); z-index: 2;
  background: rgba(57, 61, 60, .82); color: #EFE9DB;
  font-size: .62rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  padding: .28rem .7rem; border-radius: 999px; white-space: nowrap;
}

/* shirt-count chip — marigold offer pill, charcoal label (5.1:1) */
.virts-pack-count-chip {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: var(--virts-marigold, #F59E0B); color: var(--virts-ink, #393D3C);
  font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px;
}

/* --- stacked-tee flat-lay placeholder (LiG pack-photo composition) ----------
   Real pack photography is Chris's Phase 0 action (README-virts.md): once a
   pack product has a featured image the <img> branch replaces this, no theme
   work. Until then the stack reads as an intentional merch graphic.
   DOM order = bottom of stack first; negative margins overlap upward so the
   LAST member sits on top fully visible — the members list is authored so
   the marquee virtue comes last where that matters visually. */
.virts-tee-stack {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; padding: 1.4rem 1.2rem 1.2rem;
}
.virts-tee {
  width: 52%; margin-bottom: -16%;
  transform: rotate(var(--tee-tilt, -1.4deg));
}
.virts-tee:nth-child(even) { --tee-tilt: 1.5deg; margin-left: 7%; }
.virts-tee:nth-child(odd)  { margin-right: 7%; }
.virts-tee:last-child { margin-bottom: 0; }
.virts-tee-shape { display: block; width: 100%; height: auto; }
.virts-tee-shape path {
  fill: var(--tee, #F4F1E8);
  stroke: color-mix(in srgb, var(--virts-ink, #393D3C) 30%, transparent);
  stroke-width: 1.5;
}
.virts-tee-word {
  position: absolute; inset-inline: 0; top: 44%;
  text-align: center; font-weight: 700; font-size: .6rem; line-height: 1.15;
  letter-spacing: .06em; color: var(--tee-ink, #393D3C);
  font-family: "Libre Franklin", Arial, sans-serif; text-transform: uppercase;
}
.virts-tee { position: relative; }

/* --- card meta: name, dual price, swatch dots -------------------------------- */
.virts-pack-meta { display: block; padding: .95rem 1.1rem 1.15rem; }
.virts-pack-name {
  display: block; font-weight: 700; font-size: 1.0625rem;
  font-family: "Libre Franklin", Arial, sans-serif; margin-bottom: .35rem;
}
.virts-pack-prices { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.virts-pack-price { font-weight: 700; font-size: 1.125rem; }
.virts-pack-msrp {
  color: color-mix(in srgb, var(--virts-ink, #393D3C) 55%, transparent);
  font-size: .875rem;
}
.virts-pack-save {
  background: var(--virts-marigold, #F59E0B); color: var(--virts-ink, #393D3C);
  font-weight: 700; font-size: .6875rem; letter-spacing: .07em; text-transform: uppercase;
  padding: .18rem .5rem; border-radius: 999px;
}
.virts-pack-swatches { display: flex; gap: .35rem; margin-top: .7rem; }
.virts-dot {
  width: .95rem; height: .95rem; border-radius: 50%; display: inline-block;
  background: var(--tee, #F4F1E8);
  border: 1px solid color-mix(in srgb, var(--virts-ink, #393D3C) 35%, transparent);
}

/* --- PDP: products/pack-* --------------------------------------------------- */
.virts-pack-pdp {
  padding-block: 2rem 3.5rem;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: start;
}
@media (max-width: 750px) { .virts-pack-pdp { grid-template-columns: 1fr; gap: 1.5rem; } }
.virts-pack-pdp-media .virts-pack-media { aspect-ratio: 1 / 1; border-radius: 14px; }

.virts-pack-pdp-title {
  font-family: "Libre Franklin", "Franklin Gothic", Arial, sans-serif;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: .35rem 0 .5rem;
  color: var(--virts-ink, #393D3C);
}
.virts-pack-pdp-badges { display: flex; gap: .5rem; align-items: center; }
.virts-pack-pdp-badges .virts-pack-count-chip { position: static; }

.virts-pack-pdp-prices { display: flex; align-items: baseline; gap: .6rem; margin: .9rem 0 .2rem; }
.virts-pack-pdp-prices .virts-pack-price { font-size: 1.6rem; }
.virts-pack-pdp-msrpnote { margin: 0 0 1rem; color: var(--virts-teal, #526870); font-size: .875rem; }
.virts-pack-pdp-copy { line-height: 1.55; }

.virts-pack-includes { margin-top: 1.5rem; }
.virts-pack-includes h2, .virts-pack-giveback h2 {
  font-family: "Libre Franklin", Arial, sans-serif; font-size: 1.0625rem;
  letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .6rem;
}
.virts-include-list { list-style: none; margin: 0; padding: 0; }
.virts-include-list li {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--virts-ink, #393D3C) 10%, transparent);
}
.virts-include-num {
  font-variant-numeric: tabular-nums; font-size: .75rem; letter-spacing: .06em;
  color: var(--virts-teal-soft, #758992);
}
.virts-include-list a { color: var(--virts-ink, #393D3C); font-weight: 600; }
.virts-include-list a:hover { text-decoration-color: var(--virts-marigold, #F59E0B); }
.virts-include-alias {
  font-size: .75rem; color: var(--virts-teal, #526870); font-style: italic;
}
.virts-include-price { margin-left: auto; font-size: .8125rem;
  color: color-mix(in srgb, var(--virts-ink, #393D3C) 60%, transparent); }
.virts-pack-total { margin: .8rem 0 0; font-size: .875rem; }

/* giveback math block — "3 shirts -> 3 months" (per SHIRT, never per pack) */
.virts-pack-giveback {
  margin-top: 1.6rem; padding: 1rem 1.1rem; border-radius: 12px;
  background: var(--virts-ink, #393D3C); color: var(--virts-bg, #EFE9DB);
}
.virts-pack-giveback h2 { color: var(--virts-marigold, #F59E0B); }
.virts-pack-giveback strong { color: var(--virts-paper, #FFFFFF); }
.virts-pack-giveback p { margin: 0 0 .4rem; font-size: .9375rem; line-height: 1.5; }
.virts-pack-giveback p:last-child { margin-bottom: 0; }

/* size picker — ONE size for the whole pack (LiG pack pattern), no JS needed
   to read it; the shipped JS only syncs the hidden variant id */
.virts-pack-form { margin-top: 1.6rem; }
.virts-pack-size-label {
  display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; margin-bottom: .6rem;
}
.virts-pack-size-label span { font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--virts-teal, #526870); }
.virts-size-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.virts-size-pill {
  border: 1.5px solid color-mix(in srgb, var(--virts-ink, #393D3C) 30%, transparent);
  border-radius: 10px; padding: .5rem .95rem; cursor: pointer;
  font-weight: 600; font-size: .875rem; user-select: none;
}
.virts-size-pill input { position: absolute; opacity: 0; pointer-events: none; }
.virts-size-pill:hover { border-color: var(--virts-ink, #393D3C); }
.virts-size-pill.is-selected {
  border-color: var(--virts-ink, #393D3C);
  background: var(--virts-marigold, #F59E0B); color: var(--virts-ink, #393D3C);
}
.virts-size-pill.is-focus { outline: 2px solid var(--virts-navy, #2A3C67); outline-offset: 2px; }
.virts-size-pill.is-unavailable { opacity: .45; text-decoration: line-through; cursor: not-allowed; }

.virts-pack-buy {
  display: block; width: 100%; padding: .95rem 1rem;
  background: var(--virts-ink, #393D3C); color: var(--virts-paper, #FFFFFF);
  border: 0; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer;
  font-family: "Libre Franklin", Arial, sans-serif;
}
.virts-pack-buy:hover { background: var(--virts-navy, #2A3C67); }
.virts-pack-note { margin: .6rem 0 0; font-size: .75rem; color: var(--virts-teal, #526870); }
