/**
 * FireFly Growth360 — ONE TIENDA · V7.0
 * custom-designer.css — Estilos del Diseñador a Medida "Create Your Own Arrangement"
 */

.ff360-designer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2100000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: ff360FadeIn 0.25s ease-out;
}

.ff360-designer-container {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  box-sizing: border-box;
  margin: auto;
  position: relative;
}

/* Cabecera */
.ff360-designer-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.ff360-designer-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #F472B6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.ff360-designer-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px;
}

.ff360-designer-subtitle {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.4;
}

.ff360-designer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ff360-designer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Cuerpo del Formulario */
.ff360-designer-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
}

.ff360-designer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff360-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  display: block;
}

/* Tarjetas de Estilo */
.ff360-style-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ff360-style-card {
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  background: #F8FAFC;
  transition: all 0.2s ease;
}

.ff360-style-card input {
  display: none;
}

.ff360-style-card:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.ff360-style-card.is-active {
  border-color: #E11D48;
  background: #FFF1F2;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

.ff360-card-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 2px;
}

.ff360-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  display: block;
}

.ff360-card-desc {
  font-size: 10px;
  color: #64748B;
  line-height: 1.3;
}

/* Selector de Colores en el Diseñador */
.ff360-designer-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.ff360-designer-color-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #F8FAFC;
  border: 1px solid #EDF2F7;
  border-radius: 8px;
}

.ff360-color-swatch-circle {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  display: inline-block;
}

.ff360-color-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-left: 6px;
  margin-right: auto;
}

.ff360-designer-qty {
  display: flex;
  align-items: center;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  height: 26px;
}

.ff360-dqty-btn {
  width: 24px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
  padding: 0;
}

.ff360-dqty-btn:hover {
  background: #F1F5F9;
  color: #E11D48;
}

.ff360-dqty-input {
  width: 24px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 0;
  user-select: none;
  pointer-events: none;
}

/* Campos de Contacto y Dedicatoria */
.ff360-designer-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ff360-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ff360-field-group label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.ff360-field-group input,
.ff360-field-group textarea,
.ff360-designer-select {
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #0F172A;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.ff360-field-group input:focus,
.ff360-field-group textarea:focus,
.ff360-designer-select:focus {
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.ff360-fields-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ff360-char-count {
  font-size: 11px;
  color: #64748B;
  text-align: right;
}

/* Pie del Modal */
.ff360-designer-footer {
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ff360-btn-submit-quote {
  width: 100% !important;
  background: #E11D48 !important;
  color: #FFFFFF !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 14px 20px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3) !important;
  transition: all 0.25s ease !important;
}

.ff360-btn-submit-quote:hover {
  background: #BE123C !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4) !important;
}

.ff360-designer-msg.is-error {
  background: #FEE2E2;
  color: #B91C1C;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* Responsivo: Tablet y Móvil */
@media (max-width: 1024px) {
  .ff360-designer-overlay {
    padding: 16px;
  }
  .ff360-designer-container {
    max-width: min(680px, 94vw);
    max-height: 92vh;
  }
  .ff360-style-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .ff360-style-card {
    padding: 10px 8px;
  }
  .ff360-designer-colors-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .ff360-designer-overlay {
    padding: 10px 8px;
    align-items: center;
    justify-content: center;
  }
  .ff360-designer-container {
    max-width: 100%;
    width: 100%;
    max-height: 96vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
  }
  .ff360-designer-header {
    padding: 16px 18px 14px;
  }
  .ff360-designer-eyebrow {
    font-size: 10px;
  }
  .ff360-designer-title {
    font-size: 18px;
    line-height: 1.25;
  }
  .ff360-designer-subtitle {
    font-size: 12px;
    line-height: 1.35;
  }
  .ff360-designer-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 26px;
  }
  .ff360-designer-body {
    padding: 16px 16px 20px;
    gap: 18px;
  }
  .ff360-section-title {
    font-size: 13.5px;
  }
  .ff360-style-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ff360-style-card {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 10px 14px;
    gap: 12px;
  }
  .ff360-card-icon {
    font-size: 26px;
    flex-shrink: 0;
  }
  .ff360-card-title {
    font-size: 13px;
  }
  .ff360-card-desc {
    font-size: 11px;
  }
  .ff360-designer-colors-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ff360-designer-color-item {
    padding: 8px 12px;
    border-radius: 10px;
  }
  .ff360-color-name {
    font-size: 13px;
  }
  .ff360-designer-qty {
    height: 38px;
    border-radius: 8px;
  }
  .ff360-dqty-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .ff360-dqty-input {
    width: 32px;
    height: 38px;
    font-size: 14px;
  }
  .ff360-fields-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ff360-btn-submit-quote {
    min-height: 50px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }
  .ff360-designer-footer {
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
}
