/* ═══════════════════════════════════════════════════════════════════
   Detallux — Marketing (Ruleta de descuentos + Pop-ups)
   ═══════════════════════════════════════════════════════════════════ */

/* ── RULETA ── */
.dlx-wheel-tab {
  position: fixed; left: 14px; bottom: 18px; z-index: 240;
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 16px; border: none;
  border-radius: var(--rounded-full); background: linear-gradient(135deg, var(--color-accent), #c8902f);
  color: var(--color-on-accent); font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(var(--color-accent-rgb), .45); animation: dlxPulse 2.4s ease-in-out infinite;
}
.dlx-wheel-tab i { font-size: 15px; }
.dlx-wheel-tab:hover { filter: brightness(1.05); }

.dlx-wheel-overlay { position: fixed; inset: 0; background: rgba(var(--color-secondary-rgb), .65); backdrop-filter: blur(3px); z-index: 341; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.dlx-wheel-overlay.is-open { opacity: 1; visibility: visible; }
.dlx-wheel-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.96); z-index: 342;
  width: min(420px, calc(100vw - 28px)); max-height: 94vh; overflow-y: auto;
  background: var(--color-surface); border-radius: var(--rounded-2xl); box-shadow: var(--shadow-xl);
  padding: var(--space-6) var(--space-5); text-align: center; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s, transform .3s;
}
.dlx-wheel-modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.dlx-wheel-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--color-bg); color: var(--color-text-secondary); display: flex; align-items: center; justify-content: center; }
.dlx-wheel-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 900; margin: 0 0 6px; }
.dlx-wheel-sub { color: var(--color-text-secondary); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.dlx-wheel-stage { position: relative; width: min(300px, 78vw); height: min(300px, 78vw); margin: 0 auto var(--space-4); }
.dlx-wheel-spinner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px var(--color-surface), 0 0 0 10px rgba(var(--color-primary-rgb), .25), var(--shadow-lg); transform: rotate(0deg); }
.dlx-wheel-svg { width: 100%; height: 100%; display: block; }
.dlx-wheel-pointer { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 24px solid var(--color-accent); z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.dlx-wheel-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; color: var(--color-primary); font-size: 18px; z-index: 2; }
.dlx-wheel-email { width: 100%; height: 46px; border: 1.5px solid var(--color-border); border-radius: var(--rounded-lg); padding: 0 var(--space-4); font-size: 16px; margin-bottom: var(--space-3); outline: none; }
.dlx-wheel-email:focus { border-color: var(--color-primary); box-shadow: var(--ring-primary); }
.dlx-wheel-spin { width: 100%; height: 50px; border: none; border-radius: var(--rounded-lg); background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; font-weight: 800; font-size: var(--text-base); cursor: pointer; box-shadow: var(--shadow-primary); }
.dlx-wheel-spin:disabled { opacity: .7; cursor: default; }
.dlx-wheel-err { color: var(--color-danger); font-size: var(--text-xs); margin: 8px 0 0; min-height: 14px; }
.dlx-wheel-result { margin-top: var(--space-3); }
.dlx-wheel-win__msg { font-weight: 700; margin-bottom: var(--space-3); }
.dlx-wheel-code { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: var(--space-3); }
.dlx-wheel-code span { font-family: monospace; font-size: var(--text-lg); font-weight: 900; letter-spacing: 1px; background: var(--tint-primary); color: var(--color-primary); padding: 8px 14px; border-radius: var(--rounded); border: 1.5px dashed var(--color-primary); }
.dlx-wheel-copy { width: 40px; height: 40px; border-radius: var(--rounded); background: var(--color-primary); color: #fff; }
.dlx-wheel-use { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--rounded-full); background: linear-gradient(135deg, var(--color-success), var(--color-success-dark)); color: #fff; font-weight: 800; text-decoration: none; }
.dlx-wheel-lose { color: var(--color-text-secondary); font-weight: 600; }
@media (max-width: 600px) {
  .dlx-wheel-tab span { display: none; }
  .dlx-wheel-tab { left: 12px; bottom: calc(var(--bottom-nav-height, 64px) + 76px); padding: 13px; }
  .dlx-wheel-modal { width: calc(100vw - 22px); padding: var(--space-5) var(--space-4); }
}

/* ── POP-UPS ── */
.dlx-pop-overlay { position: fixed; inset: 0; background: rgba(var(--color-secondary-rgb), .6); backdrop-filter: blur(2px); z-index: 343; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.dlx-pop-overlay.is-open { opacity: 1; visibility: visible; }
.dlx-pop {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.96); z-index: 344;
  width: min(460px, calc(100vw - 28px)); max-height: 92vh; overflow: hidden;
  background: var(--color-surface); border-radius: var(--rounded-2xl); box-shadow: var(--shadow-xl);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, transform .3s; display: flex; flex-direction: column;
}
.dlx-pop.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.dlx-pop__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--color-text); display: flex; align-items: center; justify-content: center; }
.dlx-pop__media { width: 100%; aspect-ratio: 16/7; background: center/cover no-repeat var(--color-bg); }
.dlx-pop__body { padding: var(--space-6) var(--space-5); text-align: center; }
.dlx-pop__eyebrow { display: inline-block; font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--color-primary); background: var(--tint-primary); padding: 4px 12px; border-radius: var(--rounded-full); margin-bottom: var(--space-3); }
.dlx-pop__title { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 900; margin: 0 0 var(--space-2); line-height: 1.15; }
.dlx-pop__text { color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; margin: 0 0 var(--space-4); }
.dlx-pop__form { display: flex; gap: 8px; }
.dlx-pop__form input { flex: 1; height: 48px; border: 1.5px solid var(--color-border); border-radius: var(--rounded-lg); padding: 0 var(--space-4); font-size: 16px; outline: none; }
.dlx-pop__form input:focus { border-color: var(--color-primary); box-shadow: var(--ring-primary); }
.dlx-pop__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 var(--space-5); border: none; border-radius: var(--rounded-lg); background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; font-weight: 800; font-size: var(--text-sm); cursor: pointer; text-decoration: none; white-space: nowrap; }
.dlx-pop__cta--block { width: 100%; }
.dlx-pop__coupon { margin-top: var(--space-3); font-family: monospace; font-weight: 900; font-size: var(--text-lg); letter-spacing: 1px; color: var(--color-primary); background: var(--tint-primary); border: 1.5px dashed var(--color-primary); border-radius: var(--rounded); padding: 8px 14px; display: none; }
.dlx-pop__msg { font-size: var(--text-xs); margin-top: 8px; min-height: 14px; }
.dlx-pop__dismiss { display: block; margin: var(--space-3) auto 0; background: none; border: none; color: var(--color-text-muted); font-size: var(--text-xs); cursor: pointer; text-decoration: underline; }
@media (max-width: 600px) {
  .dlx-pop { width: calc(100vw - 20px); }
  .dlx-pop__form { flex-direction: column; }
  .dlx-pop__title { font-size: var(--text-xl); }
}
