/* Public agency store (/store/{brand}). --agency-color and --agency-contrast come from the project branding. */
.agency-store {
  --store-ink: #1d2128;
  --store-muted: #5d6470;
  --store-line: #e3e6eb;
  --store-surface: #ffffff;
  --store-page: #f6f7f9;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--store-page);
  color: var(--store-ink);
  font: 400 16px/1.5 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.agency-store *, .agency-store *::before, .agency-store *::after { box-sizing: border-box; }
.agency-store .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.agency-store [hidden] { display: none !important; }
.store-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Brand bar */
.store-bar { background: var(--store-surface); border-top: 4px solid var(--agency-color); border-bottom: 1px solid var(--store-line); }
.store-bar__inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.store-bar__logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.store-bar__monogram { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--agency-color); color: var(--agency-contrast); font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.store-bar__name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }

/* Intro */
.store-main { flex: 1; padding-top: 40px; padding-bottom: 56px; }
.store-intro { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 24px; }
.store-intro h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }

/* Search */
.store-search { margin-bottom: 24px; max-width: 420px; }
.store-search input { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--store-line); border-radius: 10px; background: var(--store-surface); font: inherit; font-size: 16px; color: var(--store-ink); }
.store-search input:focus { outline: 2px solid var(--agency-color); outline-offset: 1px; border-color: transparent; }

/* Event grid */
.store-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.store-card { position: relative; display: flex; flex-direction: column; background: var(--store-surface); border: 1px solid var(--store-line); border-radius: 14px; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.store-card:hover { box-shadow: 0 10px 28px rgba(20, 24, 31, .1); transform: translateY(-2px); }
.store-card:focus-within { outline: 2px solid var(--agency-color); outline-offset: 2px; }
.store-card__media { position: relative; aspect-ratio: 16 / 9; background: #eceef2; overflow: hidden; }
.store-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.store-card__media.is-placeholder { background: linear-gradient(135deg, var(--agency-color), color-mix(in srgb, var(--agency-color) 55%, #000)); }
.store-card__mark { position: absolute; right: 18px; bottom: 14px; width: 84px; height: 84px; fill: none; stroke: color-mix(in srgb, var(--agency-contrast) 35%, transparent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-12deg); }
.store-card__date { position: absolute; top: 12px; left: 12px; display: grid; justify-items: center; min-width: 52px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .95); color: var(--store-ink); line-height: 1.1; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.store-card__date span { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--store-muted); }
.store-card__date strong { font-size: 20px; font-weight: 600; }
.store-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; gap: 6px; }
.store-card__title { font-size: 18px; line-height: 1.35; font-weight: 600; color: var(--store-ink); text-decoration: none; overflow-wrap: anywhere; }
.store-card__title::after { content: ''; position: absolute; inset: 0; }
.store-card__title:focus { outline: none; }
.store-card__meta { margin: 0; font-size: 14px; color: var(--store-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.store-card__price { font-weight: 600; font-size: 16px; }
.store-card__cta { flex-shrink: 0; padding: 9px 16px; border-radius: 999px; background: var(--agency-color); color: var(--agency-contrast); font-size: 14px; font-weight: 500; }
.store-card.is-sold-out .store-card__price { color: var(--store-muted); }
.store-empty { margin: 32px 0; padding: 40px 20px; text-align: center; color: var(--store-muted); background: var(--store-surface); border: 1px dashed var(--store-line); border-radius: 14px; }

/* Footer */
.store-footer { background: var(--store-surface); border-top: 1px solid var(--store-line); font-size: 14px; color: var(--store-muted); }
.store-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; }
.store-footer p { margin: 0; }
.store-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.store-footer a { color: var(--store-ink); text-underline-offset: 3px; }

@media (max-width: 640px) {
  .store-main { padding-top: 28px; }
  .store-intro h1 { font-size: 24px; }
  .store-grid { grid-template-columns: 1fr; gap: 16px; }
  .store-search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .store-card { transition: none; }
  .store-card:hover { transform: none; }
}

/* Agency attribution on the native event and checkout pages (views/agency_brand.php). */
.agency-checkout-brand{display:flex;align-items:center;gap:16px;box-sizing:border-box;background:#fff;color:#20242c;border-block:1px solid #d8dce2;border-left:6px solid var(--agency-color,#20242c);border-radius:6px;padding:12px 20px;margin:16px auto;max-width:1000px;font-size:16px;font-weight:500;position:relative;flex-wrap:wrap}
.agency-checkout-brand img.agency-logo{height:48px;width:auto;max-width:160px;object-fit:contain}
.agency-link-notice{max-width:1000px;margin:16px auto;padding:16px 20px;background:#fff7e8;color:#422d10;font-size:16px}
.agency-link-notice a{display:inline-block;margin-left:8px;text-decoration:underline}
