/* ─────────────────────────────────────────────────────────────
   Banner Hill Music — store styles (merch.html only)
   Loaded after style.css. Colors and type match the main site:
   background #0c0c0c / #0f0d0b, text #f0ece4, accent #8b1a1a.
   ───────────────────────────────────────────────────────────── */

/* ── Cart button in the nav ── */
.nav__links { margin-left: auto; }
.nav__cart {
  margin-left: 40px;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.55);
  transition: color 0.25s;
  white-space: nowrap;
}
.nav__cart:hover { color: #f0ece4; }
.nav__cart-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 3px 6px;
  border: 1px solid rgba(240,236,228,0.25);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: center;
  color: rgba(240,236,228,0.7);
  transition: all 0.25s;
}
.nav__cart.has-items { color: #f0ece4; }
.nav__cart.has-items .nav__cart-count {
  background: #8b1a1a;
  border-color: #8b1a1a;
  color: #f0ece4;
}
@media (max-width: 900px) {
  .nav__cart { order: 2; margin-left: auto; }
  .nav__toggle { order: 3; margin-left: 20px; }
}

/* ── Status line (loading / error) ── */
.shop-status {
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: rgba(240,236,228,0.45);
}
.shop-status[hidden] { display: none; }
.shop-status.is-error { color: #d16b4a; }

/* ── Product cards (reuses .merch-card from style.css) ── */
.shop-card {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: shopCardIn 0.8s ease forwards;
}
@keyframes shopCardIn {
  to { opacity: 1; transform: translateY(0); }
}
.shop-card .merch-card__img-wrap { position: relative; width: 100%; }
.shop-card__view {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(12,12,12,0.85));
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: #f0ece4;
  opacity: 0;
  transition: opacity 0.3s;
}
.shop-card:hover .shop-card__view,
.shop-card:focus-visible .shop-card__view { opacity: 1; }
.shop-card .merch-card__name { font-size: 14px; }
.shop-card .merch-card__type { color: rgba(240,236,228,0.55); letter-spacing: 0.12em; }
.shop-card__soldout { color: #8b1a1a; margin-left: 8px; }

.shop-card:focus-visible,
.nav__cart:focus-visible,
.shop-dialog button:focus-visible,
.shop-dialog a:focus-visible {
  outline: 1px solid #f0ece4;
  outline-offset: 3px;
}

/* ── Shared dialog base ── */
.shop-dialog {
  border: 1px solid rgba(240,236,228,0.1);
  background: #0f0d0b;
  color: #f0ece4;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}
.shop-dialog::backdrop {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(2px);
}
.shop-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,12,12,0.6);
  border: 1px solid rgba(240,236,228,0.15);
  color: #f0ece4;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.shop-close:hover { border-color: #8b1a1a; background: rgba(139,26,26,0.25); }
.shop-close svg { width: 14px; height: 14px; }

.shop-btn {
  display: block;
  width: 100%;
  padding: 16px 28px;
  background: #8b1a1a;
  border: 1px solid #8b1a1a;
  color: #f0ece4;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, opacity 0.25s;
}
.shop-btn:hover { background: #a02020; border-color: #a02020; }
.shop-btn:disabled,
.shop-btn[aria-disabled="true"] {
  background: transparent;
  border-color: rgba(240,236,228,0.15);
  color: rgba(240,236,228,0.4);
  cursor: not-allowed;
}

.shop-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(240,236,228,0.15);
}
.shop-qty button {
  width: 36px;
  background: none;
  border: none;
  color: #f0ece4;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.2s;
}
.shop-qty button:hover { background: rgba(240,236,228,0.06); }
.shop-qty button:disabled { color: rgba(240,236,228,0.25); cursor: default; background: none; }
.shop-qty span {
  min-width: 36px;
  padding: 9px 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ── Product dialog ── */
.shop-product {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow: hidden;
}
.shop-product[open] { display: grid; grid-template-columns: 1.1fr 1fr; }
.shop-product__media {
  background: #1a1410;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.shop-product__image {
  flex: 1;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.shop-product__thumbs {
  display: flex;
  gap: 2px;
  padding: 2px 0 0;
  background: #0f0d0b;
}
.shop-product__thumbs:empty { display: none; }
.shop-product__thumbs button {
  width: 64px; height: 64px;
  padding: 0;
  border: 1px solid transparent;
  background: #1a1410;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.25s, border-color 0.25s;
}
.shop-product__thumbs button[aria-current="true"] { opacity: 1; border-color: #8b1a1a; }
.shop-product__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.shop-product__body {
  padding: 48px 40px 40px;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(100vh - 34px);
  max-height: calc(100dvh - 34px);
}
.shop-product__label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8b1a1a;
  margin-bottom: 14px;
}
.shop-product__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.shop-product__price {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(240,236,228,0.75);
  margin-bottom: 28px;
}
.shop-option { margin-bottom: 22px; }
.shop-option__name {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.45);
  margin-bottom: 10px;
}
.shop-option__name b { font-weight: 500; color: #f0ece4; margin-left: 6px; }
.shop-option__values { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-pill {
  min-width: 46px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid rgba(240,236,228,0.2);
  color: rgba(240,236,228,0.8);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.shop-pill:hover { border-color: rgba(240,236,228,0.5); color: #f0ece4; }
.shop-pill[aria-pressed="true"] {
  background: rgba(139,26,26,0.25);
  border-color: #8b1a1a;
  color: #f0ece4;
}
.shop-pill:disabled {
  border-color: rgba(240,236,228,0.08);
  color: rgba(240,236,228,0.25);
  text-decoration: line-through;
  cursor: not-allowed;
}
.shop-product__buy {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 30px 0 14px;
}
.shop-product__buy .shop-btn { flex: 1; }
.shop-product__msg {
  min-height: 1.4em;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #d16b4a;
}
.shop-product__desc {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(240,236,228,0.08);
  font-size: 13px;
  line-height: 1.8;
  color: rgba(240,236,228,0.6);
  overflow-wrap: anywhere;
}
.shop-product__desc p { margin-bottom: 12px; }
.shop-product__desc ul, .shop-product__desc ol { margin: 0 0 12px 18px; }
.shop-product__desc strong, .shop-product__desc b { font-weight: 500; color: rgba(240,236,228,0.8); }
.shop-product__desc table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 12px;
}
.shop-product__desc td, .shop-product__desc th {
  padding: 6px 10px;
  border: 1px solid rgba(240,236,228,0.1);
  text-align: left;
  font-weight: 300;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .shop-product[open] { display: block; overflow-y: auto; }
  .shop-product__image { max-height: 52vh; }
  .shop-product__body { padding: 28px 22px 28px; overflow: visible; max-height: none; }
}

/* ── Cart drawer ── */
.shop-cart {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border-width: 0 0 0 1px;
}
.shop-cart[open] { display: flex; flex-direction: column; animation: shopCartIn 0.3s ease; }
@keyframes shopCartIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.shop-cart__head {
  position: relative;
  padding: 28px 28px 22px;
  border-bottom: 1px solid rgba(240,236,228,0.08);
}
.shop-cart__title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shop-cart__lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  padding: 0 28px;
}
.shop-cart__empty {
  padding: 48px 0;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  color: rgba(240,236,228,0.45);
}
.shop-line {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(240,236,228,0.06);
}
.shop-line__img { width: 76px; height: 76px; object-fit: cover; background: #1a1410; }
.shop-line__name {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.shop-line__variant {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.4);
  margin-bottom: 12px;
}
.shop-line__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}
.shop-line__price { font-size: 13px; font-variant-numeric: tabular-nums; }
.shop-line__remove {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(240,236,228,0.15);
  padding: 0 0 2px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.4);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.shop-line__remove:hover { color: #f0ece4; border-color: rgba(240,236,228,0.4); }
.shop-cart__foot {
  padding: 22px 28px 28px;
  border-top: 1px solid rgba(240,236,228,0.08);
  background: #0c0c0c;
}
.shop-cart__foot[hidden] { display: none; }
.shop-cart__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.shop-cart__subtotal b { font-size: 16px; font-weight: 400; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.shop-cart__note {
  font-size: 12px;
  color: rgba(240,236,228,0.4);
  margin-bottom: 18px;
}
.shop-cart__msg { min-height: 1.4em; margin-top: 10px; font-size: 12px; color: #d16b4a; }
.shop-cart.is-busy .shop-cart__lines { opacity: 0.5; pointer-events: none; transition: opacity 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .shop-card { animation: none; opacity: 1; transform: none; }
  .shop-cart[open] { animation: none; }
}

/* A little more room between rows of products than the base grid gives. */
#shop-grid { row-gap: 40px; }
@media (max-width: 900px) { #shop-grid { row-gap: 28px; } }
