.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 14px;
  align-items: start;
}

body.public-shop .topbar,
body.public-shop #pull-refresh-indicator {
  display: none;
}

body.public-shop main {
  width: 100%;
}

.shop-public-header {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.shop-site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.shop-site-nav a {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.34);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.shop-site-nav a:hover,
.shop-site-nav a:focus,
.shop-site-nav .shop-private-link {
  border-color: rgba(57, 255, 20, 0.34);
  color: var(--text);
  background: rgba(57, 255, 20, 0.08);
}

.shop-private-link {
  flex: 0 0 auto;
}

.merch-heading {
  max-width: none;
}

.merch-heading h2 {
  font-size: 56px;
}

.merch-order-banner {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
}

.merch-order-banner[hidden] {
  display: none;
}

.merch-order-banner.is-success {
  border-color: rgba(57, 255, 20, 0.4);
  background: rgba(57, 255, 20, 0.08);
}

.merch-order-banner.is-warning {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.08);
}

.merch-order-banner b {
  font-size: 15px;
}

.merch-order-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.merch-cart-card {
  position: sticky;
  top: 16px;
}

.merch-product-grid,
.merch-umbrella-group,
.merch-product-group,
.merch-cart-items,
.merch-checkout-form,
.merch-signed-in-fields,
.merch-cart-totals {
  display: grid;
  gap: 10px;
}

.merch-product-grid {
  gap: 24px;
}

.merch-umbrella-group {
  gap: 16px;
}

.merch-umbrella-group > h3 {
  margin: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  font-size: 24px;
}

.merch-product-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.merch-product-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.merch-product-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
}

.merch-product-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.merch-product-images.single-view {
  grid-template-columns: 1fr;
}

.merch-product-images.with-front-detail:not(.single-view) {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.merch-product-images figure {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  background: #f8fafc;
}

.merch-product-images .merch-main-mockup {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  object-fit: contain;
}

.merch-front-inset {
  position: absolute;
  right: 7px;
  bottom: 34px;
  z-index: 2;
  display: block;
  width: min(60%, 154px);
  min-width: 76px;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background: #020617;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.32);
}

.merch-front-inset img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.merch-product-images figcaption {
  padding: 6px;
  color: #334155;
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0;
}

.merch-product-copy {
  display: grid;
  gap: 9px;
  padding: 11px;
}

.merch-product-copy h4 {
  min-height: 40px;
  margin: 0;
  font-size: 15px;
  line-height: 1.24;
}

.merch-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.merch-chip-row span,
.merch-cart-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.merch-chip-row span {
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.36);
}

.merch-buy-row {
  display: grid;
  grid-template-columns: auto minmax(92px, 1fr);
  gap: 8px;
  align-items: end;
}

.merch-buy-row strong {
  color: var(--green);
  font-size: 18px;
}

.merch-buy-row label,
.merch-cart-item label,
.merch-checkout-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.merch-buy-row select,
.merch-cart-item input,
.merch-checkout-form input[type="email"] {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 10px;
}

.merch-buy-row button {
  grid-column: 1 / -1;
}

.merch-cart-empty,
.merch-cart-item {
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
}

.merch-cart-empty {
  padding: 12px;
  color: var(--muted);
  font-weight: 900;
}

.merch-cart-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.merch-cart-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 7px;
  background: #020617;
}

.merch-cart-item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merch-cart-item label,
.merch-cart-item button {
  grid-column: 1 / -1;
}

.merch-checkout-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.merch-checkout-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.merch-checkout-choice[hidden] {
  display: none;
}

.merch-checkout-choice label {
  min-height: 38px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
}

.merch-checkout-choice input {
  accent-color: var(--green);
}

.merch-signed-in-fields[hidden] {
  display: none;
}

.merch-signed-in-fields {
  padding: 9px;
  border: 1px solid rgba(57, 255, 20, 0.18);
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.06);
}

.merch-signed-in-fields b {
  color: var(--text);
  font-size: 13px;
}

.merch-signed-in-fields span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.merch-cart-totals {
  margin: 12px 0;
}

.merch-cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.merch-cart-totals dt,
.merch-cart-totals dd {
  margin: 0;
}

.merch-cart-totals dt {
  color: var(--muted);
  font-weight: 900;
}

.merch-cart-totals dd {
  color: var(--text);
  font-weight: 900;
  text-align: right;
}

.merch-checkout-button {
  width: 100%;
}

.merch-cart-card .billing-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .merch-cart-card {
    position: static;
  }
}

@media (max-width: 820px) {
  body.public-shop .sidebar {
    display: none;
  }

  .merch-product-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shop-public-header,
  .shop-site-nav {
    justify-content: flex-start;
  }

  .merch-heading h2 {
    font-size: 38px;
  }

  .merch-product-row,
  .merch-checkout-choice {
    grid-template-columns: 1fr;
  }

  .merch-front-inset {
    right: 10px;
    width: min(55%, 180px);
  }
}
