/* ========================================================
   SHOP THEME · Editorial Design System
   Cream paper · Deep ink · Hot pink accent
   Big serif headlines · Mono labels · Magazine layout
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,400;1,9..144,500;1,9..144,600&family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Ink */
  --ink: #0a0a0a;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a8a;

  /* Paper */
  --paper: #f5f1e8;
  --paper-2: #ffffff;
  --paper-3: #ebe6dc;
  --paper-4: #fbf8f1;

  /* Lines */
  --line: #e0dcd1;
  --line-2: #cfc9bd;

  /* Accent (hot pink) */
  --accent: #ff2e63;
  --accent-2: #ff5582;
  --accent-soft: #ffe1ea;
  --accent-deep: #d61e4f;

  /* Inverse */
  --bg-dark: #0a0a0a;
  --bg-dark-2: #161616;
  --ink-inverse: #f5f1e8;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --d-fast: 180ms;
  --d-base: 280ms;
  --d-slow: 480ms;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Type */
  --display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Selection */
::selection { background: var(--ink); color: var(--paper); }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================================
   PAGE TRANSITION (admin / merchant nav, content area swap)
   ======================================================== */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(14px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0);   }
}
@keyframes pageLeave {
  from { opacity: 1; transform: translateY(0);    }
  to   { opacity: 0; transform: translateY(-8px); }
}
.page-entering { animation: pageEnter .45s var(--ease-out) both; }
.page-leaving  { animation: pageLeave .18s var(--ease-in)  both; }

/* Stagger children inside an entering page (auto-applies to .stagger inside) */
.page-entering .stagger > *,
.page-entering > .dash-card,
.page-entering > .form-grid-2 > .dash-card,
.page-entering > .ec-grid > * {
  animation: fadeUp .55s var(--ease-out) both;
}
.page-entering > .dash-card:nth-child(1)              { animation-delay: 60ms; }
.page-entering > .dash-card:nth-child(2)              { animation-delay: 120ms; }
.page-entering > .dash-card:nth-child(3)              { animation-delay: 180ms; }
.page-entering > .dash-card:nth-child(4)              { animation-delay: 240ms; }
.page-entering > .dash-card:nth-child(5)              { animation-delay: 300ms; }

/* ========================================================
   KEYFRAMES
   ======================================================== */
@keyframes fadeIn       { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp       { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown     { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn      { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(80%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight{ to { opacity: 0; transform: translateX(80%); } }
@keyframes spin         { to { transform: rotate(360deg); } }
@keyframes marquee      { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeRev   { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes blink        { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse        { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.92); } }
@keyframes progress     { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes drawIn       { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spinSlow     { to { transform: rotate(360deg); } }

/* ========================================================
   STAGGER
   ======================================================== */
.stagger > * { opacity: 0; animation: fadeUp .7s var(--ease-out) forwards; }
.stagger > *:nth-child(1)  { animation-delay: 50ms; }
.stagger > *:nth-child(2)  { animation-delay: 100ms; }
.stagger > *:nth-child(3)  { animation-delay: 150ms; }
.stagger > *:nth-child(4)  { animation-delay: 200ms; }
.stagger > *:nth-child(5)  { animation-delay: 250ms; }
.stagger > *:nth-child(6)  { animation-delay: 300ms; }
.stagger > *:nth-child(7)  { animation-delay: 350ms; }
.stagger > *:nth-child(8)  { animation-delay: 400ms; }
.stagger > *:nth-child(9)  { animation-delay: 450ms; }
.stagger > *:nth-child(10) { animation-delay: 500ms; }
.stagger > *:nth-child(n+11){ animation-delay: 550ms; }

.animate-in    { animation: fadeUp .65s var(--ease-out) both; }
.animate-fade  { animation: fadeIn .4s var(--ease-smooth) both; }
.animate-scale { animation: scaleIn .4s var(--ease-spring) both; }

/* ========================================================
   TYPOGRAPHY HELPERS
   ======================================================== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--ink-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow.dot::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
  font-variation-settings: 'opsz' 144;
  color: var(--ink);
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-3);
  font-weight: 500;
}

.num {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  font-feature-settings: 'tnum';
  letter-spacing: -.02em;
}

.serif { font-family: var(--display); }
.mono  { font-family: var(--mono); }
.italic{ font-style: italic; }

/* ========================================================
   SCORE / RATING BADGE
   ======================================================== */
.score-badge {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -.03em;
  flex-direction: column;
  line-height: 1;
}
.score-badge.sm { width: 44px; height: 44px; font-size: 16px; }
.score-badge.md { width: 56px; height: 56px; font-size: 19px; }
.score-badge.lg { width: 84px; height: 84px; font-size: 30px; }
.score-badge .score-tag {
  font-size: 7px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 3px;
  opacity: .65;
}
.score-badge.accent  { background: var(--accent); color: #fff; }
.score-badge.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.score-badge.paper   { background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); }

/* ========================================================
   TAG CHIP
   ======================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition: all .25s var(--ease-smooth);
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.tag.large { padding: 9px 16px; font-size: 11px; }
.tag.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ========================================================
   MARQUEE STRIP
   ======================================================== */
.marquee-track {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 18px 0;
}
.marquee-track.dark {
  background: var(--bg-dark);
  color: var(--paper);
  border-color: var(--bg-dark);
}
.marquee-track.accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.marquee-inner {
  display: inline-flex;
  gap: 60px;
  animation: marquee 40s linear infinite;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -.02em;
  align-items: center;
  padding-right: 60px;
  font-style: italic;
}
.marquee-track.fast .marquee-inner { animation-duration: 22s; }
.marquee-track.slow .marquee-inner { animation-duration: 60s; }
.marquee-track.reverse .marquee-inner { animation-name: marqueeRev; }
.marquee-track.compact { padding: 10px 0; }
.marquee-track.compact .marquee-inner {
  font-size: 14px;
  font-style: normal;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.marquee-star {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.marquee-track.dark .marquee-star,
.marquee-track.accent .marquee-star { color: currentColor; opacity: .9; }

/* ========================================================
   BUTTONS
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition:
    transform .35s var(--ease-spring),
    background .25s var(--ease-smooth),
    border-color .25s var(--ease-smooth),
    color .25s var(--ease-smooth),
    box-shadow .35s var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 0 transparent;
}
/* Sheen sweep — subtle highlight crossing the button on hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 100%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.18) 45%, rgba(255,255,255,.32) 50%, rgba(255,255,255,.18) 55%, transparent 100%);
  transform: skewX(-18deg);
  transition: left .65s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.btn:hover::before { left: 120%; }
.btn > * { position: relative; z-index: 1; }
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -12px rgba(255,46,99,.55), 0 4px 10px -4px rgba(255,46,99,.32);
}
.btn:active { transform: translateY(0) scale(.97); transition-duration: .12s; box-shadow: 0 4px 10px -6px rgba(0,0,0,.25); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 14px 32px -14px rgba(0,0,0,.45); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; box-shadow: 0 16px 36px -12px rgba(214,30,79,.6), 0 4px 10px -4px rgba(214,30,79,.35); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-small { padding: 8px 14px; font-size: 11px; }
.btn-large { padding: 16px 32px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .35s var(--ease-out); display: inline-block; }
.btn:hover .arrow { transform: translateX(5px); }

/* ========================================================
   FORM (editorial underline) — animated focus, custom select
   ======================================================== */
.field { margin-bottom: 22px; position: relative; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-2);
  margin-bottom: 8px;
  font-weight: 600;
  transition: color .25s var(--ease-smooth);
}
.field:focus-within label { color: var(--ink); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  /* Two-layer underline: static line + animated accent line drawn on focus */
  background-image:
    linear-gradient(to right, var(--accent), var(--accent-2)),
    linear-gradient(to right, var(--line-2), var(--line-2));
  background-size: 0% 1.5px, 100% 1.5px;
  background-position: bottom left, bottom left;
  background-repeat: no-repeat;
  color: var(--ink);
  padding: 10px 0 12px;
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 500;
  border-radius: 0;
  resize: vertical;
  transition: background-size .4s var(--ease-out), color .25s, padding .25s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  background-image:
    linear-gradient(to right, var(--accent), var(--accent-2)),
    linear-gradient(to right, var(--ink-3), var(--ink-3));
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background-size: 100% 1.5px, 100% 1.5px;
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled { opacity: .5; cursor: not-allowed; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); transition: color .25s, transform .35s var(--ease-out), opacity .25s; }
.field:focus-within input::placeholder,
.field:focus-within textarea::placeholder { color: transparent; }
/* Hide native number arrows (GLOBAL — every input[type=number] everywhere) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* Autofill (Webkit) — keep paper background, kill yellow */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  caret-color: var(--ink);
  transition: background-color 5000s ease-in-out 0s;
}
/* Custom chevron for <select> — SVG inline, swaps color on hover/focus */
.field select {
  cursor: pointer;
  padding-right: 28px;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"),
    linear-gradient(to right, var(--accent), var(--accent-2)),
    linear-gradient(to right, var(--line-2), var(--line-2));
  background-size: 12px 12px, 0% 1.5px, 100% 1.5px;
  background-position: right 4px center, bottom left, bottom left;
}
.field select:hover {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"),
    linear-gradient(to right, var(--accent), var(--accent-2)),
    linear-gradient(to right, var(--ink-3), var(--ink-3));
}
.field select:focus {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ff2e63' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"),
    linear-gradient(to right, var(--accent), var(--accent-2)),
    linear-gradient(to right, var(--line-2), var(--line-2));
}
.field select::-ms-expand { display: none; }
.field option { background: var(--paper-2); color: var(--ink); padding: 10px; }
/* Boxed variant (rounded card-style inputs) */
.field-boxed input,
.field-boxed select,
.field-boxed textarea {
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14px;
  background-image: none;
  background-color: var(--paper-2);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field-boxed input:hover,
.field-boxed select:hover,
.field-boxed textarea:hover { border-color: var(--ink-3); }
.field-boxed input:focus,
.field-boxed select:focus,
.field-boxed textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ========================================================
   TOAST
   ======================================================== */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}
.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  box-shadow: 0 16px 40px rgba(0,0,0,.20);
  animation: slideInRight .5s var(--ease-spring) both;
  cursor: pointer;
  overflow: hidden;
  border: 1.5px solid var(--ink);
}
.toast.exit { animation: slideOutRight .35s var(--ease-smooth) forwards; }
.toast::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: currentColor;
  transform-origin: left;
  animation: progress 3s linear forwards;
  opacity: .85;
}
.toast .toast-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: currentColor;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.toast .toast-msg { color: var(--paper); flex: 1; line-height: 1.4; }
.toast.success { color: #34d399; }
.toast.error   { color: var(--accent); border-color: var(--accent); }
.toast.warning { color: #fbbf24; }
.toast.info    { color: #60a5fa; }

/* ========================================================
   SPINNER
   ======================================================== */
.spinner {
  display: inline-block;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}

/* ========================================================
   LANG SWITCHER
   ======================================================== */
.lang-switcher { position: relative; display: inline-block; }
.lang-btn {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s var(--ease-smooth);
}
.lang-btn:hover { background: var(--ink); color: var(--paper); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  min-width: 200px;
  overflow: hidden;
  z-index: 60;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.lang-menu.show { display: block; animation: scaleIn .25s var(--ease-spring); transform-origin: top right; }
.lang-item {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, color .2s;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.lang-item:last-child { border-bottom: 0; }
.lang-item:hover { background: var(--paper); }
.lang-item.active { background: var(--ink); color: var(--paper); }
.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: .05em;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  margin-right: 12px;
  line-height: 1;
}
.lang-item.active .lang-code { background: var(--paper); color: var(--ink); }

/* ========================================================
   EDITORIAL CARD
   ======================================================== */
.editorial-card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s var(--ease-out), border-color .25s, box-shadow .35s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.editorial-card:hover {
  border-color: var(--ink);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(10,10,10,.10);
}
.editorial-card .ec-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--paper-3);
}
.editorial-card .ec-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
  filter: saturate(.92);
}
.editorial-card:hover .ec-img img { transform: scale(1.06); filter: saturate(1.02); }
.editorial-card.is-digital .ec-img {
  background: linear-gradient(180deg, #f8f3ed 0%, #eee8df 100%);
}
.editorial-card.is-digital .ec-img img {
  object-fit: contain;
  padding: 18px;
  box-sizing: border-box;
  transform: none;
  filter: saturate(1);
}
.editorial-card.is-digital:hover .ec-img img {
  transform: none;
  filter: saturate(1);
}
.editorial-card .ec-corner {
  position: absolute;
  top: 12px;
  z-index: 2;
}
.editorial-card .ec-corner-l { left: 12px; }
.editorial-card .ec-corner-r { right: 12px; }
.editorial-card .ec-circle {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -.03em;
  font-variation-settings: 'opsz' 144;
  transition: transform .35s var(--ease-spring);
}
.editorial-card:hover .ec-circle { transform: rotate(-12deg) scale(1.05); background: var(--accent); color: #fff; border-color: var(--accent); }
.editorial-card .ec-body {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.editorial-card .ec-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.editorial-card .ec-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
  flex: 1;
}
.editorial-card .ec-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.editorial-card .ec-price {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -.03em;
  color: var(--ink);
}
.editorial-card .ec-price .currency {
  font-size: 11px;
  color: var(--ink-3);
  margin-right: 2px;
  font-family: var(--mono);
  vertical-align: top;
  font-weight: 600;
}
.editorial-card .ec-meta-info {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.5;
}
.editorial-card .ec-shop {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -2px 0 12px; padding: 8px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  min-height: 28px;
}
.editorial-card .ec-shop-name {
  font-family: var(--display); font-weight: 500; font-size: 12px; letter-spacing: -.005em;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.editorial-card .ec-shop-credit {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink); padding: 2px 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; flex-shrink: 0;
}

/* ========================================================
   MODAL — visibility-based for smooth enter/exit
   ======================================================== */
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s var(--ease-smooth), visibility 0s linear .35s;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s var(--ease-smooth), visibility 0s linear 0s;
}
.modal-box {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 36px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.30);
  transform: translateY(28px) scale(.94);
  opacity: 0;
  transition: transform .45s var(--ease-spring), opacity .35s var(--ease-out);
}
.modal-overlay.show .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-box h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}
.modal-box .close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: all .25s var(--ease-spring);
}
.modal-box .close:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(90deg);
}
.modal-box img.detail-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 20px;
  border: 1px solid var(--line);
}
.modal-box img.detail-img.is-digital {
  object-fit: contain;
  padding: 18px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #f8f3ed 0%, #eee8df 100%);
}
.modal-box .detail-price {
  font-family: var(--display);
  font-weight: 600;
  font-size: 48px;
  letter-spacing: -.035em;
  line-height: 1;
  margin: 12px 0 8px;
  font-variation-settings: 'opsz' 144;
  color: var(--accent);
}
.modal-box .detail-meta {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-2);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ========================================================
   ADDRESS BOX
   ======================================================== */
.address-box {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  padding: 18px 20px 26px;
  margin: 14px 0;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  position: relative;
  cursor: pointer;
  transition: background .25s, transform .25s;
  line-height: 1.5;
}
.address-box:hover { background: var(--accent-soft); }
.address-box:active { transform: scale(.99); }
.address-box::after {
  content: 'CLICK TO COPY';
  position: absolute;
  bottom: 8px;
  right: 14px;
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: .14em;
  font-family: var(--mono);
  font-weight: 600;
}

/* ========================================================
   TABS
   ======================================================== */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--ink);
}
.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-3);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color .25s, border-color .25s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ========================================================
   EMPTY STATE
   ======================================================== */
.empty-state {
  text-align: center;
  padding: 100px 20px;
}
.empty-state .icon {
  font-family: var(--display);
  font-size: 96px;
  display: block;
  margin-bottom: 24px;
  color: var(--line-2);
  font-weight: 500;
  font-style: italic;
  line-height: 1;
}
.empty-state p {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  color: var(--ink-3);
}

/* ========================================================
   STATS / NUMBER CALLOUT
   ======================================================== */
.stat {
  padding: 32px 0;
  border-top: 1.5px solid var(--ink);
}
.stat .stat-num {
  font-family: var(--display);
  font-size: 88px;
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.04em;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
  font-feature-settings: 'tnum';
}
.stat .stat-num em { color: var(--accent); font-style: italic; font-weight: 400; }
.stat .stat-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-2);
  margin-top: 8px;
  font-weight: 500;
}

/* ========================================================
   DASHBOARD UTILITIES (merchant + admin)
   ======================================================== */
.dash-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dash-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -.02em;
  line-height: 1.1;
  font-variation-settings: 'opsz' 144;
  color: var(--ink);
}

.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-3);
  font-weight: 600;
  padding: 14px 12px;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}
.dash-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.dash-table tbody tr { transition: background .2s; }
.dash-table tbody tr:hover { background: var(--paper); }
.dash-table tbody tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-success { color: #16a34a; background: rgba(22,163,74,.08); }
.badge-warning { color: #d97706; background: rgba(217,119,6,.08); }
.badge-danger  { color: var(--accent); background: var(--accent-soft); }
.badge-info    { color: var(--ink); background: var(--paper-3); }
.badge-solid   { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.btn-sm { padding: 6px 12px; font-size: 11px; border-width: 1px; margin-right: 4px; }

/* ========================================================
   THIN HORIZONTAL DIVIDER
   ======================================================== */
.divider { height: 1.5px; background: var(--ink); border: 0; }
.divider-thin { height: 1px; background: var(--line); border: 0; }

/* ========================================================
   MOBILE RESPONSIVE BASELINE
   ======================================================== */
@media (max-width: 900px) {
  /* Tables: horizontally scrollable inside dash-card */
  .dash-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-table { min-width: 640px; font-size: 12px; }
  .dash-table thead th { padding: 12px 10px; font-size: 9px; }
  .dash-table tbody td { padding: 12px 10px; }

  /* Card / section headings tighter */
  .dash-card { padding: 18px; border-radius: var(--r-md); }
  .dash-card-header { margin-bottom: 14px; padding-bottom: 12px; }
  .dash-card h3 { font-size: 18px; }

  /* Modal: more compact on small viewports */
  .modal-overlay { padding: 12px; align-items: flex-start; padding-top: 5vh; }
  .modal-box { padding: 22px 20px; border-radius: var(--r-md); max-height: 92vh; }
  .modal-box h2 { font-size: 28px; margin-bottom: 18px; }
  .modal-box .detail-price { font-size: 36px; }
  .modal-box .close { top: 12px; right: 14px; width: 32px; height: 32px; }

  /* Toast: full-width with margin */
  #toastContainer { top: 12px; right: 12px; left: 12px; max-width: none; }
  .toast { min-width: 0; max-width: none; }

  /* Marquee compact */
  .marquee-track { padding: 12px 0; }
  .marquee-inner { font-size: 22px; gap: 36px; padding-right: 36px; }
  .marquee-track.compact .marquee-inner { font-size: 11px; gap: 28px; }

  /* Tag chips slightly smaller */
  .tag { padding: 4px 9px; font-size: 9px; }
  .tag.large { padding: 7px 12px; font-size: 10px; }

  /* Buttons */
  .btn { padding: 11px 22px; font-size: 12px; }
  .btn-large { padding: 14px 28px; font-size: 13px; }

  /* Field inputs slightly larger touch targets */
  .field input, .field select, .field textarea { font-size: 16px; padding: 12px 0; }
  .field-boxed input, .field-boxed select, .field-boxed textarea { padding: 12px 14px; }

  /* Stats stacking */
  .stat .stat-num { font-size: 56px; }
}

@media (max-width: 480px) {
  .dash-card { padding: 14px; }
  .dash-card h3 { font-size: 16px; }
  .modal-box { padding: 18px 16px; }
  .modal-box h2 { font-size: 24px; }
  .modal-box .detail-price { font-size: 30px; }
  .marquee-inner { font-size: 18px; gap: 28px; padding-right: 28px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* ========================================================
   AUTH TOP BAR (login / register pages on merchant + admin)
   ======================================================== */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1.5px solid var(--ink);
  gap: 16px;
  background: var(--paper);
}
.auth-top .auth-brand {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  font-variation-settings: 'opsz' 144;
  text-decoration: none;
  color: var(--ink);
}
.auth-top .auth-brand em { font-style: italic; color: var(--accent); font-weight: 500; }
@media (max-width: 560px) {
  .auth-top { padding: 14px 16px; }
  .auth-top .auth-brand { font-size: 20px; }
}

/* ========================================================
   REDUCED MOTION
   ======================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
