/* Shared CSS for all Wedding Customizers */
:root {
  --gold: #d4af37;
  --gold-light: #e8c96a;
  --bg: #0c0c0c;
  --surface: #181818;
  --surface2: #232323;
  --text: #f0ebe3;
  --muted: #a89f94;
  --border: #3d3830;
  --border-soft: #2a2824;
  --radius: 14px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 999;
  background: #080808;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,.7);
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: #fff;
}
.back-link {
  color: var(--gold); font-size: .9rem; font-weight: 500; transition: color .2s;
}
.back-link:hover { color: #fff; }

/* Title */
.page-title { text-align: center; padding: 24px 16px 0; }
.page-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 400; color: #fff;
}
.page-title h1 em { color: var(--gold); font-style: italic; }
.page-title p { color: var(--muted); font-size: .88rem; margin-top: 6px; }

/* Layout */
.customizer {
  display: grid; grid-template-columns: 390px 1fr; gap: 32px;
  max-width: 1240px; margin: 24px auto 0; padding: 0 28px 60px;
  align-items: start;
}

/* Preview Phone */
.preview-wrapper { position: sticky; top: 80px; }
.preview-label {
  font-size: .72rem; font-weight: 600; color: var(--gold);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.live-dot {
  width: 7px; height: 7px; background: #4ade80; border-radius: 50%;
  animation: livePulse 1.5s ease infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}
.phone-shell {
  width: 100%; background: linear-gradient(160deg, #2a2a2a, #111);
  border-radius: 40px; padding: 14px 8px 20px;
  box-shadow: 0 0 0 2px #444, 0 0 0 5px #111, 0 28px 60px rgba(0,0,0,.8), 0 0 0 1px rgba(212,175,55,.1);
}
.phone-notch {
  width: 56px; height: 12px; background: #111;
  border-radius: 0 0 10px 10px; margin: 0 auto 10px; display: block;
}
.template-iframe {
  width: 100%; aspect-ratio: 9/16; border: none;
  border-radius: 28px; display: block; background: #120e1c; overflow: hidden;
}
.preview-actions { text-align: center; margin-top: 12px; }
.preview-actions a {
  color: var(--gold); font-size: .8rem;
  border-bottom: 1px dashed rgba(212,175,55,.4); transition: color .2s;
}
.preview-actions a:hover { color: #fff; }

/* Form Panel */
.form-panel {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--border-soft);
  box-shadow: 0 4px 32px rgba(0,0,0,.45);
}
.form-panel-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: #fff; margin-bottom: 4px;
}
.form-panel-title em { color: var(--gold); font-style: italic; }
.form-subtitle { color: var(--muted); font-size: .86rem; margin-bottom: 28px; line-height: 1.6; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .78rem; font-weight: 600; color: var(--gold);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px;
}
.form-input {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text); padding: 12px 15px; border-radius: 11px;
  font-family: var(--font-body); font-size: .92rem;
  transition: border-color .3s, box-shadow .3s; outline: none;
}
.form-input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.14);
}
.form-input::placeholder { color: rgba(168,159,148,.4); }
textarea.form-input { resize: vertical; min-height: 82px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 24px 0;
}
.form-section-title {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--gold);
  font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 7px;
}

/* Events & Schedule Customization */
.events-custom-container { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.event-custom-card {
  background: var(--surface2); border: 1.5px solid var(--border-soft);
  border-radius: 12px; padding: 12px 14px; transition: all .2s;
}
.event-custom-card.active { border-color: var(--gold); background: rgba(212,175,55,.04); }
.event-card-header { display: flex; align-items: center; justify-content: space-between; }
.event-check-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
}
.event-check-item input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0;
}
.event-check-item label {
  color: var(--text); font-size: .9rem; font-weight: 600; text-transform: none;
  letter-spacing: 0; margin: 0; cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.event-card-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.event-card-body .form-row { margin-bottom: 0; gap: 10px; }
.event-card-body label { font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; display: block; }
.event-card-body .form-input { font-size: 0.82rem; padding: 8px 10px; }

/* Music Toggle */
.music-toggle-section {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2); border: 1.5px solid var(--border-soft);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 6px;
}
.music-toggle-info { display: flex; align-items: center; gap: 10px; }
.music-toggle-info .music-emoji { font-size: 1.6rem; }
.music-toggle-info span { font-size: .9rem; font-weight: 500; color: var(--text); }
.music-toggle-info small { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.music-switch {
  position: relative; width: 52px; height: 28px; background: #333;
  border-radius: 14px; cursor: pointer; transition: background .3s; border: none; outline: none;
}
.music-switch.on { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.music-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%; transition: transform .3s; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.music-switch.on::after { transform: translateX(24px); }

/* Photo Upload Grid */
.photo-upload-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-bottom: 16px;
}
.photo-upload-slot {
  background: var(--surface2); border: 1.5px dashed var(--border);
  border-radius: 12px; padding: 16px; text-align: center; cursor: pointer;
  transition: all .2s; position: relative; overflow: hidden; aspect-ratio: 4/5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.photo-upload-slot:hover { border-color: var(--gold); background: rgba(212,175,55,.05); }
.photo-upload-slot.has-image { border-style: solid; padding: 4px; background: rgba(0,0,0,0.4); }
.photo-upload-icon { font-size: 1.8rem; margin-bottom: 8px; opacity: 0.6; }
.photo-upload-label { font-size: .75rem; color: var(--text); font-weight: 600; }
.photo-upload-hint { font-size: .65rem; color: var(--muted); margin-top: 4px; }
.photo-upload-input { display: none; }
.photo-preview { width: 100%; height: 100%; object-fit: contain; }
.photo-remove {
  position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6);
  color: #fff; width: 24px; height: 24px; border-radius: 50%; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; opacity: 0; transition: opacity .2s;
}
.photo-upload-slot:hover .photo-remove { opacity: 1; }

/* Book Button */
.btn-book-final {
  display: block; width: 100%; background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000; padding: 15px 32px; border: none; border-radius: 30px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all .3s; text-align: center; box-shadow: 0 4px 20px rgba(212,175,55,.35); margin-top: 6px;
}
.btn-book-final:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(212,175,55,.5); }
.price-note { text-align: center; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.price-note strong { color: var(--gold); }

/* Responsive */
@media(max-width: 980px) {
  .customizer { grid-template-columns: 1fr; gap: 22px; padding: 0 14px 48px; }
  .preview-wrapper { position: relative; top: 0; max-width: 320px; margin: 0 auto; }
  .header { padding: 12px 16px; }
}
@media(max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
  .events-check-grid { grid-template-columns: 1fr; }
  .form-panel { padding: 18px; }
  .photo-upload-grid { grid-template-columns: repeat(2, 1fr); }
}
