/* ── Event List View (elist-) ── */
.elist-container { max-width: 920px; margin: 0 auto; }
.elist-table {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white, #fff);
}
.elist-header {
  display: grid;
  grid-template-columns: 36px 1fr 72px 90px 90px 80px;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
}
.elist-hcell {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.elist-hcell--right { text-align: right; }
.elist-hcell--sort { cursor: pointer; user-select: none; transition: color 0.15s; }
.elist-hcell--sort:hover { color: #6366f1; }
.elist-sort-icon { opacity: 0.4; font-size: 0.65rem; margin-left: 2px; }
.elist-row {
  display: grid;
  grid-template-columns: 36px 1fr 72px 90px 90px 80px;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: var(--black, #111);
  transition: background 0.12s;
  cursor: pointer;
}
.elist-row:last-child { border-bottom: none; }
.elist-row:nth-child(even) { background: #fafbfc; }
.elist-row:hover { background: rgba(168,85,247,0.04); }
.elist-rank {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #c0c0c0;
}
.elist-product {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding-right: 0.5rem;
}
.elist-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: contain;
  background: #f5f5f5;
  flex-shrink: 0;
}
.elist-product-info { min-width: 0; flex: 1; }
.elist-title {
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.elist-brand {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.elist-discount {
  display: inline-block;
  padding: 3px 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.elist-disc--95 { background: #dc2626; }
.elist-disc--90 { background: #ea580c; }
.elist-disc--80 { background: #d97706; }
.elist-disc--70 { background: #ca8a04; }
.elist-disc--50 { background: #65a30d; }
.elist-disc--low { background: #6366f1; }
.elist-disc--free { background: linear-gradient(135deg,#e84393,#a855f7); }
.elist-disc--none { background: transparent; }
.elist-price {
  font-family: 'Space Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.elist-price--free { color: #e84393; }
.elist-original {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  text-align: right;
  color: #b0b0b0;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.elist-atc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid var(--black, #111);
  border-radius: 5px;
  background: var(--white, #fff);
  color: var(--black, #111);
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.elist-atc:hover { background: var(--black, #111); color: var(--white, #fff); }
.elist-atc-icon { display: none; width: 16px; height: 16px; }
.elist-row-line2 { display: none; }
.elist-muted { color: #d1d5db; font-size: 0.72rem; font-family: 'Space Mono', monospace; }

/* ── Tablet ── */
@media (max-width: 768px) {
  .elist-header { grid-template-columns: 30px 1fr 60px 72px; }
  .elist-row { grid-template-columns: 30px 1fr 60px 72px; }
  .elist-hcell--original, .elist-original { display: none; }
  .elist-hcell--atc, .elist-atc { display: none; }
  .elist-thumb { width: 36px; height: 36px; }
  .elist-title { font-size: 0.78rem; }
  .elist-price { font-size: 0.82rem; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .elist-header { display: none; }
  .elist-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 0 0.5rem;
    padding: 0.55rem 0.5rem;
    min-height: 56px;
  }
  .elist-rank { display: none; }
  .elist-thumb { grid-row: 1 / 3; width: 44px; height: 44px; align-self: center; }
  .elist-product {
    grid-column: 2;
    grid-row: 1;
    padding-right: 0;
  }
  .elist-brand { display: none; }
  .elist-discount, .elist-price, .elist-original { display: none; }
  .elist-hcell--atc { display: none; }
  .elist-row > .elist-atc { display: none; }
  .elist-row-line2 {
    display: flex !important;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    gap: 0.35rem;
    margin-top: 2px;
  }
  .elist-row-line2 .elist-brand-m {
    font-family: 'Space Mono', monospace;
    font-size: 0.52rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
  }
  .elist-row-line2 .elist-discount {
    display: inline-block;
    font-size: 0.5rem;
    padding: 2px 6px;
    flex-shrink: 0;
  }
  .elist-row-line2 .elist-price {
    display: block;
    font-size: 0.78rem;
    margin-left: auto;
    flex-shrink: 0;
  }
  .elist-row-line2 .elist-atc {
    display: flex !important;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
  }
  .elist-row-line2 .elist-atc .elist-atc-label { display: none; }
  .elist-row-line2 .elist-atc .elist-atc-icon { display: block; }
}

/* When elist exists, hide card grid by default — JS toggles override */
.elist-container ~ .collapse-btn { display: none; }
.item-grid-brutal.elist-hidden { display: none !important; }
