/* E-Invitations module — landing, templates, editor (shop chrome) */
.einv-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--shop-radius-card);
  background: linear-gradient(135deg, rgba(31, 56, 100, 0.06) 0%, rgba(230, 81, 0, 0.06) 100%);
  border: 1px solid var(--shop-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.einv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(128, 0, 32, 0.08) 0%, transparent 40%);
  pointer-events: none;
}
.einv-hero-inner {
  position: relative;
  z-index: 1;
}
.einv-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--shop-primary);
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.einv-hero p {
  color: var(--shop-text-muted);
  max-width: 36rem;
  margin: 0 auto 1.25rem;
}
.einv-price-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--shop-accent);
  margin-bottom: 1rem;
}

/* Marketing pricing block (also configurable via Admin → Shop storefront) */
.pricing-wow-block {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1055 50%, #0f2044 100%);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 26rem;
  margin: 0 auto 1rem;
}
.pricing-launch-tag {
  display: inline-block;
  background: #e85d26;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 5px 18px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.pricing-was {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}
.pricing-now-label {
  font-size: 12px;
  color: #f0d080;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.pricing-now {
  font-size: 72px;
  font-weight: 900;
  background: linear-gradient(90deg, #f0d080, #fff, #f0d080);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerPrice 3s linear infinite;
  line-height: 1;
  margin: 4px 0;
}
.pricing-off-badge {
  display: inline-block;
  background: #e85d26;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.pricing-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
@keyframes shimmerPrice {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.einv-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 768px) {
  .einv-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
.einv-step {
  text-align: center;
  padding: 1rem;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-card);
}
.einv-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--shop-primary);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.einv-step h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}
.einv-step p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--shop-text-muted);
}

.einv-cat-block {
  margin: 2.5rem 0;
}
.einv-cat-block h2 {
  font-size: 1.1rem;
  color: var(--shop-primary);
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.einv-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.einv-event-card {
  display: block;
  padding: 1rem 0.75rem;
  border-radius: var(--shop-radius-card);
  border: 1px solid var(--shop-border);
  background: var(--shop-card);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.einv-event-card:hover {
  border-color: rgba(31, 56, 100, 0.35);
  box-shadow: var(--shop-shadow-card);
}
.einv-event-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.einv-event-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0 0 0.25rem;
}
.einv-event-meta {
  font-size: 0.75rem;
  color: var(--shop-text-muted);
}

.einv-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 900px) {
  .einv-features {
    grid-template-columns: 1fr;
  }
}
.einv-feature {
  padding: 1.25rem;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-card);
  background: var(--shop-card);
}
.einv-feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.einv-feature p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--shop-text-muted);
}

.einv-pricing-box {
  max-width: 32rem;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: var(--shop-radius-card);
  border: 2px solid rgba(31, 56, 100, 0.2);
  background: var(--shop-card);
}
.einv-pricing-box ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--shop-text-muted);
  font-size: 0.9rem;
}

.einv-gallery-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-snap-type: x mandatory;
}
.einv-gallery-card {
  position: relative;
  flex: 0 0 200px;
  height: 120px;
  border-radius: 8px;
  scroll-snap-align: start;
  background: linear-gradient(145deg, #800020 0%, #d4af37 100%);
  opacity: 0.9;
  overflow: hidden;
  animation: einvCardFadeUp 0.5s ease-out both;
  animation-delay: calc(0.03s * (var(--card-i, 1) - 1));
}
.einv-gallery-card .einv-tpl-preview-shine,
.einv-gallery-card .einv-tpl-preview-sparkle {
  border-radius: 8px;
}

/* Template selection */
.einv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}
.einv-filter-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--shop-border);
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}
.einv-filter-chip.is-active {
  background: var(--shop-primary);
  color: #fff;
  border-color: var(--shop-primary);
}

.einv-template-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
}
@media (max-width: 1100px) {
  .einv-template-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 880px) {
  .einv-template-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
}
@media (max-width: 620px) {
  .einv-template-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
}
@media (max-width: 420px) {
  .einv-template-grid { grid-template-columns: repeat(2, 1fr); gap: 0.35rem; }
}
.einv-template-card {
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--shop-card);
  animation: einvCardFadeUp 0.55s ease-out both;
  animation-delay: calc(0.035s * (var(--card-i, 1) - 1));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}
.einv-template-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
/* Compact body text for 6-column layout */
.einv-template-body {
  padding: 0.45rem 0.5rem 0.55rem;
}
.einv-template-body h3 {
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.einv-template-meta {
  font-size: 0.62rem;
  color: var(--shop-text-muted);
  margin-bottom: 3px;
}
.einv-style-badge {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--shop-border);
  font-weight: 600;
}
.einv-style-badge--cinematic {
  background: linear-gradient(135deg, #fce7f3, #e9d5ff);
  color: #6b21a8;
}
.einv-template-festive {
  font-size: 0.6rem;
  margin: 2px 0;
  opacity: 0.7;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.einv-template-dots {
  display: flex;
  gap: 3px;
  margin: 3px 0;
}
.einv-template-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, #800020);
  flex-shrink: 0;
}
.einv-template-actions {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}
.einv-template-actions .shop-btn-outline,
.einv-template-actions .shop-btn-primary {
  flex: 1;
  font-size: 0.62rem;
  padding: 4px 6px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
}
/* Price label on each template card */
.einv-card-price {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--shop-primary, #1f3864);
  background: rgba(31,56,100,0.08);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 3px;
}
/* Mini invitation thumbnail overlay inside .einv-template-preview */
.einv-tpl-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px 4px;
  pointer-events: none;
}
.einv-tpl-thumb-sym {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
.einv-tpl-thumb-line {
  width: 70%;
  height: 1px;
  background: rgba(255,255,255,0.4);
  border-radius: 1px;
  margin: 1px 0;
}
.einv-tpl-thumb-name {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.2;
  font-family: "Cinzel Decorative", serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  padding: 0 4px;
}
.einv-tpl-thumb-date {
  font-size: 0.48rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  font-family: system-ui, sans-serif;
  letter-spacing: 0.04em;
}
.einv-tpl-thumb-venue {
  font-size: 0.45rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  font-family: system-ui, sans-serif;
}
@keyframes einvCardFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.einv-template-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: linear-gradient(160deg, var(--tp, #800020), var(--ts, #fffdd0));
}
/* Live catalog tiles: iframe must fill the tile or the gradient above shows through (old + new templates). */
.einv-template-preview.einv-template-preview--live {
  background: #0f0520;
}
.einv-template-thumb-iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.einv-category-card-preview {
  display: block;
  width: 100%;
  height: 11rem;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin: 0 auto 0.65rem;
  background: #0f0520;
  border: 1px solid rgba(31, 56, 100, 0.12);
}
.einv-category-thumb-iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.einv-template-card.is-selected {
  outline: 3px solid var(--shop-accent);
  outline-offset: 2px;
  box-shadow: 0 10px 32px rgba(31, 56, 100, 0.2);
}
.einv-tpl-preview-shine {
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 48%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.35) 52%,
    transparent 60%
  );
  animation: einvTplShine 4s ease-in-out infinite;
  pointer-events: none;
}
.einv-tpl-preview-sparkle {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 12% 8%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 55% 22%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 78% 45%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 88% 88%, rgba(255, 255, 255, 0.65), transparent);
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  animation: einvSparkleDrift 6s ease-in-out infinite;
  opacity: 0.55;
}
@keyframes einvSparkleDrift {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-8px) scale(1.05);
    opacity: 0.65;
  }
}
@keyframes einvTplShine {
  0% {
    transform: translateX(-20%) rotate(12deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateX(120%) rotate(12deg);
    opacity: 0;
  }
}
/* Universal mini-preview motion — every event type uses einv-tpl-v0…v5 (cycles) */
.einv-template-card .einv-template-preview.einv-tpl-v0 {
  animation: einvPetals 5s ease-in-out infinite;
}
.einv-template-card .einv-template-preview.einv-tpl-v1 {
  background: linear-gradient(165deg, #5c0a1f 0%, #8b1538 40%, #d4af37 100%);
  animation: einvPulseBg 4s ease-in-out infinite;
}
.einv-template-card .einv-template-preview.einv-tpl-v2 {
  background: linear-gradient(155deg, #0f3d2e 0%, #1a5c45 50%, #c9a227 100%);
  animation: einvFloatHue 6s ease-in-out infinite;
}
.einv-template-card .einv-template-preview.einv-tpl-v3 {
  background: linear-gradient(160deg, #0d1f3c 0%, #1e3a5f 55%, #c0c0c0 100%);
}
.einv-template-card .einv-template-preview.einv-tpl-v4 {
  background: linear-gradient(145deg, #d4a5a5 0%, #f5e6e8 45%, #c48b9f 100%);
  animation: einvBloom 5s ease-in-out infinite;
}
.einv-template-card .einv-template-preview.einv-tpl-v5 {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    linear-gradient(165deg, #1a0a2e 0%, #2d1055 100%);
}
/* Strip uses same palettes; motion is shine + sparkle only (no transform clash with entrance) */
.einv-gallery-strip .einv-gallery-card.einv-tpl-v0 {
  filter: saturate(1.08);
}
.einv-gallery-strip .einv-gallery-card.einv-tpl-v1 {
  background: linear-gradient(165deg, #5c0a1f 0%, #8b1538 40%, #d4af37 100%);
}
.einv-gallery-strip .einv-gallery-card.einv-tpl-v2 {
  background: linear-gradient(155deg, #0f3d2e 0%, #1a5c45 50%, #c9a227 100%);
}
.einv-gallery-strip .einv-gallery-card.einv-tpl-v3 {
  background: linear-gradient(160deg, #0d1f3c 0%, #1e3a5f 55%, #c0c0c0 100%);
}
.einv-gallery-strip .einv-gallery-card.einv-tpl-v4 {
  background: linear-gradient(145deg, #d4a5a5 0%, #f5e6e8 45%, #c48b9f 100%);
}
.einv-gallery-strip .einv-gallery-card.einv-tpl-v5 {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    linear-gradient(165deg, #1a0a2e 0%, #2d1055 100%);
}
@keyframes einvPetals {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.15) brightness(1.05);
  }
}
@keyframes einvPulseBg {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}
@keyframes einvFloatHue {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(12deg);
  }
}
@keyframes einvBloom {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.92;
  }
}
.einv-style-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: rgba(31, 56, 100, 0.08);
  font-size: 0.7rem;
  font-weight: 600;
}
.einv-style-badge--cinematic {
  background: linear-gradient(135deg, #fce7f3, #e9d5ff);
  color: #6b21a8;
}
.einv-template-dots {
  display: flex;
  gap: 0.25rem;
  margin: 0.35rem 0 0.5rem;
  flex-wrap: wrap;
}
.einv-template-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot, #ccc);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.printed-card-upload {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--shop-border);
  border-radius: var(--shop-radius-card);
  background: rgba(31, 56, 100, 0.03);
}
.pcu-label {
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.pcu-hint {
  font-size: 0.8rem;
  color: var(--shop-text-muted);
  margin-bottom: 0.65rem;
}
.pcu-btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--shop-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.einv-printed-preview-wrap {
  margin-top: 0.75rem;
}
.einv-printed-preview-wrap img {
  max-width: 200px;
  border-radius: 8px;
  border: 1px solid var(--shop-border);
}
.einv-gallery-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  min-height: 2rem;
}
.einv-gallery-editor-item {
  position: relative;
  width: 88px;
  cursor: grab;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--shop-border);
  transition: box-shadow 0.15s ease, opacity 0.15s ease;
}
.einv-gallery-editor-item.dragging {
  opacity: 0.55;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  cursor: grabbing;
}
.einv-gallery-editor-item img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}
.music-option select {
  width: 100%;
  margin-top: 0.35rem;
}
.einv-template-body {
  padding: 0.75rem 1rem 1rem;
}
.einv-template-body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}
.einv-template-meta {
  font-size: 0.75rem;
  color: var(--shop-text-muted);
  margin-bottom: 0.35rem;
}
.einv-template-festive {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--shop-text-muted);
  margin: 0 0 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.einv-template-actions {
  display: flex;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   Editor layout — form left/center, preview right sticky
   No wasted space, all devices responsive
   ═══════════════════════════════════════════════════════ */
.einv-editor-layout {
  display: grid;
  /* Col 1 = form, Col 2 = sticky live preview (narrow on small laptop, wide on desktop) */
  grid-template-columns: 1fr minmax(300px, 400px);
  gap: 1.25rem;
  align-items: start;
  position: relative;
}

/* Laptop / large screen: use most of the right column — full-scale preview (not phone zoom) */
@media (min-width: 1025px) {
  .einv-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, min(62vw, 820px));
    gap: 1.5rem;
  }
  .einv-editor-preview-inner {
    zoom: 1;
  }
  .einv-editor-preview-clip {
    overflow-x: hidden;
  }
}

@media (min-width: 1440px) {
  .einv-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(400px, min(58vw, 880px));
  }
}

/* Tablet: single column, preview on top */
@media (max-width: 1024px) {
  .einv-editor-layout {
    grid-template-columns: 1fr;
  }
  .einv-editor-preview {
    order: -1;   /* preview shows first on tablet/mobile */
  }
}

/* Mobile: reduce gap */
@media (max-width: 560px) {
  .einv-editor-layout { gap: 0.75rem; }
}

/* ── Floating sections navigation (replaces left sidebar) ────── */
.einv-secnav {
  position: fixed;
  top: 72px;
  left: 0;
  z-index: 800;
}
.einv-secnav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  background: var(--shop-primary, #1f3864);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.18);
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.einv-secnav-toggle:hover { background: #2d4f8a; }
.einv-secnav-toggle svg { width: 14px; height: 14px; flex-shrink: 0; }
.einv-secnav-panel {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 4px 18px rgba(0,0,0,0.12);
  padding: 0.5rem 0;
  animation: einvSecPanelIn 0.18s ease;
}
@keyframes einvSecPanelIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.einv-secnav-panel[hidden] { display: none; }
.einv-secnav-panel a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  color: var(--shop-text);
  text-decoration: none;
  transition: background 0.1s;
}
.einv-secnav-panel a:hover { background: var(--shop-bg, #f8fafc); }
.einv-secnav-panel a.is-active {
  font-weight: 600;
  color: var(--shop-primary, #1f3864);
  background: rgba(31,56,100,0.06);
}
.einv-secnav-panel-head {
  padding: 0.5rem 1rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--shop-text-muted);
  border-bottom: 1px solid var(--shop-border);
  margin-bottom: 0.25rem;
}
/* On mobile: fixed bottom instead of left */
@media (max-width: 680px) {
  .einv-secnav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
  }
  .einv-secnav-toggle {
    border-radius: 10px 10px 0 0;
    width: 100%;
    justify-content: center;
  }
  .einv-secnav-panel {
    bottom: 100%;
    top: auto;
    border-radius: 10px 10px 0 0;
    min-width: 100%;
    max-height: 55vh;
    overflow-y: auto;
  }
}

/* ── Form area (main column — takes full remaining width) ──────── */
.einv-editor-form {
  padding: 1rem;
  border: none;
  border-radius: var(--shop-radius-card);
  background: #eef2f7;
  min-width: 0; /* prevent grid blowout */
}

/* ── Preview panel (right column, sticky while form scrolls) ──── */
.einv-editor-preview {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 0.75rem 0.65rem 0.85rem;
  background: linear-gradient(155deg, #1a0a2e 0%, #2d1055 55%, #1a1535 100%);
  max-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  z-index: 5;
}
.einv-editor-preview > p.shop-hint {
  color: rgba(255,255,255,0.65);
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Inner scroll: full invite height, scroll inside phone frame */
.einv-editor-preview-clip {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  position: relative;
  flex: 1;
  min-height: 280px;
  max-height: calc(100vh - 9.5rem);
  background: #140a22;
  border: 1px solid rgba(255,255,255,0.08);
}

.einv-editor-preview-inner {
  width: 100%;
  overflow: visible;
  border-radius: 8px;
  padding-bottom: 0.5rem;
  zoom: 0.62;
}

@media (max-width: 1024px) {
  .einv-editor-preview {
    position: static;
    max-height: none;
    top: auto;
  }
  .einv-editor-preview-clip {
    max-height: 70vh;
    min-height: 240px;
  }
  .einv-editor-preview-inner { zoom: 0.52; }
}

/* Full invite visible in editor (public page uses body.einv-page--sample-story-active for scroll-reveal). */
#einvLivePreviewRoot .einv-sample-section {
  opacity: 1 !important;
  transform: none !important;
}

#einvLivePreviewRoot .einv-preview-editable:focus {
  outline: 2px dashed rgba(200, 90, 120, 0.55);
  outline-offset: 3px;
}

.einv-editor-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
}
.einv-editor-form input[type="text"],
.einv-editor-form input[type="tel"],
.einv-editor-form input[type="date"],
.einv-editor-form input[type="url"],
.einv-editor-form input[type="color"],
.einv-editor-form textarea,
.einv-editor-form select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}
.einv-editor-form textarea {
  min-height: 72px;
  resize: vertical;
}

/* Pastel section panels (wedding editor flow) */
.einv-edit-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.einv-edit-panel--blush {
  background: linear-gradient(180deg, #fff5f7 0%, #ffe8ee 100%);
}
.einv-edit-panel--mint {
  background: linear-gradient(180deg, #f0fdf9 0%, #e6faf3 100%);
}
.einv-edit-panel--aqua {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
}
.einv-edit-panel--lavender {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
}
.einv-edit-panel--peach {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
}
.einv-edit-panel--sky {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
}
.einv-edit-panel--cream {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}
.einv-edit-panel__title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(15, 23, 42, 0.08);
}
.einv-edit-panel .shop-hint {
  color: #475569;
}
.einv-edit-panel label {
  color: #334155;
}

.einv-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.einv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.25s ease;
}
.einv-modal-overlay.is-open {
  display: flex;
}
.einv-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  padding: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  animation: modalSlideUp 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (max-width: 768px) {
  .einv-modal {
    grid-template-columns: 1fr;
    max-height: 94vh;
    border-radius: 16px;
  }
}

.einv-breadcrumb {
  font-size: 0.85rem;
  color: var(--shop-text-muted);
  margin-bottom: 0.5rem;
}
.einv-breadcrumb a {
  color: var(--shop-primary);
  text-decoration: none;
}

/* Editor toolbar & repeaters */
.einv-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--shop-border);
}
.einv-repeater-row {
  position: relative;
  padding: 1rem 2rem 1rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #fff;
}
.einv-repeater-row .einv-row-remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.einv-gallery-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.einv-gallery-editor-item img {
  max-width: 120px;
  max-height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

/* Landing — category cards */
.einv-category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.einv-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--shop-radius-card);
  border: 1px solid var(--shop-border);
  background: var(--shop-card);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shop-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.einv-category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shop-shadow-card);
  border-color: rgba(31, 56, 100, 0.2);
}
.einv-category-card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.einv-category-card-name {
  font-weight: 700;
  color: var(--shop-primary);
  font-size: 1rem;
}
.einv-category-card-count {
  font-size: 0.85rem;
  color: var(--shop-text-muted);
  margin-top: 0.35rem;
}

/* Category page */
.einv-cat-hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 1rem;
  border-radius: var(--shop-radius-card);
  background: linear-gradient(135deg, rgba(31, 56, 100, 0.05) 0%, rgba(230, 81, 0, 0.05) 100%);
  border: 1px solid var(--shop-border);
}
.einv-cat-hero-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}
.einv-cat-event-block {
  margin-bottom: 2.5rem;
}
.einv-cat-event-title {
  font-size: 1.35rem;
  color: var(--shop-primary);
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--shop-border);
}
.einv-cat-template-grid {
  margin-top: 1rem;
}

/* Preview modal — iframe */
.einv-modal-wide {
  max-width: 980px;
  width: 96vw;
  grid-template-columns: 1fr 300px;
  gap: 0;
  padding: 0;
  position: relative;
}
.einv-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 10;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: rgba(15,10,30,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.einv-modal-close:hover { background: rgba(15,10,30,0.9); }
.einv-modal-preview-col {
  min-height: 480px;
  background: linear-gradient(160deg, #1a0a2e, #2d1a4e);
  border-radius: 18px 0 0 18px;
  overflow: hidden;
  position: relative;
}
.einv-modal-iframe {
  width: 100%;
  min-height: 480px;
  height: 75vh;
  max-height: 680px;
  border: 0;
  display: block;
  background: transparent;
}
.einv-modal-side {
  padding: 1.5rem 1.25rem 1.25rem;
  overflow: auto;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  border-radius: 0 18px 18px 0;
}
.einv-modal-side h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.einv-modal-side .shop-btn-primary {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
}
.einv-modal-side .shop-btn-outline {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 10px;
}
@media (max-width: 768px) {
  .einv-modal-wide {
    grid-template-columns: 1fr;
    max-height: 94vh;
    overflow: auto;
    border-radius: 16px;
  }
  .einv-modal-preview-col {
    border-radius: 16px 16px 0 0;
    min-height: 52vh;
  }
  .einv-modal-iframe {
    height: 58vh;
    max-height: none;
  }
  .einv-modal-side {
    max-height: none;
    border-radius: 0 0 16px 16px;
  }
}

/* ── Editor: one-click colour themes & gradient presets ───────────── */
.einv-theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.einv-theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border: 2px solid var(--shop-border);
  border-radius: 10px;
  background: var(--shop-card);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--shop-text);
  text-align: left;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.einv-theme-chip:hover {
  border-color: var(--shop-accent);
  box-shadow: 0 2px 8px rgba(31, 56, 100, 0.08);
}
.einv-theme-chip-swatches {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}
.einv-theme-chip-swatches i {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.einv-theme-chip-label {
  line-height: 1.25;
}
.einv-grad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.75rem;
}
.einv-grad-chip {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: #f8fafc;
  cursor: pointer;
  color: var(--shop-text);
}
.einv-grad-chip:hover {
  border-color: #7c3aed;
  color: #5b21b6;
  background: #f5f3ff;
}
.einv-cardbg-preview {
  margin-top: 0.65rem;
}
.einv-cardbg-preview img {
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  border: 1px solid var(--shop-border);
  object-fit: cover;
}

/* Wedding guest-card section order (editor drag list + live preview chunks) */
.einv-edit-panel--order-ui {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.einv-section-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.einv-section-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: default;
}
.einv-section-order-handle {
  cursor: grab;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b;
  user-select: none;
  padding: 2px 4px;
  flex-shrink: 0;
}
.einv-section-order-handle:active {
  cursor: grabbing;
}
.einv-section-order-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--shop-text, #1e293b);
}
.einv-section-order-ghost {
  opacity: 0.45;
}
.einv-section-order-chosen {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.einv-section-order-drag {
  opacity: 0.92;
}
.einv-orderable-root {
  display: flex;
  flex-direction: column;
}

/* Hub — single e-invitations landing (aligned with reference wedding HTML: maroon + gold) */
.einv-hub--va-premium .einv-hero {
  background: linear-gradient(155deg, #1c0505 0%, #5c1010 45%, #3a0a0a 100%);
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 18px 50px rgba(28, 5, 5, 0.25);
}
.einv-hub--va-premium .einv-hero::before {
  background-image: radial-gradient(circle at 25% 20%, rgba(201, 162, 39, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 78% 75%, rgba(139, 26, 26, 0.35) 0%, transparent 45%);
}
.einv-hub--va-premium .einv-hero h1 {
  color: #fdf8ee;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.einv-hub--va-premium .einv-hero p {
  color: rgba(253, 248, 238, 0.78);
}
.einv-hub--va-premium .einv-hero .shop-btn-primary {
  background: linear-gradient(135deg, #c9a227, #e8c060);
  color: #1c0505;
  border: none;
  font-weight: 700;
}
.einv-hub--va-premium .einv-category-card {
  border-color: rgba(92, 16, 16, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.einv-hub--va-premium .einv-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 12px 32px rgba(28, 5, 5, 0.12);
}

/* v19 — Animated cursive + wedding hero (rings SVG), no generic “home” feel */
@keyframes einv-script-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
    filter: brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.08);
  }
}
.einv-hero-script {
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-size: clamp(1.35rem, 3.8vw, 1.85rem);
  margin: 0 0 0.65rem;
  line-height: 1.35;
  background: linear-gradient(95deg, #f5e6b8, #fff8e7, #e8c060, #f5e6b8);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: einv-script-shimmer 5s ease-in-out infinite;
}
.einv-hub--va-premium .einv-hero-script {
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.einv-cat-hero--wedding {
  background: linear-gradient(160deg, rgba(92, 16, 16, 0.06) 0%, rgba(201, 162, 39, 0.08) 50%, rgba(31, 56, 100, 0.04) 100%);
  border-color: rgba(201, 162, 39, 0.35);
}
.einv-cat-hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.einv-svg-rings {
  color: #c9a227;
  filter: drop-shadow(0 2px 8px rgba(201, 162, 39, 0.35));
  animation: einv-rings-float 4s ease-in-out infinite;
}
@keyframes einv-rings-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.einv-cat-hero-florals {
  font-size: 1.15rem;
  letter-spacing: 0.35em;
  opacity: 0.92;
  animation: einv-floral-fade 3.5s ease-in-out infinite;
}
@keyframes einv-floral-fade {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}
.einv-cat-hero-script {
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  margin: 0 0 0.5rem;
  line-height: 1.4;
  background: linear-gradient(100deg, #5c1010, #c9a227, #5c1010, #e8c060);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: einv-script-shimmer 6s ease-in-out infinite;
}
.einv-tpl-kicker-script {
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  animation: einv-script-shimmer 7s ease-in-out infinite;
  background: linear-gradient(90deg, var(--shop-primary), var(--shop-accent, #c9a227), var(--shop-primary));
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
