// Goyo Club — content data
// 4 types × 2 sub-categories each (series)
// Per-category media is unified across all rows of that type:
//   EVENT    → assets/event.webp     (single poster)
//   SHOP     → assets/shop.webp      (single product image)
//   ARTICLE  → assets/article.webp   (single hero image)
//   ARCHIVE  → YouTube embed "ANL7mvr2uIs" (single video)

const ARCHIVE_VIDEO_ID = "ANL7mvr2uIs";

const SEED_ROWS = [
  // ===== EVENT =====
  { id: "ev-013", type: "EVENT", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 013", meta: "EL CID / LOS ANGELES", metaLabel: "VENUE", date: "05/02/26", series: "GOYO PRESENTS",
    body: { kind: "event", poster: "assets/event.webp", lineup: ["BAE BAE", "BB SHAINE", "DADDY KEV", "GECKI"], doors: "22:00 — 02:00", price: "21+", tickets: "RSVP", tags: ["# PARTY", "# LOS ANGELES"] } },

  { id: "ev-013b", type: "EVENT", title: "GOYO PRESENTS — NIGHT.SHIFT B2B DAYBREAK", meta: "FACE / SEOUL", metaLabel: "VENUE", date: "05/02/26", series: "GOYO PRESENTS",
    body: { kind: "event", poster: "assets/event.webp", lineup: ["NIGHT.SHIFT", "DAYBREAK", "GOYO RES."], doors: "22:00 — late", price: "₩25,000 adv.", tickets: "DICE.FM", tags: ["# HOUSE", "# DANCE"] } },

  { id: "ev-013c", type: "EVENT", title: "WAVERIDER × GOYO — ELECTRIC CLEANERS PARTY 013", meta: "WAVERIDER / BUSAN", metaLabel: "VENUE", date: "05/02/26", series: "COLLAB",
    body: { kind: "event", poster: "assets/event.webp", lineup: ["GOYO RES.", "SHORE-LINE", "BLUE-HOUR"], doors: "21:00 — 04:00", price: "₩28,000 adv.", tickets: "DICE.FM", tags: ["# DANCE"] } },

  { id: "ev-013d", type: "EVENT", title: "GOYO PRESENTS — BASEMENT SESSIONS 02", meta: "BASEMENT / SEOUL", metaLabel: "VENUE", date: "05/02/26", series: "GOYO PRESENTS",
    body: { kind: "event", poster: "assets/event.webp", lineup: ["NIGHT.SHIFT B2B GOYO RES.", "PRINCE 85"], doors: "23:00 — 06:00", price: "₩30,000 adv. / ₩35,000 door", tickets: "DICE.FM", tags: ["# HOUSE"] } },

  { id: "ev-013e", type: "EVENT", title: "STUDIO C × GOYO — LISTENING NIGHT", meta: "STUDIO C / SEOUL", metaLabel: "VENUE", date: "05/02/26", series: "COLLAB",
    body: { kind: "event", poster: "assets/event.webp", lineup: ["DAYBREAK", "GOYO RES."], doors: "22:00 — late", price: "₩20,000 adv.", tickets: "DICE.FM", tags: ["# AMBIENT", "# LISTENING"] } },

  // ===== ARTICLE =====
  { id: "ar-022", type: "ARTICLE", title: "INTERVIEW WITH GOYO CLUB (ANDREW W., YELLOWDAILY)", meta: "YELLOWDAILY", metaLabel: "SOURCE", date: "04/04/22", series: "INTERVIEW",
    body: { kind: "article", image: "assets/article.webp", lede: "ON BUILDING A LISTENING ROOM IN A CITY THAT NEVER STOPS MOVING.",
      excerpt: [
        "We started GOYO because the rooms we wanted to be in didn't exist in Seoul.",
        "It's not a club, exactly. It's not a record shop. It's a directory — of people, sleeves, late nights, and the records that keep showing up.",
        "Every event we throw is a footnote to a record we love. The archive comes first."
      ],
      author: "Andrew W. — Yellowdaily, 04/2022", tags: ["# INTERVIEW", "# ORIGINS"] } },

  { id: "ar-022b", type: "ARTICLE", title: "ON THE QUIET ROOM — A NOTE FROM GOYO RES.", meta: "GOYO ZINE 02", metaLabel: "SOURCE", date: "11/12/25", series: "NOTICE",
    body: { kind: "article", image: "assets/article.webp", lede: "WHY WE NEEDED A LISTENING ROOM, NOT ANOTHER CLUB.",
      excerpt: [
        "There is a difference between music as background and music as text.",
        "Goyo means 'silence' in a particular register — the kind that holds attention rather than fills it.",
        "Our rooms are designed for the second kind. Loudness is allowed. Talking, mostly, is not."
      ],
      author: "GOYO RES., Zine 02 / 11.2025", tags: ["# ESSAY", "# LISTENING"] } },

  { id: "ar-022c", type: "ARTICLE", title: "FINDING RECORDS — VOL. 1 LINER NOTES", meta: "GOYO ZINE 03", metaLabel: "SOURCE", date: "01/20/26", series: "NOTICE",
    body: { kind: "article", image: "assets/article.webp", lede: "TWELVE RECORDS, FOUR CITIES, EIGHTEEN MONTHS.",
      excerpt: [
        "FINDING RECORDS started as a list in a notebook — sleeves we'd seen but never touched.",
        "Vol. 1 is the first time most of these have been pressed in forty years.",
        "Liner notes inside cover provenance, dust, and the people who let us reissue."
      ],
      author: "BAEK SUN, Zine 03 / 01.2026", tags: ["# REISSUE", "# RARE GROOVE"] } },

  { id: "ar-022d", type: "ARTICLE", title: "INTERVIEW — PRINCE 85 ON DUST AND DUB", meta: "GOYO ZINE 04", metaLabel: "SOURCE", date: "02/14/26", series: "INTERVIEW",
    body: { kind: "article", image: "assets/article.webp", lede: "FORTY MINUTES WITH THE MAN WHO BUILT EC#92.",
      excerpt: [
        "PRINCE 85 talks about dub as architecture, not genre.",
        "We sit on a folding chair next to the dehumidifier and talk about what tape sounds like in winter.",
        "He brought records he hadn't played in twenty years."
      ],
      author: "GOYO RES., Zine 04 / 02.2026", tags: ["# INTERVIEW", "# DUB"] } },

  // ===== ARCHIVE =====
  { id: "ar-015", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 015", meta: "PRINCE 85", metaLabel: "ARTIST", date: "05/02/26", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "PRINCE 85 — ELECTRONIC Mix in a 100-Year-Old Dry Cleaner / EC#94", tags: ["# HOUSE", "# AFRO"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-016", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 016", meta: "ROOM-TONE", metaLabel: "ARTIST", date: "05/02/29", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "ROOM-TONE — AMBIENT Mix in a 100-Year-Old Dry Cleaner / EC#95", tags: ["# AMBIENT", "# DRONE"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-100", type: "ARCHIVE", title: "ELECTRONIC MIX IN A 100-YEAR-OLD DRY CLEANER", meta: "VARIOUS", metaLabel: "ARTIST", date: "10/15/25", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "100-YEAR-OLD DRY CLEANER — SESSIONS COMPILATION", tags: ["# COMPILATION"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-015b", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 015", meta: "DJ HALLYU", metaLabel: "ARTIST", date: "05/02/28", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "DJ HALLYU — DISCO Mix in a 100-Year-Old Dry Cleaner / EC#93", tags: ["# DISCO", "# ITALO"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-016b", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 016", meta: "BAEK SUN", metaLabel: "ARTIST", date: "05/02/29", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "BAEK SUN — JAZZ Selection / EC#96", tags: ["# JAZZ", "# SPIRITUAL"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-016c", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 016", meta: "ROOM-TONE", metaLabel: "ARTIST", date: "05/02/29", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "ROOM-TONE — DEEP HOUSE Mix / EC#97", tags: ["# DEEP HOUSE"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-100b", type: "ARCHIVE", title: "ELECTRONIC MIX IN A 100-YEAR-OLD DRY CLEANER", meta: "GUEST", metaLabel: "ARTIST", date: "10/15/25", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "GUEST — TRIP-HOP Mix / EC#90", tags: ["# TRIP-HOP", "# DOWNTEMPO"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-015c", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 015", meta: "PRINCE 85", metaLabel: "ARTIST", date: "05/02/28", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "PRINCE 85 — DUB SELECTION / EC#92", tags: ["# DUB", "# REGGAE"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-016d", type: "ARCHIVE", title: "FINDING RECORDS VOL.1 — BAEK SUN SELECTS", meta: "BAEK SUN", metaLabel: "ARTIST", date: "05/02/29", series: "FINDING RECORDS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "BAEK SUN — FINDING RECORDS VOL.1", tags: ["# RARE GROOVE", "# OBSCURE"], badge: "FINDING RECORDS", linkLabel: "YOUTUBE → " } },

  { id: "ar-016e", type: "ARCHIVE", title: "GOYO CLUB PRESENTS ELECTRIC CLEANERS PARTY 016", meta: "DJ HALLYU", metaLabel: "ARTIST", date: "05/02/29", series: "ELECTRIC CLEANERS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "DJ HALLYU — POST-PUNK Selection / EC#98", tags: ["# POST-PUNK", "# COLDWAVE"], badge: "ELECTRIC CLEANERS", linkLabel: "YOUTUBE → " } },

  { id: "ar-fr-02", type: "ARCHIVE", title: "FINDING RECORDS VOL.2 — TEASER MIX", meta: "PRINCE 85", metaLabel: "ARTIST", date: "03/10/26", series: "FINDING RECORDS",
    body: { kind: "archive", youtubeId: ARCHIVE_VIDEO_ID, caption: "PRINCE 85 — FR VOL.2 PRE-LISTEN", tags: ["# RARE", "# REISSUE"], badge: "FINDING RECORDS", linkLabel: "YOUTUBE → " } },

  // ===== SHOP =====
  { id: "sh-001", type: "SHOP", title: "GOYO CLUB BOOKSTORE TEE — BLACK", meta: "$48.00", metaLabel: "PRICE", date: "05/02/26", series: "CLOTHINGS",
    body: { kind: "shop", image: "assets/shop.webp", price: "$48.00 USD", sizes: ["S", "M", "L", "XL"], stock: "12 IN STOCK", description: "GARMENT-DYED 8.5oz HEAVYWEIGHT TEE. HAND-DRAWN GOYO CLUB GRAPHIC PRINTED IN SEOUL. PHOTOGRAPHED AT GOYO BOOKSTORE.", linkLabel: "ADD TO CART → " } },

  { id: "sh-017", type: "SHOP", title: "ELECTRIC CLEANERS PARTY 017 TEE", meta: "$50.00", metaLabel: "PRICE", date: "05/02/30", series: "CLOTHINGS",
    body: { kind: "shop", image: "assets/shop.webp", price: "$50.00 USD", sizes: ["S", "M", "L", "XL"], stock: "LOW STOCK — SEOUL ONLY", description: "EC#017 EVENT TEE. HEAVYWEIGHT 240GSM JERSEY. SCREEN PRINT FRONT + BACK.", linkLabel: "BUY → " } },

  { id: "sh-017b", type: "SHOP", title: "ELECTRIC CLEANERS PARTY 017 TOTE", meta: "$25.00", metaLabel: "PRICE", date: "05/02/30", series: "ACCESSORIES",
    body: { kind: "shop", image: "assets/shop.webp", price: "$25.00 USD", sizes: ["ONE SIZE"], stock: "IN STOCK", description: "EC#017 TOTE BAG. 14oz NATURAL CANVAS. 1-COLOR PRINT.", linkLabel: "BUY → " } },

  { id: "sh-017c", type: "SHOP", title: "FINDING RECORDS VOL.2 — 12\" VINYL", meta: "$120.00", metaLabel: "PRICE", date: "05/02/30", series: "ACCESSORIES",
    body: { kind: "shop", image: "assets/shop.webp", price: "$120.00 USD", sizes: ["12\""], stock: "1 OF 300", description: "FINDING RECORDS VOL. 2 — RARE GROOVE COMPILATION. 180G BLACK VINYL. INCLUDES INSERT.", linkLabel: "BUY → " } },

  { id: "sh-017d", type: "SHOP", title: "ELECTRIC CLEANERS PARTY 017 POSTER", meta: "$15.00", metaLabel: "PRICE", date: "05/02/30", series: "ACCESSORIES",
    body: { kind: "shop", image: "assets/shop.webp", price: "$15.00 USD", sizes: ["A2"], stock: "IN STOCK", description: "EC#017 EVENT POSTER. RISO PRINT, 2-COLOR. SIGNED EDITION OF 100.", linkLabel: "BUY → " } },

  { id: "sh-cap", type: "SHOP", title: "GOYO CLUB LOGO CAP — BLACK 001", meta: "$40.00", metaLabel: "PRICE", date: "04/12/26", series: "CLOTHINGS",
    body: { kind: "shop", image: "assets/shop.webp", price: "$40.00 USD", sizes: ["ONE SIZE"], stock: "12 IN STOCK", description: "6-PANEL UNSTRUCTURED CAP. EMBROIDERED GOYO CLUB MARK AT FRONT.", linkLabel: "BUY → " } },
];

// Replicate seed entries up to TARGET_ROW_COUNT for pagination testing.
// Each replica gets a unique id by appending the lap suffix (e.g. "ev-013-1",
// "ev-013-2"). Bodies are shared by reference — fine since none of the bodies
// mutate per-row state (ShopBody size selector keeps state in React, not data).
const TARGET_ROW_COUNT = 100;
const ROWS = [];
for (let i = 0; ROWS.length < TARGET_ROW_COUNT; i++) {
  const src = SEED_ROWS[i % SEED_ROWS.length];
  const lap = Math.floor(i / SEED_ROWS.length);
  const id = lap === 0 ? src.id : `${src.id}-${lap}`;
  ROWS.push({ ...src, id });
}

// Fisher-Yates shuffle so types/series mix freely instead of clustering.
// Reshuffles on each page load (Math.random) — fresh order every refresh.
for (let i = ROWS.length - 1; i > 0; i--) {
  const j = Math.floor(Math.random() * (i + 1));
  [ROWS[i], ROWS[j]] = [ROWS[j], ROWS[i]];
}

// Pinned hero row
const HERO_ROW = {
  id: "goyo-hero",
  type: "GOYO",
  title: "GOYO CLUB — A LISTENING ROOM, AN ARCHIVE, A SHOP",
  meta: "EST. 2022 / SEOUL",
  metaLabel: "ORIGIN",
  date: "—",
  body: { kind: "hero" }
};

// Sub-categories per type
const SERIES_BY_TYPE = {
  ARCHIVE: [
    { id: "ELECTRIC CLEANERS", label: "ELECTRIC CLEANERS" },
    { id: "FINDING RECORDS",   label: "FINDING RECORDS" },
  ],
  EVENT: [
    { id: "GOYO PRESENTS", label: "GOYO PRESENTS" },
    { id: "COLLAB",        label: "COLLAB" },
  ],
  ARTICLE: [
    { id: "NOTICE",    label: "NOTICE" },
    { id: "INTERVIEW", label: "INTERVIEW" },
  ],
  SHOP: [
    { id: "CLOTHINGS",   label: "CLOTHINGS" },
    { id: "ACCESSORIES", label: "ACCESSORIES" },
  ],
};

const TYPE_TABS = [
  { id: "ARCHIVE", label: "ARCHIVE" },
  { id: "EVENT",   label: "EVENT" },
  { id: "ARTICLE", label: "ARTICLE" },
  { id: "SHOP",    label: "SHOP" },
];

window.GOYO_DATA = { ROWS, HERO_ROW, SERIES_BY_TYPE, TYPE_TABS };
