﻿/* ================================================================
   WHATSAPP FLOATING BUTTON — Premium
   ================================================================ */

/* --- Base button --- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  background: linear-gradient(145deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,0.4);
  text-decoration: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease;
  animation: wa-attention 8s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.14) translateY(-2px);
  box-shadow: 0 8px 36px rgba(37, 211, 102, 0.65), 0 4px 16px rgba(0,0,0,0.5);
}

.float-icon {
  font-size: 1.8rem;
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Tooltip --- */
.whatsapp-float::before {
  content: 'Escribenos';
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(8px);
  color: #25D366;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(37, 211, 102, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(10, 10, 12, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.whatsapp-float:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.whatsapp-float:hover::after {
  opacity: 1;
}

/* --- Pulse ring animation --- */
@keyframes wa-attention {
  0%, 85%, 100% { box-shadow: 0 4px 24px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.4); }
  88% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5), 0 4px 24px rgba(37,211,102,0.45); }
  94% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 4px 24px rgba(37,211,102,0.45); }
}

/* ================================================================
   SKELETON LOADERS — Tienda
   ================================================================ */
.skeleton-card {
  background: var(--glass-bg, rgba(10,10,12,0.6));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.05));
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-img {
  width: 100%;
  padding-top: 100%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-line.title  { height: 20px; width: 70%; }
.skeleton-line.text   { height: 14px; width: 90%; }
.skeleton-line.text2  { height: 14px; width: 60%; }
.skeleton-line.price  { height: 24px; width: 45%; margin-top: 6px; }
.skeleton-line.button { height: 42px; width: 100%; margin-top: 8px; border-radius: 8px; }

@keyframes skeleton-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ================================================================
   MICRO-ANIMATIONS — Tarjetas de producto
   ================================================================ */

/* Fade-up entrance */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card.animate-in {
  animation: fadeUpIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Ripple effect on add-to-cart button */
.btn-add-cart {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple-expand 0.55s linear;
  pointer-events: none;
}

@keyframes ripple-expand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Badge bounce */
@keyframes badge-bounce {
  0%, 100% { transform: scale(1); }
  30%       { transform: scale(1.45); }
  60%       { transform: scale(0.88); }
  80%       { transform: scale(1.18); }
}

.cart-badge.bounce {
  animation: badge-bounce 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Add-to-cart success state */
@keyframes btn-success-pulse {
  0%   { background: rgba(0, 217, 255, 0.1); }
  50%  { background: rgba(0, 217, 255, 0.25); }
  100% { background: rgba(0, 217, 255, 0.1); }
}

.btn-add-cart.success {
  animation: btn-success-pulse 0.6s ease;
  border-color: #00ff88;
  color: #00ff88;
}

/* ================================================================
   CHECKOUT STEP INDICATOR
   ================================================================ */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 32px 20px 0;
  max-width: 680px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.1);
  z-index: 0;
  transition: background 0.4s ease;
}

.step-item.completed:not(:last-child)::after {
  background: var(--cyan, #00d9ff);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  transition: all 0.35s ease;
}

.step-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color 0.35s ease;
  white-space: nowrap;
}

.step-item.active .step-number {
  background: rgba(0, 217, 255, 0.12);
  border-color: var(--cyan, #00d9ff);
  color: var(--cyan, #00d9ff);
  box-shadow: 0 0 14px rgba(0, 217, 255, 0.35);
}

.step-item.active .step-label {
  color: var(--cyan, #00d9ff);
}

.step-item.completed .step-number {
  background: rgba(0, 217, 255, 0.18);
  border-color: var(--cyan, #00d9ff);
  color: #fff;
}

.step-item.completed .step-label {
  color: rgba(255,255,255,0.65);
}

@media (max-width: 480px) {
  .step-label { display: none; }
  .checkout-steps { gap: 4px; }
}

/* ================================================================
   CHECKOUT ERROR BOX
   ================================================================ */
.checkout-error-box {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(255, 62, 122, 0.08);
  border: 1px solid rgba(255, 62, 122, 0.4);
  border-radius: 10px;
  color: #ff6b9d;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  animation: fadeUpIn 0.3s ease;
}

.checkout-error-box i {
  color: var(--pink, #ff3e7a);
  font-size: 1.1rem;
  flex-shrink: 0;
}
