/* Everwish — Global Child Theme Styles */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --ew-c-cream:   #FAF7F2;
  --ew-c-white:   #FFFFFF;
  --ew-c-ink:     #1C1C1C;
  --ew-c-muted:   #6B6B6B;
  --ew-c-gold:    #C9A96E;
  --ew-c-gold-lt: #E8D5B0;
  --ew-c-rose:    #D4A0A0;
  --ew-c-border:  rgba(201,169,110,.25);
  --ew-r:         12px;
  --ew-r-lg:      20px;
  --ew-shadow:    0 4px 24px rgba(0,0,0,.08);
  --ew-shadow-lg: 0 12px 48px rgba(0,0,0,.13);
  --ew-trans:     .3s ease;
  --ew-font-ui:   'Jost', sans-serif;
}

/* ── Reset extras ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ew-c-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Global body ─────────────────────────────────────────── */
body {
  font-family: var(--ew-font-ui);
  background: var(--ew-c-cream);
  color: var(--ew-c-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ─────────────────────────────────────────────── */
.ew-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ew-container {
  width: 100%; max-width: 1160px;
  margin-inline: auto; padding-inline: 24px;
}
.ew-container--sm { max-width: 760px; }
.ew-container--lg { max-width: 1360px; }
.ew-text-center { text-align: center; }
.ew-mt-0  { margin-top: 0 !important; }
.ew-mt-sm { margin-top: 12px !important; }
.ew-mt-md { margin-top: 24px !important; }
.ew-mt-lg { margin-top: 48px !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.ew-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  font-family: var(--ew-font-ui); font-size: .925rem; font-weight: 600;
  letter-spacing: .04em; cursor: pointer;
  transition: transform var(--ew-trans), box-shadow var(--ew-trans), background var(--ew-trans);
  border: none; text-decoration: none !important;
}
.ew-btn:hover { transform: translateY(-2px); box-shadow: var(--ew-shadow-lg); }
.ew-btn:active { transform: translateY(0); }

.ew-btn--primary {
  background: var(--ew-c-gold);
  color: #fff;
}
.ew-btn--primary:hover { background: #b8935a; }

.ew-btn--outline {
  background: transparent;
  border: 1.5px solid var(--ew-c-gold);
  color: var(--ew-c-gold);
}
.ew-btn--outline:hover { background: var(--ew-c-gold); color: #fff; }

.ew-btn--ghost {
  background: transparent;
  color: var(--ew-c-ink);
}
.ew-btn--ghost:hover { color: var(--ew-c-gold); }

.ew-btn--lg { padding: 18px 44px; font-size: 1rem; }
.ew-btn--sm { padding: 10px 22px; font-size: .85rem; }

.ew-btn.ew-loading {
  pointer-events: none; opacity: .7;
}
.ew-btn.ew-loading::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: ew-spin .6s linear infinite;
}
@keyframes ew-spin { to { transform: rotate(360deg); } }

/* ── Section headings ────────────────────────────────────── */
.ew-section-title {
  font-family: var(--ew-font-ui);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600; color: var(--ew-c-ink);
  line-height: 1.2; margin: 0 0 12px;
}
.ew-section-subtitle {
  font-size: 1.05rem; color: var(--ew-c-muted);
  max-width: 560px; margin-inline: auto;
}
.ew-section-divider {
  width: 48px; height: 2px;
  background: var(--ew-c-gold);
  margin: 16px auto 32px;
  border: none;
}

/* ── Cards ───────────────────────────────────────────────── */
.ew-card {
  background: var(--ew-c-white);
  border-radius: var(--ew-r-lg);
  box-shadow: var(--ew-shadow);
  overflow: hidden;
  transition: transform var(--ew-trans), box-shadow var(--ew-trans);
}
.ew-card:hover { transform: translateY(-4px); box-shadow: var(--ew-shadow-lg); }
.ew-card__body { padding: 28px; }

/* ── Forms ───────────────────────────────────────────────── */
.ew-field { margin-bottom: 20px; }
.ew-label {
  display: block; margin-bottom: 6px;
  font-size: .875rem; font-weight: 600; color: var(--ew-c-ink);
}
.ew-input,
.ew-select,
.ew-textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--ew-c-border);
  border-radius: var(--ew-r); background: var(--ew-c-white);
  font-family: var(--ew-font-ui); font-size: .95rem; color: var(--ew-c-ink);
  transition: border-color var(--ew-trans), box-shadow var(--ew-trans);
  outline: none;
}
.ew-input:focus,
.ew-select:focus,
.ew-textarea:focus {
  border-color: var(--ew-c-gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}
.ew-textarea { resize: vertical; min-height: 100px; }

/* ── Notices ─────────────────────────────────────────────── */
.ew-notice {
  padding: 14px 20px; border-radius: var(--ew-r);
  font-size: .9rem; margin-bottom: 16px;
}
.ew-notice--success { background: #F0FBF4; color: #1A6933; border-left: 3px solid #3BB560; }
.ew-notice--error   { background: #FEF2F2; color: #991B1B; border-left: 3px solid #EF4444; }
.ew-notice--info    { background: #EFF6FF; color: #1E40AF; border-left: 3px solid #3B82F6; }

/* ── Tags / Badges ───────────────────────────────────────── */
.ew-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 50px; font-size: .75rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.ew-badge--gold { background: var(--ew-c-gold-lt); color: #7A5C2E; }
.ew-badge--rose { background: #F8ECEC; color: #8B3A3A; }
.ew-badge--dark { background: var(--ew-c-ink); color: #fff; }

/* ── Nav ─────────────────────────────────────────────────── */
.ew-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 72px;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ew-c-border);
  transition: background var(--ew-trans);
}
.ew-nav.ew-nav--scrolled { background: rgba(250,247,242,.98); }
.ew-nav__logo {
  font-size: 1.35rem; font-weight: 700;
  color: var(--ew-c-ink); letter-spacing: .02em;
}
.ew-nav__logo span { color: var(--ew-c-gold); }
.ew-nav__links {
  display: flex; gap: 32px; list-style: none; margin: 0; padding: 0;
}
.ew-nav__links a {
  font-size: .9rem; font-weight: 500; color: var(--ew-c-ink);
  transition: color var(--ew-trans);
}
.ew-nav__links a:hover,
.ew-nav__links a.ew-nav-active { color: var(--ew-c-gold); text-decoration: none; }
.ew-nav__links a.ew-nav-active { font-weight: 600; }
.ew-nav__cta { display: flex; gap: 12px; align-items: center; }
.ew-nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.ew-nav__hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--ew-c-ink); border-radius: 2px;
  transition: transform var(--ew-trans), opacity var(--ew-trans);
}
.ew-nav--open .ew-nav__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ew-nav--open .ew-nav__hamburger span:nth-child(2) { opacity: 0; }
.ew-nav--open .ew-nav__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Footer ──────────────────────────────────────────────── */
.ew-footer {
  background: var(--ew-c-ink);
  color: rgba(255,255,255,.7);
  padding: 64px 0 32px;
}
.ew-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.ew-footer__brand p { font-size: .9rem; line-height: 1.7; margin-top: 12px; }
.ew-footer__col h5 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ew-c-gold); margin-bottom: 16px; font-weight: 700;
}
.ew-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ew-footer__col a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color var(--ew-trans); }
.ew-footer__col a:hover { color: var(--ew-c-gold); text-decoration: none; }
.ew-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem;
}
.ew-footer__logo { font-size: 1.4rem; font-weight: 700; color: #fff; }
.ew-footer__logo span { color: var(--ew-c-gold); }
.ew-footer__social { display: flex; gap: 16px; }
.ew-footer__social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.65); font-size: .85rem;
  transition: border-color var(--ew-trans), color var(--ew-trans);
}
.ew-footer__social a:hover { border-color: var(--ew-c-gold); color: var(--ew-c-gold); text-decoration: none; }

/* ── Mobile Nav + Footer ─────────────────────────────────── */
@media (max-width: 768px) {
  .ew-nav { padding: 0 20px; }
  .ew-nav__hamburger { display: flex; }
  .ew-nav__links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ew-c-cream);
    border-bottom: 1px solid var(--ew-c-border);
    display: none;
  }
  .ew-nav--open .ew-nav__links { display: flex; }
  .ew-nav__links li a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--ew-c-border); }
  .ew-nav__cta .ew-btn { display: none; }
  .ew-nav__cta .ew-btn:last-child { display: inline-flex; }

  .ew-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ew-footer__brand { grid-column: 1 / -1; }
  .ew-footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 480px) {
  .ew-footer__grid { grid-template-columns: 1fr; }
}

/* ── Dashboard global ────────────────────────────────────── */
body.ew-page-dashboard,
body.ew-page-mi-invitacion,
body.ew-page-invitados {
  background: #F5F2ED;
  padding-top: 0;
}
body.ew-page-dashboard .site-header,
body.ew-page-mi-invitacion .site-header,
body.ew-page-invitados .site-header { display: none; }

/* ── Scroll top ──────────────────────────────────────────── */
.ew-scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ew-c-gold); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--ew-trans), transform var(--ew-trans);
  box-shadow: var(--ew-shadow);
}
.ew-scroll-top.ew-visible { opacity: 1; pointer-events: auto; }
.ew-scroll-top:hover { transform: translateY(-3px); }

/* ── WooCommerce overrides ───────────────────────────────── */
.woocommerce .button,
.woocommerce button.button {
  background: var(--ew-c-gold) !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-family: var(--ew-font-ui) !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  transition: background var(--ew-trans) !important;
}
.woocommerce .button:hover,
.woocommerce button.button:hover { background: #b8935a !important; }
