.merch-shell { max-width: 1240px; margin: 0 auto; padding: 40px 24px 64px; }
.merch-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.merch-shell h1 { font-family: Georgia, serif; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; }
.merch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.merch-card { display: flex; flex-direction: column; padding: 24px; margin: 0; min-width: 0; width: 100%; box-sizing: border-box; }
.merch-card h2 { font-size: 21px; line-height: 1.3; }
.merch-card .button { margin-top: auto; text-align: center; }
.merch-preview { position: relative; min-height: 230px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); margin-bottom: 20px; }
.merch-preview svg { max-width: 100%; width: 300px; }
.merch-preview img { width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.merch-preview span { color: var(--muted); font-size: 13px; padding: 12px; }
.merch-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.merch-product > .panel { padding: 28px; min-width: 0; width: 100%; }
.merch-form { display: grid; gap: 16px; }
.merch-form label { display: grid; gap: 6px; }
.merch-form input, .merch-form select { width: 100%; }
.merch-form fieldset { min-width: 0; border: 1px solid var(--line); padding: 16px; }
.merch-form .merch-rate { grid-template-columns: 24px 1fr; align-items: start; margin: 12px 0; }
.merch-rate input { width: auto; margin-top: 6px; }
.merch-rate small { display: block; color: var(--muted); }
.merch-shell .table-wrap { position: relative; }
.merch-table input { width: 80px; }
.merch-total { font-size: 24px; color: var(--gold); }
.merch-order { margin: 20px 0; overflow-wrap: anywhere; }
.merch-shell :focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.merch-shell button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1100px) { .merch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .merch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .merch-grid, .merch-product { grid-template-columns: minmax(0, 1fr); } .merch-heading { flex-direction: column; align-items: flex-start; } .merch-shell { padding: 28px 16px; } .merch-product > .panel { padding: 20px; } }

.merch-filters { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; margin-top: 28px; }
.merch-filters fieldset { display: flex; gap: 8px; border: 0; padding: 0; margin: 0; }
.merch-filters button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.merch-filters label { display: grid; gap: 6px; min-width: 0; flex: 1; }
.merch-filters select { width: 100%; max-width: 100%; }
@media (max-width: 600px) { .merch-filters label { flex-basis: 100%; } }

.merch-preview--views { aspect-ratio: 4 / 5; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; user-select: none; }
.merch-image-track { position: absolute; inset: 0; display: flex; transition: transform .2s ease; }
.merch-preview--views .merch-image-track img { flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; max-height: none; object-fit: contain; }
.merch-image-track img[hidden], .merch-gallery-controls[hidden] { display: none; }
.merch-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; font-size: 28px; line-height: 1; color: #fff; background: #061635d9; opacity: 1; }
.merch-gallery-prev { left: 6px; } .merch-gallery-next { right: 6px; }
.merch-gallery-arrow:disabled { opacity: .45; }
.merch-gallery-arrow:focus-visible { outline: 3px solid var(--gold, #e7bc60); outline-offset: 2px; }
.merch-gallery-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 0; }
.merch-gallery-dots button { width: 32px; height: 32px; padding: 10px; border: 0; border-radius: 50%; background: transparent; }
.merch-gallery-dots button::after { content: ''; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.merch-gallery-dots button[aria-current="true"]::after { background: var(--gold); }
@media (prefers-reduced-motion: reduce) { .merch-image-track { transition: none; } }

.merch-heading { align-items: flex-start; gap: 16px; }
.merch-heading h1 { margin: 6px 0 10px; font-size: clamp(30px, 3vw, 40px); }
.merch-heading p { margin: 6px 0; }
.merch-heading .eyebrow { font-size: 12px; }
.merch-heading .button { white-space: nowrap; }
.merch-price-summary { font-size: 14px; color: var(--muted); }
.merch-filters { margin-top: 20px; }
.merch-filters [hidden] { display: none; }
@media (max-width: 600px) { .merch-heading { flex-direction: row; } .merch-heading > div { min-width: 0; } .merch-heading .button { padding: 10px; font-size: 12px; } }



.merch-filter-cart { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 600px) { .merch-filters .merch-filter-cart { margin-left: auto; } }

.merch-filters .merch-filter-cart { margin-left: auto; }
@media (min-width: 601px) { .merch-filters label { flex: 0 1 420px; } }
.merch-filters { width: 100%; max-width: none; }

/* Match the approved neutral mockup background across the full gallery frame. */
.merch-preview--views { background: #eeece7; }

.merch-color-options { margin-top: .75rem; }
.merch-color-options p { margin: 0 0 .5rem; }
.merch-swatch-list { display:flex; flex-wrap:wrap; gap:.5rem; }
.merch-swatch { display:inline-flex; align-items:center; gap:.45rem; min-height:44px; padding:.45rem .65rem; border:2px solid transparent; border-radius:.5rem; background:#18294c; color:#f3eee2; font-size:.85rem; }
.merch-swatch span { display:inline-block; width:22px; height:22px; border:1px solid #b4b7bd; border-radius:50%; }
.merch-swatch[aria-pressed="true"] { border-color:#d5b46d; }
.merch-swatch:focus-visible { outline:3px solid #fff; outline-offset:2px; }

/* Merchandise hero fits its text on phones; desktop and other page heroes stay unchanged. */
@media (max-width: 720px) {
  .match-hero.merch-site-hero {
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .merch-site-hero .match-hero__content > :last-child { margin-bottom: 0; }
}

/* Shipping radios must not inherit text-input padding or full-width sizing. */
.merch-form label.merch-rate { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 0; }
.merch-form .merch-rate input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; align-self: center; }
.merch-rate > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .merch-shell .table-wrap:has(.merch-cart-table) { overflow: visible; }
  .merch-cart-table, .merch-cart-table tbody { display: block; width: 100%; min-width: 0; }
  .merch-cart-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .merch-cart-table tr { display: block; padding: 12px; border-bottom: 1px solid var(--line); }
  .merch-cart-table td { display: grid; grid-template-columns: minmax(0, 1fr); width: auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; padding: 8px 0; }
  .merch-cart-table td::before { content: attr(data-label); font-weight: 700; color: var(--gold); }
  .merch-cart-table input[type="number"] { width: 100%; max-width: 120px; min-width: 0; box-sizing: border-box; }
  .merch-cart-table button { max-width: 100%; }
}
