/* =========================================================================
   COMPONENTS.CSS - Bloques y Componentes Reutilizables
   ========================================================================= */

/* ── Logo ── */
.logo { width: var(--logo-size-desktop); height:var(--logo-size-desktop); border-radius: var(--r-md); display: grid; place-items: center; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 640px) { .logo { width: var(--logo-size-tablet); height: var(--logo-size-tablet); } }
@media (max-width: 420px) { .logo { width: var(--logo-size-mobile); height: var(--logo-size-mobile); flex: 0 0 auto; } }

/* ── Hamburguesa ── */
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: var(--logo-size-desktop); height: var(--logo-size-desktop); background: transparent; border: none; cursor: pointer; z-index: 1100; }
.menu-toggle .bar { width: 100%; height: var(--r-md); background-color: var(--pure-white); border-radius: 2px; transition: all 0.3s ease; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .menu-toggle.active .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
  .menu-toggle.active .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ── Botones Reutilizables (.btn) y Especiales (.cta-button) ── */
.cta-button {
  border: none;
  background: linear-gradient(135deg, var(--brand-highlight) 0%, var(--brand-highlight-strong) 60%, var(--brand-highlight-soft) 100%);
  color: var(--pure-white); padding: var(--r-lg) var(--r-xxl); border-radius: var(--r-xl); font-weight: 700;
  font-size: var(--font-size-cta-button); letter-spacing: 0.01em; box-shadow: 0 12px 30px rgba(255, 119, 255, 0.35);
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.cta-button:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 119, 255, 0.4); }
.cta-button:active { transform: translateY(0); opacity: 0.92; }

@media (max-width: 820px) {
  .cta-button { padding: var(--r-md) var(--r-lg); box-shadow: 0 10px 24px rgba(255, 119, 255, 0.28); }
}
@media (max-width: 420px) {
  .cta-button { flex: 0 0 100%; width: 100%; margin-top: 8px; padding: var(--r-lg); text-align: center; }
}
@media (max-width: 400px) {
  .cta-button { font-size: 14px; padding: 8px 16px; }
}

/* Sistema genérico de botones (.btn) */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; border-radius: var(--r-sm); font-weight: 500; font-size: .95rem; transition: all var(--t-fast) var(--ease-out); position: relative; overflow: hidden; white-space: nowrap; }
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.06); opacity: 0; transition: opacity var(--t-fast); }
.btn:hover::after { opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }

.btn-primary { background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d)); color: #fff; box-shadow: var(--shadow-glow-sm), 0 4px 16px rgba(0,0,0,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow), 0 8px 24px rgba(0,0,0,.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--c-text-2); border: 1.5px solid var(--c-border-2); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-text); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--c-primary-h); border: 1.5px solid var(--c-primary); }
.btn-outline:hover { background: rgba(148,103,255,.1); transform: translateY(-2px); }
.btn-sm { padding: .5rem 1.1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1.1rem 2.5rem; font-size: 1.1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-arrow { transition: transform var(--t-fast); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ── Hero & Badges ── */
.hero { background: var(--pure-white); border-radius: 18px; padding: 32px; box-shadow: 0 10px 30px var(--shadow); display: grid; gap: 18px; }
.hero h1 { color: var(--brand-dark-purple); font-size: var(--font-size-hero-h1); line-height: 1.25; }
.hero p { color: #3a2d52; font-size: var(--font-size-hero-p); line-height: 1.6; }

.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-highlight-softer); color: var(--brand-header-text); padding: 8px var(--r-lg); border-radius: 999px; font-weight: 700; font-size: var(--font-size-badge); }

@media (max-width: 820px) { .hero { padding: 20px; } }
@media (max-width: 640px) {
  :root {
    --font-size-hero-h1: 26px;
  }
}

/* ── Tarjetas Tradicionales (.card) ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--base-beige); border-radius: 16px; padding: 16px; border: 1px solid var(--brand-very-light-purple); box-shadow: 0 8px 20px rgba(74, 0, 130, 0.06); }
.card h3 { color: var(--brand-header-text); margin-bottom: 8px; font-size: var(--font-size-card-h3); }
.card p { color: #3a2d52; line-height: 1.5; font-size: var(--font-size-card-p); }
@media (max-width: 420px) { .features { gap: var(--r-lg); } }

/* ── Seccion de Productos Avanzada ── */
.products-section { border-top: 1px solid var(--section-soft-neon-violet); }
.product-card-wrap { max-width: 960px; margin: 0 auto; }
.product-card {
  color: var(--section-midnight-violet); display: grid; grid-template-columns: 420px 1fr; gap: var(--space-xl);
  background: var(--c-surface); border: 1px solid var(--c-border-2); border-radius: var(--r-xl); padding: var(--space-xl);
  position: relative; overflow: hidden; box-shadow: var(--shadow-md), var(--shadow-glow-sm);
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
.product-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 50% at 0% 50%, rgba(148,103,255,.07) 0%, transparent 70%); pointer-events: none; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-glow); }

.product-launch-ribbon {
  position: absolute; top: 120px; right: -28px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem 3rem; transform: rotate(35deg); transform-origin: top right; box-shadow: 0 2px 12px rgba(0,0,0,.3); z-index: 2;
}

.product-image-col { display: flex; align-items: center; justify-content: center; }
.product-img-frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md), 0 0 32px rgba(148,103,255,.2); border: 1px solid var(--c-border-2); transition: transform var(--t-mid) var(--ease-out); width: 100%; max-width: 380px; }
.product-card:hover .product-img-frame { transform: scale(1.02); }
.product-img-frame img { width: 100%; height: auto; display: block; }

.product-info-col { display: flex; flex-direction: column; gap: var(--space-md); justify-content: center; }
.product-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.product-tag { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-pill); padding: .3rem .85rem; font-size: .78rem; color: var(--c-text-2); }
.product-title { font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1.2; margin: 0; color: #ffffff;}
.product-title em { display: block; font-size: .9em; color: var(--c-primary); }
.product-desc { color: var(--c-text-2); font-size: .95rem; line-height: 1.7; }
.product-highlights { display: flex; flex-direction: column; gap: .45rem; list-style: none; }
.product-highlights li { color: var(--c-text-2); font-size: .88rem; }
.product-highlights li::first-letter { color: var(--c-primary); }
.product-result { display: flex; align-items: flex-start; gap: .75rem; background: rgba(148,103,255,.08); border: 1px solid var(--c-border-2); border-radius: var(--r-md); padding: .85rem 1rem; }
.result-icon { font-size: 1.3rem; flex-shrink: 0; }
.product-result p { color: var(--c-text-2); font-size: .9rem; line-height: 1.5; margin: 0; }
.product-cta { align-self: flex-start; }
.product-cta-note { font-size: .75rem; color: var(--c-text-3); margin-top: .5rem; }

@media (max-width: 900px) {
  .product-card { grid-template-columns: 1fr; padding: var(--space-lg); gap: var(--space-lg); }
  .product-launch-ribbon { right: -24px; top: 120px; }
}
@media (max-width: 640px) { .product-launch-ribbon { right: -20px; top: 120px; } }

/* ── Formulario y Sección Newsletter ── */
.newsletter-section { background: linear-gradient(135deg, var(--c-bg-2) 0%, var(--c-bg-3) 100%); border-top: 1px solid var(--c-border); padding: var(--space-2xl) 0; }
.newsletter-card { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-xl); padding: var(--space-xl); box-shadow: 0 16px 48px rgba(0,0,0,.4), 0 0 48px rgba(148,103,255,.15); max-width: 1100px; margin: 0 auto; }
.newsletter-left { display: flex; flex-direction: column; justify-content: center; gap: var(--space-md); }
.newsletter-left h2 { font-size: 2rem; line-height: 1.2; color: var(--c-text); }
.newsletter-left h2 em { display: block; font-size: .9em; color: var(--c-primary); }
.newsletter-left > p { color: var(--c-text-2); font-size: 1.05rem; line-height: 1.6; }
.newsletter-benefits { display: flex; flex-direction: column; gap: .75rem; list-style: none; }
.newsletter-benefits li { color: var(--c-text-2); font-size: 1rem; display: flex; align-items: center; gap: .75rem; }
.newsletter-right { display: flex; flex-direction: column; justify-content: center; }

.newsletter-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label { font-weight: 600; font-size: 0.95rem; color: var(--c-text); }
.form-group input { padding: .85rem 1rem; border: 1.5px solid var(--c-border-2); border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-text); font-size: 1rem; font-family: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.form-group input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(148,103,255,.15); }
.form-group input.field-error-state { border-color: var(--c-error); background: rgba(248,113,113,.05); }
.field-error { font-size: 0.85rem; color: var(--c-error); display: none; min-height: 1.2rem; }
.form-legal { font-size: 0.8rem; color: var(--c-text-3); text-align: center; }
.form-success { text-align: center; padding: var(--space-lg); }
.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.form-success h3 { color: var(--c-text); font-size: 1.5rem; margin-bottom: 0.5rem; }
.form-success p { color: var(--c-text-2); font-size: 1rem; }

@media (max-width: 900px) {
  .newsletter-card { grid-template-columns: 1fr; gap: var(--space-lg); padding: var(--space-lg); }
  .newsletter-left h2 { font-size: 1.75rem; }
  .newsletter-left > p { font-size: 1rem; }
}
@media (max-width: 640px) {
  .newsletter-card { padding: var(--space-md); border-radius: var(--r-lg); }
  .newsletter-left h2 { font-size: 1.5rem; }
  .newsletter-left p { font-size: 0.95rem; }
  .newsletter-form { gap: 1rem; }
}

/* ── Modales e Iframes ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1500; }
.modal-backdrop.active { display: flex; }
.modal { background: var(--pure-white); width: min(900px, 100%); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.modal-header { padding: 16px 18px; background: var(--brand-header-text); color: var(--pure-white); display: flex; align-items: center; justify-content: space-between; gap: var(--r-lg); }
.modal-header h2 { font-size: var(--font-size-modal-header-h2); font-weight: 700; }
.close-button { background: transparent; border: none; color: var(--pure-white); font-size: var(--font-size-close-button); cursor: pointer; line-height: 1; }
.modal-body { background: var(--base-beige); padding: 0; min-height: 540px; }
.modal iframe { width: 100%; height: 100%; border: none; display: block; }

@media (max-width: 820px) {
  .modal { width: min(900px, 100%); margin: 0 8px; }
  .modal-body { min-height: 60vh; }
}
@media (max-width: 420px) {
  .modal-body { min-height: 50vh; }
  .modal iframe { height: 50vh; }
}

/* ── Elementos sueltos del footer ── */
.footer-note { text-align: center; color: #3a2d52; font-weight: 600; }
.sociales-label { text-align: center; color: #3a2d52; font-weight: 600; margin-bottom: 16px; font-size: var(--font-size-footer-note); }
.redes-sociales { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.redes-sociales a { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; transition: transform 0.15s ease; }
.redes-sociales a:hover { transform: translateY(-2px); }
.redes-sociales img { width: 32px; height: 32px; display: block; }

@media (max-width: 820px) {
  .redes-sociales a { width: 48px; height: 48px; border-radius: var(--r-lg); }
  .redes-sociales img { width: 28px; height: 28px; }
}
@media (max-width: 640px) {
  .redes-sociales { gap: var(--r-lg); }
  .redes-sociales a { width: 48px; height: 48px; }
  .redes-sociales img { width: 28px; height: 28px; }
}