/* RAVE MERCH compact grid and inset visual-area layout.
   Minimal layout-only overrides so .food-list matches the existing .merch-grid
   rack. Colors, fonts, borders and shadows are left to styles.css. Every
   selector begins .chill-shop[data-shop="merch"]. */

/* 1. Both racks become the same grid: a fixed column count that scales down. */
.chill-shop[data-shop="merch"] .merch-grid,
.chill-shop[data-shop="merch"] .food-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

/* 2. Cards are vertical flex, no min-width overflow. */
.chill-shop[data-shop="merch"] .merch-grid .item,
.chill-shop[data-shop="merch"] .food-list .food-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 3. Tee views: flex row holding two tee SVGs that scale to the column. */
.chill-shop[data-shop="merch"] .merch-grid .item .views {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
}
.chill-shop[data-shop="merch"] .merch-grid .item .views .tee {
  width: min(84px, 45%);
  height: auto;
}

/* 4. Info grows; buy button stretches to the bottom of every card. */
.chill-shop[data-shop="merch"] .food-list .food-card .food-info {
  flex: 1 1 auto;
  min-width: 0;
}
.chill-shop[data-shop="merch"] .food-list .food-card .food-buy {
  align-self: stretch;
  margin-top: auto;
  white-space: normal;
  padding-inline: 6px;
}

/* 5. Food/hat/flow art fills the column width at a fixed height. */
.chill-shop[data-shop="merch"] .food-list .food-card .shop-art {
  width: 100%;
  height: 110px;
}
.chill-shop[data-shop="merch"] .food-list .food-card .shop-art img {
  width: 110px;
  height: 110px;
  max-width: 100%;
}

/* 6. Tabs wrap instead of overflowing horizontally. */
.chill-shop[data-shop="merch"] .merch-tabs {
  flex-wrap: wrap;
  min-width: 0;
}

/* 7. Phones: two columns on narrower screens. */
@media (max-width: 600px) {
  .chill-shop[data-shop="merch"] .merch-grid,
  .chill-shop[data-shop="merch"] .food-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 8. Small phones: keep two columns, shrink padding, art and text. */
@media (max-width: 360px) {
  .chill-shop[data-shop="merch"] .merch-grid,
  .chill-shop[data-shop="merch"] .food-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chill-shop[data-shop="merch"] .merch-grid .item,
  .chill-shop[data-shop="merch"] .food-list .food-card {
    padding: 6px;
  }
  .chill-shop[data-shop="merch"] .food-list .food-card .shop-art {
    height: 90px;
  }
  .chill-shop[data-shop="merch"] .food-list .food-card .shop-art img {
    width: 90px;
    height: 90px;
  }
  .chill-shop[data-shop="merch"] .merch-grid .item .views .tee,
  .chill-shop[data-shop="merch"] .food-list .food-card .food-info,
  .chill-shop[data-shop="merch"] .food-list .food-card .food-info b,
  .chill-shop[data-shop="merch"] .food-list .food-card .food-info span {
    font-size: 11px;
  }
}

.chill-shop[data-shop="merch"] .merch-grid .info .buy { margin-top: auto; padding-inline: 6px; white-space: normal; }
@media (max-width: 600px) {
  .chill-shop[data-shop="merch"] { padding: 8px; }
  .chill-shop[data-shop="merch"] .card { padding: 16px 12px; }
  .chill-shop[data-shop="merch"] .food-info b { font-size: 12px; }
  .chill-shop[data-shop="merch"] .buy { font-size: 11px; }
}

/* 9. Merch menu stays within the visual area above the music dock and beside chat (founder compact-grid pick, 2026-10-13).
   Strictly merchandise-scoped: every selector begins .chill-shop[data-shop="merch"].
   Colors, fonts, borders and the category structure stay in styles.css. */
/* Match the floor bounds; the backdrop must not cover the surrounding controls. */
.chill-shop[data-shop="merch"] {
  top: var(--header-height, 48px);
  right: var(--sidebar-w, 23.5%);
  bottom: calc(2.8% + 126px);
  left: 0;
  padding: 0;
}
@media (max-aspect-ratio: 5/6), (max-width: 720px) {
  .chill-shop[data-shop="merch"] {
    right: 0;
    bottom: auto;
    /* The mobile canvas uses this exact height and minimum in styles.css. */
    height: max(320px, calc(100dvh - var(--header-height, 96px) - 264px));
  }
}
.chill-shop[data-shop="merch"] .card {
  width: 80%;
  height: 80%;
  max-height: 80%;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chill-shop[data-shop="merch"] .body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chill-shop[data-shop="merch"] .body > h3,
.chill-shop[data-shop="merch"] .merch-tabs {
  flex-shrink: 0;
}
.chill-shop[data-shop="merch"] .body > h3 { padding-right: 36px; }
.chill-shop[data-shop="merch"] .merch-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.chill-shop[data-shop="merch"] .x { z-index: 2; }

/* 10. [lane artist-capes] CAPES cards: the back + the inside, side by side like the tee views; worn = lit up. */
.chill-shop[data-shop="merch"] .food-list .cape-card .views {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.chill-shop[data-shop="merch"] .food-list .cape-card .views .tee {
  width: min(84px, 45%);
  height: auto;
}
.chill-shop[data-shop="merch"] .food-list .cape-card.wearing {
  border-color: #7be36b;
  box-shadow: 0 0 14px #7be36b44;
}
.chill-shop[data-shop="merch"] .food-list .cape-card .cape-wear {
  align-self: stretch;
  margin-top: auto;
}
