/* ==========================================================================
   EvntNepal — design system
   Light-only, mobile-first. One stylesheet for every page.
   ========================================================================== */

:root {
  --brand:        #f05537;
  --brand-dark:   #d1410c;
  --brand-soft:   #fff1ed;
  --ink:          #1e0a3c;   /* headings */
  --body:         #39364f;   /* body copy */
  --muted:        #6f7287;   /* secondary copy */
  --line:         #dbdae3;
  --line-soft:    #eeedf2;
  --bg:           #ffffff;
  --bg-soft:      #f8f7fa;
  --green:        #0f7b57;
  --amber:        #a35b00;
  --red:          #c0392b;
  --blue:         #2160d3;

  --radius:       8px;
  --radius-lg:    12px;
  --shadow-sm:    0 1px 2px rgba(30,10,60,.08);
  --shadow:       0 2px 10px rgba(30,10,60,.10);
  --shadow-lg:    0 8px 28px rgba(30,10,60,.16);

  --header-h:     72px;
  --max:          1280px;

  /* Boxed layout. The site sits in a column this wide with the backdrop
     showing either side; --max keeps its own gutter inside that.
     For a full-width site again, set --site-max to 100%. */
  --site-max:     1400px;
  --backdrop:     #ebe9f1;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--backdrop);
}

/*
 * body is the box.
 *
 * The header, main and footer are all children of it, so constraining body
 * boxes the entire site — no wrapper element, and nothing to add to any page.
 *
 * It deliberately runs the full height of the viewport rather than floating
 * with a margin at the top: the header is sticky, and a header that sticks to
 * the top of the window would otherwise escape above a floating box's edge.
 */
body {
  margin: 0 auto;
  max-width: var(--site-max);
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The edges only exist once there is backdrop to show them against. */
@media (min-width: 1400px) {
  body { box-shadow: 0 0 0 1px rgba(30, 10, 60, .06), 0 0 40px rgba(30, 10, 60, .10); }
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.175rem; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow    { max-width: 760px; }
.mid       { max-width: 1000px; }

.muted     { color: var(--muted); }
.small     { font-size: .875rem; }
.tiny      { font-size: .78rem; }
.center    { text-align: center; }
.nowrap    { white-space: nowrap; }
.hide      { display: none !important; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; }
.mt3 { margin-top: 24px; } .mt4 { margin-top: 32px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; }
.mb3 { margin-bottom: 24px; }
.row  { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--bg-soft); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary   { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-dark      { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #33125f; }
.btn-outline   { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover:not(:disabled) { background: var(--bg-soft); }
.btn-ghost     { background: transparent; color: var(--body); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }
.btn-danger    { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: #fdf0ee; }
.btn-sm        { padding: 8px 14px; font-size: .875rem; }
.btn-lg        { padding: 15px 26px; font-size: 1.0625rem; }
.btn-block     { width: 100%; }

/* ------------------------------------------------------------------- forms */
label, .label {
  display: block; font-size: .875rem; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
}
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=search],
input[type=tel], input[type=url], input[type=number], input[type=date],
input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; color: var(--body);
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(240,85,55,.16);
}
textarea { min-height: 130px; resize: vertical; }
select { appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%2339364f' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff; border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h); max-width: var(--max); margin: 0 auto; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; color: var(--brand); flex: none; }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; }

.search-bar {
  display: flex; align-items: center; flex: 1 1 auto; max-width: 620px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  padding: 4px 4px 4px 16px; gap: 8px;
}
.search-bar:focus-within { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.search-bar input {
  border: none; padding: 8px 0; background: transparent; min-width: 0;
}
.search-bar input:focus { outline: none; box-shadow: none; }
.search-bar .divider { width: 1px; height: 24px; background: var(--line); flex: none; }
.search-bar .loc { display: flex; align-items: center; gap: 6px; flex: 0 1 200px; min-width: 0; }
.search-go {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--brand); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.search-go:hover { background: var(--brand-dark); }

.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.header-nav a, .header-nav button {
  font-size: .9375rem; font-weight: 500; color: var(--body);
  padding: 9px 12px; border-radius: var(--radius); background: none; border: none;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.header-nav a:hover, .header-nav button:hover { background: var(--bg-soft); text-decoration: none; }
.header-nav .cta { color: var(--brand); font-weight: 600; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .875rem; flex: none;
}
.user-menu { position: relative; }
.user-menu .menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 70;
}
.user-menu .menu a, .user-menu .menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 6px; font-size: .9375rem; color: var(--body);
}
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--bg-soft); }
.menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.menu-head strong { display: block; color: var(--ink); }

/* Second header row, shown only on narrow screens where the search pill and
   the nav links are hidden. */
.mobile-bar { display: none; padding: 0 16px 10px; border-top: 1px solid var(--line-soft); }
.mobile-search {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff;
}
.mobile-search:focus-within { border-color: var(--ink); }
.mobile-search input { border: none; padding: 2px 0; background: transparent; }
.mobile-search input:focus { outline: none; box-shadow: none; }
.mobile-search-ico { display: grid; place-items: center; flex: none; color: var(--muted); }
.mobile-search-ico svg { width: 18px; height: 18px; }
.mobile-links {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.mobile-links::-webkit-scrollbar { display: none; }
.mobile-links a {
  flex: none; font-size: .85rem; font-weight: 600; color: var(--body);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.mobile-links a:hover { text-decoration: none; border-color: var(--ink); }

/* ----------------------------------------------------------- category strip */
.cat-strip { border-bottom: 1px solid var(--line-soft); background: #fff; }

/* The secondary of the two sign-in links, so they do not compete. */
.header-nav a.muted-link { color: var(--muted); font-size: .9375rem; }
.header-nav a.muted-link:hover { color: var(--ink); }

/* ------------------------------------------------------- social sign-in */
.social-row { display: flex; flex-direction: column; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.social-or {
  display: flex; align-items: center; gap: 12px; margin: 18px 0;
  color: var(--muted); font-size: .8125rem;
}
.social-or::before, .social-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* --------------------------------------------------------- cookie notice */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 250;
  background: var(--ink); color: #fff; box-shadow: 0 -2px 20px rgba(30,10,60,.25);
}
.cookie-inner {
  max-width: var(--site-max); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: .875rem; flex: 1 1 320px; color: rgba(255,255,255,.86); }
.cookie-inner a { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------- social links */
.footer-social { display: inline-flex; gap: 10px; align-items: center; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--brand); color: #fff; text-decoration: none; }

/* ------------------------------------------------------- editable pages */
.page-body h2 { margin-top: 1.6em; }
.page-body h3 { margin-top: 1.3em; }
.page-body ul, .page-body ol { padding-left: 22px; }
.page-body li { margin-bottom: 6px; }
.page-body img { border-radius: var(--radius); margin: 14px 0; }
.page-body table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.page-body th, .page-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

/* ------------------------------------------- footer columns, in the admin */
.footer-board { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fcol { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; background: #fff; }
.fcol-head { padding-bottom: 10px; margin-bottom: 6px; border-bottom: 2px solid var(--brand); }
.fcol-head strong { display: block; color: var(--ink); font-size: 1.0625rem; }
.fcol-name {
  display: block; width: 100%; padding: 2px 6px; margin: 0 0 0 -6px;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  font: inherit; font-size: 1.0625rem; font-weight: 700; color: var(--ink);
  cursor: text;
}
.fcol-name:hover { border-color: var(--line); background: var(--bg-soft); }
.fcol-name:focus {
  outline: none; background: #fff;
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.fcol-n {
  font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.fitem {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; border-bottom: 1px solid var(--line-soft);
}
.fitem:last-of-type { border-bottom: 0; }
.fitem-label { color: var(--ink); font-size: .9375rem; }
.fitem.is-page .fitem-label { color: var(--body); }
.fitem.is-hidden { opacity: .55; }
.fitem-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.fitem-tools .pos {
  font-size: .7rem; color: var(--muted); background: var(--bg-soft);
  border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------ site administration */
.admin-shell { display: grid; grid-template-columns: 232px 1fr; gap: 32px; align-items: start; }

.admin-side { position: sticky; top: calc(var(--header-h) + 20px); }
.admin-side-toggle { display: none; }

.admin-group + .admin-group { margin-top: 18px; }
.admin-group-label {
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px; margin-bottom: 6px;
}
.admin-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border: 0; border-radius: 8px; margin-bottom: 2px;
  background: none; color: var(--body); font: inherit; font-size: .9375rem;
}
.admin-link:hover { background: var(--bg-soft); color: var(--ink); }
.admin-link.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.admin-main { min-width: 0; }   /* lets wide tables scroll instead of stretching */

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; gap: 16px; }
  .admin-side { position: static; }

  /* On a phone the menu folds into a single control. */
  .admin-side-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 14px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font: inherit; font-weight: 600; color: var(--ink);
  }
  .admin-side-toggle .chev { color: var(--muted); }
  #adminNav { display: none; padding-top: 10px; }
  #adminNav.open { display: block; }
}

/* ------------------------------------------------------- payment choice */
.pay-choice {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 8px;
}
.pay-choice:last-child { margin-bottom: 0; }
.pay-choice:hover { border-color: var(--brand); }
.pay-choice.only { cursor: default; }
.pay-choice.only:hover { border-color: var(--line); }
.pay-choice input { margin: 0; flex: none; }
.pill.blue { background: #e8f0fe; color: #1f4ea8; }

/* -------------------------------------------------------------- ad slots */
.ad-slot { margin: 28px 0 8px; }
.ad-slot-label {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.ad-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ad-card {
  display: flex; gap: 14px; align-items: center; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  color: inherit; transition: border-color .15s, box-shadow .15s;
}
.ad-card:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); }
.ad-card img { width: 132px; height: 96px; object-fit: cover; flex: none; background: var(--bg-soft); }
.ad-card.no-img img { display: none; }
.ad-body { padding: 12px 14px 12px 0; min-width: 0; }
.ad-card.no-img .ad-body { padding-left: 14px; }
.ad-body strong { display: block; color: var(--ink); }
.ad-body p {
  margin: 4px 0 6px; font-size: .85rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ------------------------------------------------------------ hero slider */
.hero.slider { position: relative; }
.hero .slides { position: relative; width: 100%; height: 100%; }
.hero .slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .6s ease;
}
.hero .slide.on { opacity: 1; visibility: visible; position: relative; }
.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: #1a0f2b; font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center;
}
.slide-arrow:hover { background: #fff; }
.slide-arrow.prev { left: 14px; }
.slide-arrow.next { right: 14px; }
.slide-arrow[hidden] { display: none; }
.slide-dots {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.slide-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: none; background: rgba(255,255,255,.5);
}
.slide-dots button.on { background: #fff; width: 22px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .hero .slide { transition: none; } }

/* The home page band sits under the hero and scrolls sideways with arrows. */
.cat-band { padding: 18px 0 4px; }
.cat-rail { position: relative; display: flex; align-items: center; }
/* No scroll-behavior here — the script asks for smooth scrolling and falls
   back to a jump, so the arrows work even where smooth is unsupported. */
.cat-rail .cat-scroll { flex: 1; }
.cat-arrow {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1.25rem; line-height: 1; cursor: pointer; z-index: 2;
  box-shadow: var(--shadow); display: grid; place-items: center;
}
.cat-arrow:hover { border-color: var(--brand); color: var(--brand); }
.cat-arrow[hidden] { display: none; }
.cat-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 18px 20px;
  max-width: var(--max); margin: 0 auto; scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-item {
  flex: none; width: 92px; text-align: center; font-size: .78rem;
  color: var(--body); font-weight: 500;
}
.cat-item:hover { text-decoration: none; color: var(--brand); }
.cat-icon {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  background: #fff; transition: border-color .15s, background .15s;
}
.cat-item:hover .cat-icon { border-color: var(--brand); background: var(--brand-soft); }
.cat-item.active .cat-icon { border-color: var(--brand); background: var(--brand-soft); }
.cat-icon svg { width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 1.6; }

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; margin: 0 auto; max-width: var(--max);
  border-radius: var(--radius-lg); overflow: hidden;
  min-height: 340px; display: flex; align-items: center;
  background: #1e0a3c;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-inner { position: relative; padding: 48px 44px; max-width: 620px; }
.hero .eyebrow {
  display: inline-block; background: var(--brand); color: #fff;
  font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 3px; margin-bottom: 14px;
}
.hero h1 {
  color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 14px;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero p { color: rgba(255,255,255,.92); font-size: 1.0625rem; margin: 0 0 22px; }

/* ------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--body); font-weight: 600; font-size: .9rem;
  cursor: pointer; font-family: inherit;
}
.tab:hover { border-color: var(--ink); text-decoration: none; }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------- event cards */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--brand); font-weight: 600; font-size: .9375rem; }

.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.ecard { position: relative; display: flex; flex-direction: column; }
.ecard:hover { text-decoration: none; }
.ecard-media {
  position: relative; aspect-ratio: 2 / 1; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-soft); margin-bottom: 12px;
}
.ecard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ecard:hover .ecard-media img { transform: scale(1.04); }
.ecard-badge {
  position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.95);
  color: var(--ink); font-size: .72rem; font-weight: 700; padding: 4px 8px;
  border-radius: 4px; box-shadow: var(--shadow-sm);
}
.ecard-badge.hot { background: var(--brand); color: #fff; }
.ecard-save {
  position: absolute; right: 10px; top: 10px; width: 34px; height: 34px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.94);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm);
}
.ecard-save svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.ecard-save.saved svg { fill: var(--brand); stroke: var(--brand); }
.ecard-title {
  font-weight: 700; color: var(--ink); font-size: 1rem; margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3;
}
.ecard-date { color: var(--brand); font-weight: 600; font-size: .8125rem; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .02em; }
.ecard-meta { color: var(--muted); font-size: .875rem; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecard-price { color: var(--ink); font-weight: 600; font-size: .875rem; }
.ecard-promoted { color: var(--muted); font-size: .75rem; margin-top: 4px; }

/* list variant used on the search page */
.elist { display: flex; flex-direction: column; gap: 4px; }
.erow {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line-soft); align-items: center;
}
.erow:hover { text-decoration: none; }
.erow .ecard-media { margin: 0; aspect-ratio: 16 / 9; }
.erow-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* --------------------------------------------------------------- skeletons */
.skel { background: linear-gradient(90deg, #f1f0f4 25%, #e7e6ec 37%, #f1f0f4 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite linear; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skel-card .skel-img { aspect-ratio: 2/1; border-radius: var(--radius); margin-bottom: 12px; }
.skel-line { height: 12px; margin-bottom: 8px; }

/* ------------------------------------------------------------------ badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--body);
}
.pill.green { background: #e6f4ef; color: var(--green); }
.pill.amber { background: #fdf1e0; color: var(--amber); }
.pill.red   { background: #fdecea; color: var(--red); }
.pill.blue  { background: #e9f0fd; color: var(--blue); }
.pill.brand { background: var(--brand-soft); color: var(--brand-dark); }

/* -------------------------------------------------------------- event page */
.event-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line-soft); }
.event-hero-img {
  max-width: 1040px; margin: 0 auto; aspect-ratio: 2 / 1; max-height: 460px;
  overflow: hidden; background: #1e0a3c;
}
.event-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.event-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 48px;
  padding: 36px 0 64px;
}
.event-body h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.event-body h3 { font-size: 1.125rem; margin: 22px 0 8px; }
.event-body p, .event-body li { color: var(--body); }
.event-body ul, .event-body ol { padding-left: 20px; }
.event-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 10px; }

.info-line { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.info-line .ico {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg-soft);
  display: grid; place-items: center; flex: none;
}
.info-line .ico svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.7; }
.info-line strong { display: block; color: var(--ink); }

.ticket-panel {
  position: sticky; top: calc(var(--header-h) + 20px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 20px; background: #fff;
}
.tier {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; transition: border-color .15s;
}
.tier.selected { border-color: var(--brand); background: var(--brand-soft); }
.tier.disabled { opacity: .6; }
.tier-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tier-name { font-weight: 700; color: var(--ink); }
.tier-price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px; background: #fff; }
.qty button {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: transparent;
  font-size: 1.125rem; line-height: 1; cursor: pointer; color: var(--ink); font-family: inherit;
}
.qty button:hover:not(:disabled) { background: var(--bg-soft); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }

.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .9375rem; }
.summary-total {
  display: flex; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px;
  font-weight: 800; font-size: 1.125rem; color: var(--ink);
}

/* ----------------------------------------------------------------- panels */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; padding: 24px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; }

.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: #fff;
}
.stat .k { font-size: .8125rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1.15; margin-top: 6px; }
.stat .sub { font-size: .8125rem; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data th {
  background: var(--bg-soft); font-weight: 700; color: var(--ink);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fcfbfd; }

/* ------------------------------------------------------------------ ticket */
.ticket-card {
  display: grid; grid-template-columns: 1fr 150px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm);
}
.ticket-stub {
  border-left: 2px dashed var(--line); padding: 16px; display: grid;
  place-items: center; gap: 8px; background: var(--bg-soft); text-align: center;
}
.ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem; letter-spacing: .06em; color: var(--ink); font-weight: 700; word-break: break-all;
}
.qr { width: 118px; height: 118px; background: #fff; padding: 6px; border-radius: 6px; }
.qr img, .qr canvas, .qr svg { width: 100%; height: 100%; display: block; }

/* ----------------------------------------------------------------- alerts */
.alert {
  padding: 12px 14px; border-radius: var(--radius); font-size: .9375rem;
  border: 1px solid; margin-bottom: 16px;
}
.alert-error   { background: #fdecea; border-color: #f5c6c0; color: #922; }
.alert-success { background: #e6f4ef; border-color: #b7e0d0; color: #0b5f43; }
.alert-info    { background: #e9f0fd; border-color: #c3d6f7; color: #1a4ba8; }
.alert-warn    { background: #fdf1e0; border-color: #f2d6a8; color: #7a4300; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; stroke: var(--line); fill: none; stroke-width: 1.4; margin-bottom: 14px; }
.empty h3 { color: var(--ink); }

/* ----------------------------------------------------------------- modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(30,10,60,.55); z-index: 200;
  display: grid; place-items: center; padding: 20px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); padding: 28px; position: relative;
}
.modal-close {
  position: absolute; right: 14px; top: 12px; background: none; border: none;
  font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px;
}

/* ------------------------------------------------------------------ toast */
/*
 * Toasts hug the box, not the window. Centring the strip the same way body is
 * centred lands them exactly on the box edge — 100vw would be out by half the
 * scrollbar, which it counts and fixed positioning does not.
 */
#toasts {
  position: fixed; bottom: 20px; left: 0; right: 0;
  max-width: var(--site-max); margin: 0 auto; padding: 0 20px;
  align-items: flex-end; pointer-events: none; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
#toasts > * { pointer-events: auto; }   /* the strip is transparent to clicks, the toasts are not */
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: .9375rem; max-width: 340px;
  animation: toast-in .2s ease-out;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- filters */
.filters { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.filter-group { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.filter-group:first-child { padding-top: 0; }
.filter-group h4 { font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; color: var(--ink); }
.filter-group label { font-weight: 500; font-size: .9375rem; margin-bottom: 8px; color: var(--body); }
.search-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 40px; padding: 28px 0 64px; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line-soft); margin-top: 40px; }
.footer-cols {
  display: grid; gap: 32px; padding: 48px 0 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.footer-cols h4 { font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { color: var(--body); font-size: .9375rem; }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 20px 0; display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .875rem; color: var(--muted);
}

/* ------------------------------------------------------------ CTA banner */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: 44px; display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,.82); margin: 0; }

/* --------------------------------------------------------------- progress */
.bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .event-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 32px; }
}
@media (max-width: 900px) {
  .search-bar { display: none; }
  .mobile-bar { display: block; }
  .site-header { position: static; }
  .ticket-panel, .filters { top: 20px; }
  .search-layout { grid-template-columns: 1fr; gap: 20px; }
  .filters { position: static; }
  .event-layout { grid-template-columns: 1fr; }
  .ticket-panel { position: static; }
  .erow { grid-template-columns: 140px 1fr; }
  .erow-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .cta-band { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.625rem; }
  .header-nav .desktop-only { display: none; }
  .hero { min-height: 260px; border-radius: 0; }
  .hero-inner { padding: 28px 22px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .container { padding: 0 16px; }
  .section { padding: 28px 0; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
  .ecard-title { font-size: .9375rem; }
  .panel { padding: 18px; }
  .ticket-card { grid-template-columns: 1fr; }
  .ticket-stub { border-left: none; border-top: 2px dashed var(--line); }
  .erow { grid-template-columns: 1fr; }
  .erow .ecard-media { aspect-ratio: 2/1; }
}

/* --------------------------------------------------------------- printing */
@media print {
  .site-header, .site-footer, .no-print, #toasts { display: none !important; }
  body { background: #fff; }
  .ticket-card { break-inside: avoid; box-shadow: none; }
}
