/* ═══════════════════════════════════════════════
   PREMIUM UX — Carwash App Enhancement Layer
   Minimal · Professional · App-like
   ═══════════════════════════════════════════════ */

/* ── Global UX Upgrades ── */
html {
  scroll-behavior: smooth;
}

/* Smooth section reveal on scroll */
.cw-hero,
.cw-stats,
.cw-trust,
.cw-memberships,
#productos,
#carrito {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   HERO — Tighter, more focused
   ═══════════════════════════════════════════════ */
.cw-hero {
  min-height: clamp(280px, 48vh, 460px);
}

.cw-hero__content {
  padding: 36px 20px 32px;
}

.cw-hero__sub {
  margin-bottom: 24px;
  font-size: clamp(0.88rem, 2vw, 1.1rem);
}

/* Hero CTA glow effect */
.cw-hero__cta--primary {
  position: relative;
  overflow: hidden;
}

.cw-hero__cta--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255,255,255,0.15) 50%,
    transparent 70%
  );
  animation: cta-shine 3s ease-in-out infinite;
}

@keyframes cta-shine {
  0%   { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* ═══════════════════════════════════════════════
   FAB CTA — Premium Upgrade
   ═══════════════════════════════════════════════ */
.cw-fab {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  right: 16px;
  height: 52px;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 0 22px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #0d9488, #0891b2) !important;
  box-shadow:
    0 8px 32px rgba(8, 145, 178, 0.35),
    0 2px 8px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  z-index: 900;
}

.cw-fab:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow:
    0 12px 40px rgba(8, 145, 178, 0.45),
    0 4px 12px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.cw-fab:active {
  transform: translateY(-1px) scale(0.98) !important;
}

.cw-fab .cart-fab__label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cw-fab .cart-fab__total {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.95;
  border-left: 1px solid rgba(255,255,255,0.3);
  padding-left: 10px;
}

/* FAB entrance with bounce */
@keyframes fab-entrance {
  0%   { opacity: 0; transform: translateY(24px) scale(0.8); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cw-fab:not([hidden]) {
  animation: fab-entrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Pulse ring on new item */
@keyframes fab-attention-ring {
  0%   { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(8, 145, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}

.cart-fab--new-item {
  animation:
    fab-entrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    fab-attention-ring 1s ease-out 0.3s !important;
}

/* ═══════════════════════════════════════════════
   CART SECTION — Premium Card Feel
   ═══════════════════════════════════════════════ */
.cart-card {
  border-radius: 20px !important;
  border: 1px solid rgba(14, 165, 233, 0.12) !important;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.06),
    0 1px 4px rgba(0,0,0,0.04) !important;
  overflow: hidden;
}

.cart-title {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

/* Checkout CTA button enhancement */
#btn-iniciar-pago {
  background: linear-gradient(135deg, #0d9488, #0891b2) !important;
  border-radius: 14px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 14px 24px !important;
  letter-spacing: 0.01em;
  min-height: 52px !important;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 6px 20px rgba(8, 145, 178, 0.35),
    0 2px 6px rgba(0,0,0,0.08) !important;
  transition: all 0.25s ease !important;
}

#btn-iniciar-pago:not(:disabled):hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 10px 28px rgba(8, 145, 178, 0.45),
    0 4px 10px rgba(0,0,0,0.1) !important;
}

#btn-iniciar-pago:not(:disabled):active {
  transform: translateY(0) !important;
}

/* ═══════════════════════════════════════════════
   MEMBERSHIPS SECTION
   ═══════════════════════════════════════════════ */
.cw-memberships {
  padding: 48px 16px 56px;
  background: linear-gradient(180deg, #f8fafc 0%, #f0fdfa 100%);
  border-top: 1px solid #e2e8f0;
}

.cw-memberships__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cw-memberships__header {
  text-align: center;
  margin-bottom: 36px;
}

.cw-memberships__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(8, 145, 178, 0.08);
  color: #0891b2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.cw-memberships__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cw-memberships__subtitle {
  color: #64748b;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  margin: 0;
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.5;
}

/* Membership cards grid */
.cw-memberships__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Individual plan card */
.cw-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  transition: all 0.3s ease;
  overflow: hidden;
}

.cw-plan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #94a3b8;
}

.cw-plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* Featured plan highlight */
.cw-plan--featured {
  border-color: #0891b2;
  box-shadow: 0 8px 32px rgba(8, 145, 178, 0.12);
}

.cw-plan--featured::before {
  background: linear-gradient(90deg, #0891b2, #06b6d4);
  height: 4px;
}

.cw-plan--premium {
  border-color: #f59e0b;
}

.cw-plan--premium::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Plan badge */
.cw-plan__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cw-plan--featured .cw-plan__badge {
  background: rgba(8, 145, 178, 0.08);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.cw-plan--premium .cw-plan__badge {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Plan header */
.cw-plan__icon {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}

.cw-plan__name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.cw-plan__desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 16px;
}

/* Pricing */
.cw-plan__pricing {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}

.cw-plan__price {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cw-plan__period {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.cw-plan__savings {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: -12px;
  margin-bottom: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Features list */
.cw-plan__features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
}

.cw-plan__feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.4;
}

.cw-plan__feature-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  font-size: 0.65rem;
  font-weight: 800;
  margin-top: 1px;
}

/* Plan CTA button */
.cw-plan__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: auto;
}

.cw-plan__cta:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.cw-plan--featured .cw-plan__cta {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.cw-plan--featured .cw-plan__cta:hover {
  box-shadow: 0 6px 24px rgba(8, 145, 178, 0.4);
  transform: translateY(-2px);
}

.cw-plan--premium .cw-plan__cta {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.cw-plan--premium .cw-plan__cta:hover {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

/* ── Consent Checkbox Row ── */
.cw-plan__consent {
  margin-top: 12px;
}

.cw-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
}

.cw-consent-chk {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: #0891b2;
  cursor: pointer;
}

.cw-consent-link {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cw-consent-link:hover {
  color: #0369a1;
}

/* CTA disabled state — checkbox not yet checked */
.cw-plan__cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}



/* ── Memberships Responsive ── */
@media (max-width: 900px) {
  .cw-memberships__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 440px;
    margin-inline: auto;
  }

  .cw-plan {
    padding: 24px 20px 20px;
  }

  /* Feature plan first on mobile */
  .cw-plan--featured {
    order: -1;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .cw-memberships__grid {
    gap: 14px;
  }

  .cw-plan {
    padding: 24px 18px 22px;
  }

  .cw-plan__name {
    font-size: 1.1rem;
  }

  .cw-plan__price {
    font-size: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════
   SECTION DIVIDERS — Cleaner separation
   ═══════════════════════════════════════════════ */
.cw-trust {
  border-bottom: none;
  padding: 18px 16px;
}

/* ═══════════════════════════════════════════════
   CATALOG — Refined cards
   ═══════════════════════════════════════════════ */
#productos {
  border-radius: 20px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
}

/* ═══════════════════════════════════════════════
   ORDER STATUS CTA — Premium feel
   ═══════════════════════════════════════════════ */
.order-status-card__cta {
  border-radius: 14px !important;
  min-height: 52px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════
   CHECKOUT FORM — Streamlined
   ═══════════════════════════════════════════════ */
.checkout-stepper {
  margin-bottom: 20px !important;
}

.order-form .form-section-label {
  font-size: 0.7rem !important;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   FOOTER — Minimal
   ═══════════════════════════════════════════════ */
.site-footer {
  background: #f8fafc !important;
  border-top: 1px solid #f1f5f9 !important;
  padding: 32px 0 24px !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE POLISH
   ═══════════════════════════════════════════════ */

/* Mobile (≤480px) */
@media (max-width: 480px) {
  .cw-hero {
    min-height: 260px;
  }

  .cw-hero__content {
    padding: 28px 16px 24px;
  }

  .cw-hero__title {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }

  .cw-hero__sub {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .cw-hero__cta {
    padding: 12px 22px;
    font-size: 0.88rem;
  }

  .cw-memberships {
    padding: 32px 12px 40px;
  }

  .cw-memberships__title {
    font-size: 1.4rem;
  }

  .cw-fab {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px;
    height: 48px;
    padding: 0 16px !important;
    border-radius: 14px !important;
  }

  .cw-fab .cart-fab__label {
    font-size: 0.82rem;
  }

  .cw-fab .cart-fab__total {
    font-size: 0.78rem;
  }

  .cart-card {
    border-radius: 16px !important;
    padding: 14px !important;
  }

  #btn-iniciar-pago {
    min-height: 48px !important;
    font-size: 0.92rem !important;
    border-radius: 12px !important;
  }
}

/* Tablet (481–900px) */
@media (min-width: 481px) and (max-width: 900px) {
  .cw-hero {
    min-height: clamp(300px, 45vh, 420px);
  }

  .cw-memberships {
    padding: 40px 16px 48px;
  }

  .cw-fab {
    height: 50px;
    padding: 0 20px !important;
  }
}

/* Desktop (≥901px) */
@media (min-width: 901px) {
  .cw-fab {
    display: none !important;
  }

  .cw-memberships {
    padding: 56px 24px 64px;
  }
}

/* ═══════════════════════════════════════════════
   MICRO-ANIMATIONS — Stagger reveals
   ═══════════════════════════════════════════════ */
.cw-plan {
  opacity: 0;
  animation: plan-reveal 0.5s ease-out forwards;
}

.cw-plan:nth-child(1) { animation-delay: 0.1s; }
.cw-plan:nth-child(2) { animation-delay: 0.2s; }
.cw-plan:nth-child(3) { animation-delay: 0.3s; }

@keyframes plan-reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Trust badges entrance */
.cw-trust__badge {
  opacity: 0;
  animation: badge-slide 0.4s ease-out forwards;
}

.cw-trust__badge:nth-child(1) { animation-delay: 0.05s; }
.cw-trust__badge:nth-child(2) { animation-delay: 0.1s; }
.cw-trust__badge:nth-child(3) { animation-delay: 0.15s; }
.cw-trust__badge:nth-child(4) { animation-delay: 0.2s; }

@keyframes badge-slide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .cw-plan,
  .cw-trust__badge,
  .cw-fab:not([hidden]),
  .cart-fab--new-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .cw-hero__cta--primary::after {
    animation: none;
  }

  .cw-plan:hover,
  .cw-trust__badge:hover {
    transform: none;
  }
}
