/**
 * FireFly Growth360 — ONE TIENDA · V7.0
 * one-variants.css — Estilos Canónicos del Selector de Variantes y Matriz de Cantidades
 */

.ff360-variants-matrix-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Cabecera de la matriz */
.ff360-variants-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ff360-variants-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ff360-variants-label strong {
  color: #0F172A;
  font-weight: 700;
}

.ff360-tier-badge-hint {
  font-size: 11px;
  font-weight: 700;
  color: #BE185D;
  background: #FDF2F8;
  border: 1px solid #FBCFE8;
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.2px;
}

/* Lista de Variantes (Filas) */
.ff360-variants-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}

.ff360-variants-list::-webkit-scrollbar {
  width: 5px;
}
.ff360-variants-list::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

/* Fila Individual de Color / Variante */
.ff360-variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #F8FAFC;
  border: 1px solid #EDF2F7;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  gap: 8px;
}

.ff360-variant-row:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.ff360-variant-row.is-selected {
  background: #FFF1F2;
  border-color: #FECDD3;
  box-shadow: 0 1px 4px rgba(225, 29, 72, 0.08);
}

.ff360-variant-row.ff360-variant-out-of-stock {
  opacity: 0.55;
  background: #F1F5F9;
}

/* Muestra Circular de Color (Swatch) */
.ff360-variant-swatch {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px #CBD5E1, 0 2px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  outline: none;
}

.ff360-variant-swatch:hover,
.ff360-variant-swatch.is-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #E11D48, 0 3px 6px rgba(225, 29, 72, 0.2);
}

/* Metadatos de la Variante */
.ff360-variant-meta {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ff360-variant-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ff360-variant-price-tag {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}

.ff360-stock-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.ff360-stock-badge.low-stock {
  background: #FEF3C7;
  color: #B45309;
}

.ff360-stock-badge.out-of-stock {
  background: #FEE2E2;
  color: #B91C1C;
}

/* Controladores de Cantidad (+ / -) */
.ff360-qty-controller {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  overflow: hidden;
  height: 30px;
}

.ff360-qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.ff360-qty-btn:hover:not(:disabled) {
  background: #F1F5F9;
  color: #E11D48;
}

.ff360-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ff360-qty-input {
  width: 32px;
  height: 30px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  user-select: none;
  pointer-events: none;
}

.ff360-qty-input::-webkit-outer-spin-button,
.ff360-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Barra de Resumen en Vivo */
.ff360-live-summary-bar {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 10px 12px;
  animation: ff360FadeIn 0.25s ease-out;
}

.ff360-summary-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #166534;
}

.ff360-summary-info strong {
  color: #14532D;
  font-size: 14px;
}

.ff360-summary-savings {
  margin-top: 4px;
  font-size: 11px;
}

.ff360-savings-badge {
  background: #DCFCE7;
  color: #15803D;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.ff360-summary-breakdown {
  margin-top: 5px;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botones de Acción */
.ff360-variants-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.ff360-btn-add-variants {
  width: 100% !important;
  background: #94A3B8 !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: not-allowed !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.ff360-btn-add-variants.is-ready {
  background: #E11D48 !important; /* Rosa fucsia institucional Bugambilias */
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28) !important;
}

.ff360-btn-add-variants.is-ready:hover {
  background: #BE123C !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.38) !important;
}

.ff360-btn-custom-quote {
  width: 100% !important;
  background: transparent !important;
  color: #9D174D !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border: 1.5px dashed #F472B6 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.ff360-btn-custom-quote:hover {
  background: #FDF2F8 !important;
  border-color: #DB2777 !important;
  color: #831843 !important;
}

/* Micro-animaciones */
@keyframes ff360FadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ff360-shake {
  animation: ff360Shake 0.35s ease-in-out;
}

@keyframes ff360Shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Adaptación Responsiva */
@media (max-width: 640px) {
  .ff360-variant-row {
    padding: 6px 8px;
  }
  .ff360-variant-name {
    font-size: 12px;
  }
  .ff360-qty-controller {
    height: 28px;
  }
  .ff360-qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .ff360-qty-input {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .ff360-btn-add-variants {
    font-size: 13px !important;
    padding: 10px 14px !important;
  }
}
