/* =====================================================================
   PANDA TICKETS — Page & component styles
   ===================================================================== */

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-top: 20px; min-height: 260px;
  display: flex; align-items: flex-end;
  background: radial-gradient(120% 140% at 15% 10%, #2b2f6b 0%, #16171b 60%),
              linear-gradient(120deg, #10233f, #1a1030);
  border: 1px solid var(--line-soft);
}
.hero-inner { padding: 32px 28px; max-width: 640px; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin-bottom: 10px; }
.hero p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.02rem; }

/* ---------- Event grid ---------- */
.event-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.event-card {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.16s var(--ease), border-color 0.16s, box-shadow 0.16s;
}
.event-card:hover {
  transform: translateY(-4px); border-color: #454851; box-shadow: var(--shadow);
}
.event-card:focus-visible { outline: 2px solid var(--tm-blue); outline-offset: 2px; }
.event-thumb {
  aspect-ratio: 16 / 9; position: relative;
  display: flex; align-items: flex-end; padding: 12px;
}
.event-thumb .thumb-top {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; gap: 8px;
}
.event-date-chip {
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  border-radius: 8px; padding: 5px 9px; text-align: center; line-height: 1.1;
  min-width: 46px;
}
.event-date-chip .m { font-size: 0.62rem; text-transform: uppercase; color: #ffb3bb; font-weight: 700; letter-spacing: 0.05em; }
.event-date-chip .d { font-size: 1.15rem; font-weight: 800; }
.event-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-body h3 { font-size: 1.05rem; margin: 0; }
.event-meta { color: var(--text-muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 3px; }
.event-meta .line { display: flex; align-items: center; gap: 6px; }
.event-body .event-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.price-from { font-size: 0.85rem; color: var(--text-muted); }
.price-from b { color: var(--text); font-size: 1.05rem; }

/* placeholder gradient thumbnails by category */
.thumb-music  { background: linear-gradient(135deg, #3a1c71, #d76d77 90%); }
.thumb-sports { background: linear-gradient(135deg, #0f2027, #2c5364 90%); }
.thumb-arts   { background: linear-gradient(135deg, #42275a, #734b6d 90%); }
.thumb-comedy { background: linear-gradient(135deg, #c94b4b, #4b134f 90%); }
.thumb-other  { background: linear-gradient(135deg, #1e3c72, #2a5298 90%); }
.thumb-img { background-size: cover; background-position: center; }

/* empty / loading states */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .big { font-size: 2.4rem; margin-bottom: 12px; }

/* ---------- Event detail ---------- */
.detail-hero {
  border-radius: var(--radius-lg); overflow: hidden; margin-top: 20px;
  min-height: 300px; position: relative; display: flex; align-items: flex-end;
  border: 1px solid var(--line-soft);
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.82));
}
.detail-hero .detail-hero-inner { position: relative; z-index: 1; padding: 30px 28px; }
.detail-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 8px; }
.detail-hero .subtitle { color: #dfe1e8; font-size: 1.05rem; }

.detail-layout { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
@media (min-width: 900px) { .detail-layout { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; }
.info-item .ic { width: 22px; flex-shrink: 0; color: var(--tm-blue); margin-top: 2px; }
.info-item .info-label { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.info-item .info-value { font-size: 0.98rem; }

/* ticket selection panel */
.buy-panel { position: sticky; top: calc(var(--header-h) + 16px); }
.ticket-type {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.ticket-type:last-child { border-bottom: none; }
.tt-info { flex: 1; min-width: 0; }
.tt-info .tt-name { font-weight: 600; }
.tt-info .tt-desc { font-size: 0.82rem; color: var(--text-muted); }
.tt-info .tt-price { font-size: 0.95rem; margin-top: 2px; }
.tt-soldout { font-size: 0.8rem; color: var(--danger); font-weight: 700; }

/* qty stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button {
  width: 36px; height: 36px; border: none; background: var(--bg-input); color: var(--text);
  font-size: 1.2rem; cursor: pointer; display: grid; place-items: center;
}
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper button:hover:not(:disabled) { background: #30333b; }
.stepper .qty { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.order-summary { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; }
.summary-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; margin-top: 8px; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 24px; }
@media (min-width: 900px) { .checkout-layout { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.summary-card { position: sticky; top: calc(var(--header-h) + 16px); }
.summary-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 0.92rem; border-bottom: 1px solid var(--line-soft); }
.field-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 560px) { .field-grid.cols-2 { grid-template-columns: 1fr 1fr; } }

/* stepper progress */
.steps { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; font-size: 0.82rem; color: var(--text-faint); flex-wrap: wrap; }
.steps .step.is-active { color: var(--text); font-weight: 700; }
.steps .sep { opacity: 0.4; }

/* ---------- Confirmation ---------- */
.confirm-wrap { max-width: 560px; margin: 32px auto 0; }
.confirm-check {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 18px;
  background: rgba(33,192,122,0.15); color: var(--ok);
  display: grid; place-items: center; font-size: 34px;
}
.ticket-stub {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 22px;
}
.stub-head { padding: 18px 20px; background: linear-gradient(135deg, var(--tm-blue), #6a4bff); }
.stub-head .code { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.stub-body { padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 480px) { .stub-body { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.qr-box { background: #fff; padding: 10px; border-radius: 10px; width: 148px; height: 148px; display: grid; place-items: center; }
.qr-box svg, .qr-box canvas { width: 100%; height: 100%; }
.stub-divider { border: none; border-top: 2px dashed var(--line); margin: 0; position: relative; }

/* ---------- Lookup ---------- */
.lookup-wrap { max-width: 460px; margin: 40px auto 0; }

/* ---------- Utility: definition rows ---------- */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 0.92rem; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; text-align: right; }

/* ---------- Sticky mobile CTA (event detail) ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(22,23,27,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 12px;
}
.mobile-cta .mc-total { font-weight: 800; }
@media (max-width: 899px) { .mobile-cta.show { display: flex; } .buy-panel .buy-cta-desktop { display: none; } }
