/* ================================================
   TECMAX – auth.css
   Estilos: login, admin panel, cotizaciones
   ================================================ */

/* ===== BOTÓN "INGRESAR" EN EL HEADER ===== */
.btn-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  color: var(--azul-btn);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  padding: 0;
}
.btn-login:hover { background: #eef2ff; }

/* Chip de usuario logueado */
.user-chip {
  display: none; /* se muestra desde JS */
  align-items: center;
  gap: 2px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  color: var(--azul-btn);
  border-radius: 8px;
  transition: background .2s;
}
.user-chip:hover { background: #eef2ff; }
.user-chip__avatar {
  width: 48px;
  height: 48px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-chip__name { display: none; }
.user-chip__role {
  font-size: 10px;
  font-weight: 800;
  color: var(--azul-btn);
  background: none;
  padding: 0 8px 0 0;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* Dropdown del usuario */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
  min-width: 190px;
  z-index: 1100;
  overflow: hidden;
  animation: dropIn .18s ease;
}
@keyframes dropIn {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.user-chip.open .user-dropdown { display: block; }

.user-dropdown__header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--gris-borde);
}
.user-dropdown__header strong { display: block; font-size: 13px; color: #111; }
.user-dropdown__header span { font-size: 11px; color: #888; }

.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background .15s;
  font-family: inherit;
}
.user-dropdown__item:hover { background: #f9fafb; }
.user-dropdown__item--danger { color: #dc2626; }
.user-dropdown__sep { height: 1px; background: var(--gris-borde); }

/* ===== MODAL DE LOGIN ===== */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.login-overlay.open { display: flex; }

.login-box {
  background: #fff;
  border-radius: 22px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 400px;
  margin: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  position: relative;
  animation: modalIn .24s ease;
}
@keyframes modalIn {
  from { transform: translateY(-18px) scale(.96); opacity: 0; }
  to   { transform: translateY(0)     scale(1);   opacity: 1; }
}

.login-box__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #666;
  transition: background .18s;
}
.login-box__close:hover { background: #e5e7eb; }

.login-box__logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-box__logo img { height: 44px; margin: 0 auto 10px; display: block; }
.login-box__logo h2 { font-size: 20px; font-weight: 800; color: var(--azul-medio); margin-bottom: 4px; }
.login-box__logo p { font-size: 13px; color: #888; }

.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.login-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.login-field input:focus {
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(4,92,180,.12);
}

.login-error {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 14px;
  display: none;
  font-weight: 500;
}
.login-error.show { display: block; }

.btn-login-submit {
  width: 100%;
  padding: 13px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .18s;
  font-family: inherit;
}
.btn-login-submit:hover { background: var(--azul-oscuro); transform: translateY(-1px); }

/* ===== BADGE MODO ADMIN ===== */
.admin-mode-badge {
  display: none;
  position: fixed;
  bottom: 90px;
  left: 16px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  letter-spacing: .6px;
  text-transform: uppercase;
  z-index: 500;
  box-shadow: 0 4px 14px rgba(220,38,38,.45);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(220,38,38,.45); }
  50%       { box-shadow: 0 4px 24px rgba(220,38,38,.75); }
}
body.mode-admin .admin-mode-badge { display: block; }

/* ===== ADMIN: OVERLAY EDITAR EN TARJETA ===== */
body.mode-admin .product-card { overflow: visible; }
.product-card__edit-btn {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  gap: 4px;
  align-items: center;
  z-index: 20;
  transition: background .18s, transform .18s;
  font-family: inherit;
  letter-spacing: .3px;
}
.product-card__edit-btn:hover { background: #b91c1c; transform: scale(1.05); }
body.mode-admin .product-card:hover .product-card__edit-btn { display: flex; }

/* ===== BOTÓN AÑADIR PRODUCTO ===== */
.btn-add-product {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #16a34a;
  color: #fff;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  transition: background .2s, transform .18s;
  font-family: inherit;
}
.btn-add-product:hover { background: #15803d; transform: translateY(-1px); }
body.mode-admin .btn-add-product { display: flex; }

/* ===== MODAL ADMIN (editar / añadir producto) ===== */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 5000;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.admin-modal-overlay.open { display: flex; }

.admin-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  margin: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  animation: modalIn .22s ease;
}
.admin-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gris-borde);
  flex-shrink: 0;
}
.admin-modal__head h3 { font-size: 18px; font-weight: 800; color: #111; }
.admin-modal__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #555;
  transition: background .18s;
}
.admin-modal__close:hover { background: #e5e7eb; }

.admin-modal__body { padding: 24px; overflow-y: auto; }

.admin-modal__foot {
  padding: 16px 24px;
  border-top: 1px solid var(--gris-borde);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* Campos del admin */
.admin-field { margin-bottom: 16px; }
.admin-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.admin-field input:focus,
.admin-field textarea:focus {
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(4,92,180,.1);
}
.admin-field textarea { min-height: 88px; }
.admin-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Preview imagen */
.img-preview {
  width: 80px; height: 80px;
  border-radius: 8px;
  border: 1.5px solid var(--gris-borde);
  object-fit: contain;
  background: #f9fafb;
  padding: 4px;
  margin-top: 8px;
  display: none;
}
.img-preview.show { display: block; }

/* Botones del modal admin */
.btn-admin-save {
  padding: 10px 22px;
  background: var(--azul-btn);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
  font-family: inherit;
}
.btn-admin-save:hover { background: var(--azul-oscuro); }
.btn-admin-cancel {
  padding: 10px 18px;
  background: #f3f4f6;
  color: #444;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn-admin-cancel:hover { background: #e5e7eb; }
.btn-admin-delete {
  padding: 10px 18px;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #fecaca;
  cursor: pointer;
  font-size: 14px;
  margin-right: auto;
  transition: background .2s;
  font-family: inherit;
}
.btn-admin-delete:hover { background: #fee2e2; }

/* ===== BOTÓN COTIZACIÓN EN EL CARRITO ===== */
.btn-cotizacion {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--naranja);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .18s;
  font-family: inherit;
}
.btn-cotizacion:hover { background: #e06600; transform: translateY(-1px); }
body.mode-cotizaciones .btn-cotizacion,
body.mode-admin .btn-cotizacion { display: flex; }

/* ===== PANEL DE COTIZACIÓN ===== */
.cotiz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 4500;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cotiz-overlay.open { display: flex; }

.cotiz-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 660px;
  margin: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  animation: modalIn .22s ease;
  overflow: hidden;
}

.cotiz-panel__head {
  background: var(--azul-medio);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cotiz-panel__head h3 { font-size: 17px; font-weight: 800; }
.cotiz-panel__head button {
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.cotiz-panel__head button:hover { background: rgba(255,255,255,.3); }

.cotiz-body { padding: 24px; }

.cotiz-section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--azul-btn);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e0edff;
}

.cotiz-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

/* Línea de producto en cotización */
.cotiz-product-row {
  display: grid;
  grid-template-columns: 1fr 56px 80px 90px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.cotiz-product-row:last-child { border-bottom: none; }
.cotiz-product-row .prod-name { font-weight: 600; color: #222; }
.cotiz-product-row .prod-qty  { color: #888; text-align: center; }
.cotiz-product-row .prod-sub  { font-weight: 700; color: var(--azul-medio); text-align: right; }

/* Input de precio editable */
.prod-unit-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed #c7d9f8;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-align: right;
  padding: 2px 2px 2px 0;
  cursor: text;
  border-radius: 0;
  transition: border-color .15s, background .15s, color .15s;
  outline: none;
}
.prod-unit-input:hover {
  border-bottom-color: var(--azul-btn);
  color: var(--azul-medio);
}
.prod-unit-input:focus {
  border-bottom: 2px solid var(--azul-btn);
  background: #eef3ff;
  color: var(--azul-medio);
  font-weight: 700;
  border-radius: 4px 4px 0 0;
  padding: 2px 4px;
}

.cotiz-header-row {
  display: grid;
  grid-template-columns: 1fr 56px 80px 90px;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--gris-borde);
  margin-bottom: 0;
}
.cotiz-header-row span:not(:first-child) { text-align: right; }

/* Toggle IVA */
.iva-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  user-select: none;
  margin: 14px 0;
}
.iva-toggle input[type=checkbox] {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--azul-btn);
}

/* Totales */
.cotiz-totals {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0 20px;
}
.cotiz-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
  color: #555;
}
.cotiz-total-row.grand {
  font-size: 20px;
  font-weight: 900;
  color: var(--azul-medio);
  border-top: 1.5px solid var(--gris-borde);
  margin-top: 10px;
  padding-top: 10px;
}

/* Botón imprimir */
.btn-print-cotiz {
  width: 100%;
  padding: 14px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .18s;
  font-family: inherit;
}
.btn-print-cotiz:hover { background: var(--azul-oscuro); transform: translateY(-1px); }

/* ===== ÁREA DE IMPRESIÓN (cotización) ===== */
#printArea { display: none; }

@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; font-family: Arial, sans-serif; }

  .print-wrap { padding: 16mm 18mm; }

  .print-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 3px solid #09399E;
  }
  .print-logo { height: 44px; }
  .print-head-right { text-align: right; font-size: 13px; color: #555; }
  .print-num { font-size: 24px; font-weight: 900; color: #09399E; }
  .print-num-sub { font-size: 12px; color: #888; }

  .print-client {
    background: #f9fafb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
  .print-client h4 {
    font-size: 11px; font-weight: 800; color: #09399E;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
  }
  .print-client p { font-size: 13px; color: #333; margin: 2px 0; }

  .print-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
  .print-table th {
    background: #09399E; color: #fff;
    padding: 8px 12px; font-size: 11px; text-align: left;
  }
  .print-table th:not(:first-child) { text-align: right; }
  .print-table td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #e5e7eb; }
  .print-table td:not(:first-child) { text-align: right; }
  .print-table tr:nth-child(even) td { background: #f9fafb; }

  .print-totals { text-align: right; }
  .print-totals p { font-size: 14px; margin: 3px 0; color: #555; }
  .print-totals .grand { font-size: 22px; font-weight: 900; color: #09399E; margin-top: 8px; }

  .print-notes { margin-top: 18px; font-size: 13px; color: #555; }
  .print-notes strong { color: #333; }

  .print-footer {
    margin-top: 36px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 11px;
    color: #888;
  }
}

/* ===== RESPONSIVE AUTH ===== */
@media (max-width: 768px) {
  /* Botón login mobile */
  .btn-login { width: 34px; height: 34px; }

  /* Chip usuario mobile — solo icono */
  .user-chip__role { display: none; }
  .user-chip__avatar { width: 40px; height: 40px; }

  /* Dropdown alineado */
  .user-dropdown { right: 0; min-width: 200px; }

  /* Cotizaciones: grid de 1 columna en cliente */
  .cotiz-client-grid { grid-template-columns: 1fr; }

  /* Tabla productos en cotiz más compacta */
  .cotiz-product-row { grid-template-columns: 1fr 40px 70px; }
  .prod-unit-input { display: none; }
  .cotiz-header-row { grid-template-columns: 1fr 40px 70px; }
  .cotiz-header-row span:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .login-box { padding: 28px 18px 24px; border-radius: 18px; }
  .admin-modal__body { padding: 18px; }
  .admin-field-row { grid-template-columns: 1fr; }
  .admin-modal__foot { flex-wrap: wrap; }
  .btn-admin-delete { width: 100%; text-align: center; justify-content: center; }
  .cotiz-body { padding: 18px; }
}

/* ================================================
   VISOR DE COTIZACIÓN – overlay en la misma página
   ================================================ */
.cotiz-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(1, 46, 102, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  animation: cvFadeIn .22s ease;
}
.cotiz-viewer.open {
  display: flex;
}
@keyframes cvFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================
   HERO EDIT BUTTON — solo visible en modo admin
   ================================================ */
.hero-edit-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: none;          /* hidden by default */
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s;
  font-family: inherit;
}
.hero-edit-btn:hover {
  background: rgba(0, 0, 0, .65);
  border-color: rgba(255, 255, 255, .6);
}
body.mode-admin .hero-edit-btn { display: flex; }

/* ================================================
   BANNER EDITOR MODAL
   ================================================ */
.banner-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.banner-editor-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.banner-editor-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  transform: translateY(12px);
  transition: transform .22s;
}
.banner-editor-overlay.open .banner-editor-modal {
  transform: translateY(0);
}
.banner-editor-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(135deg, #012e66, #0a3fa8);
  color: #fff;
  flex-shrink: 0;
}
.banner-editor-modal__head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner-editor-modal__close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .15);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  line-height: 1;
}
.banner-editor-modal__close:hover { background: rgba(255, 255, 255, .3); }

.banner-editor-modal__body {
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.banner-editor-modal__hint {
  font-size: 13px;
  color: #888;
  margin: 0;
}

/* Grid de thumbnails */
.banner-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.banner-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e4e8f0;
  aspect-ratio: 16 / 7;
  background: #f0f2f8;
  cursor: default;
}
.banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .2s;
}
.banner-thumb:hover img { filter: brightness(.75); }
.banner-thumb__del {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  background: rgba(220, 38, 38, .88);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s;
  line-height: 1;
}
.banner-thumb:hover .banner-thumb__del { opacity: 1; }

/* Añadir banner */
.banner-editor-add {
  border-top: 1.5px solid #e4e8f0;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.banner-editor-add h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--azul-oscuro);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0;
}

/* Tabs */
.banner-add-tabs {
  display: flex;
  gap: 4px;
  background: #f0f2f8;
  border-radius: 10px;
  padding: 4px;
}
.banner-add-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #666;
  background: transparent;
  transition: background .18s, color .18s, box-shadow .18s;
}
.banner-add-tab.active {
  background: #fff;
  color: var(--azul-oscuro);
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}
.banner-add-tab:not(.active):hover { background: rgba(255,255,255,.6); }

/* Panels */
.banner-add-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Drop zone */
.banner-upload-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c8d0e8;
  border-radius: 12px;
  min-height: 110px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  background: #f7f8fd;
  transition: border-color .2s, background .2s;
}
.banner-upload-drop:hover {
  border-color: var(--azul-btn);
  background: #eef3ff;
}
.banner-upload-drop input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.banner-upload-drop__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
  padding: 16px;
  pointer-events: none;
}
.banner-upload-drop__idle em {
  font-style: normal;
  font-size: 12px;
  color: var(--azul-btn);
  font-weight: 600;
}
.banner-upload-preview {
  display: none;
  width: 100%;
  height: 110px;
  object-fit: cover;
  pointer-events: none;
}

.banner-editor-add input[type=text],
.banner-editor-add input[type=url] {
  border: 1.5px solid #d2d7e8;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  color: #222;
}
.banner-editor-add input[type=text]:focus,
.banner-editor-add input[type=url]:focus { border-color: var(--azul-btn); }

.btn-banner-add {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--azul-btn);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-banner-add:hover { background: var(--azul-oscuro); transform: translateY(-1px); }

@media (max-width: 480px) {
  .banner-editor-grid { grid-template-columns: 1fr 1fr; }
  .banner-editor-modal__body { padding: 16px; }
}

.cotiz-viewer__wrap {
  width: 100%;
  max-width: 880px;
  height: calc(100vh - 32px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
  position: relative;
  background: #fff;
}

.cotiz-viewer__frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  display: block;
}

/* Botón cerrar flotante (fuera del iframe, siempre visible) */
.cotiz-viewer__close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
  color: #333;
  font-size: 20px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
  line-height: 1;
}
.cotiz-viewer__close:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, .35);
}

/* Mobile */
@media (max-width: 600px) {
  .cotiz-viewer { padding: 0; }
  .cotiz-viewer__wrap { height: 100vh; border-radius: 0; max-width: 100%; }
  .cotiz-viewer__close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 17px; }
}

/* ================================================
   SECTION EDIT BUTTONS — visibles solo en modo admin
   ================================================ */
.sec-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(1, 61, 130, .72);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s;
  font-family: inherit;
}
.sec-edit-btn:hover {
  background: rgba(1, 61, 130, .95);
  border-color: rgba(255,255,255,.6);
}
body.mode-admin .sec-edit-btn { display: flex; }

/* Variante para la announce bar (más pequeña y discreta) */
.sec-edit-btn--bar {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  padding: 5px 11px;
  font-size: 11px;
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
}
.sec-edit-btn--bar:hover { background: rgba(255,255,255,.35); }

/* Las secciones editables necesitan position:relative */
#announceBar,
#promosSection,
#ctaSection,
#featuresSection { position: relative; }

/* ================================================
   SECTION EDITOR MODALS — base común
   ================================================ */
.sec-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.sec-editor-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.sec-editor-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
  transform: translateY(10px);
  transition: transform .22s;
}
.sec-editor-overlay.open .sec-editor-modal { transform: translateY(0); }
.sec-editor-modal--wide { max-width: 620px; }

.sec-editor-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(135deg, #012e66, #0a3fa8);
  color: #fff;
  flex-shrink: 0;
}
.sec-editor-modal__head h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.sec-editor-modal__close {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.15);
  border: none; border-radius: 8px;
  color: #fff; font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.sec-editor-modal__close:hover { background: rgba(255,255,255,.3); }

.sec-editor-modal__body {
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.sec-editor-modal__foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1.5px solid #e4e8f0;
  flex-shrink: 0;
}

/* Inputs */
.sec-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--azul-oscuro);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 6px;
}
.sec-hint {
  font-size: 12px;
  color: #999;
  margin: 0;
}
.sec-input {
  border: 1.5px solid #d2d7e8;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  color: #222;
  width: 100%;
  box-sizing: border-box;
}
.sec-input:focus { border-color: var(--azul-btn); }
.sec-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
}
.sec-textarea-sm { min-height: 52px; resize: vertical; }

/* Botones del footer */
.sec-btn-cancel {
  padding: 9px 20px;
  border: 1.5px solid #d2d7e8;
  border-radius: 9px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
}
.sec-btn-cancel:hover { background: #f5f6fa; }
.sec-btn-save {
  padding: 9px 22px;
  border: none;
  border-radius: 9px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
}
.sec-btn-save:hover { background: var(--azul-oscuro); }

/* ================================================
   PROMO ROWS LIST
   ================================================ */
.promo-rows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.promo-row {
  display: grid;
  grid-template-columns: 20px 72px 1fr 28px;
  align-items: center;
  gap: 10px;
  background: #f7f8fd;
  border: 1.5px solid #e4e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.promo-row__num {
  font-size: 12px;
  font-weight: 800;
  color: #aaa;
  text-align: center;
}
.promo-row__thumb-wrap {
  position: relative;
  width: 72px;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
  background: #e4e8f0;
  flex-shrink: 0;
}
.promo-row__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-row__upload-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s;
}
.promo-row__thumb-wrap:hover .promo-row__upload-btn { opacity: 1; }
.promo-row__fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.promo-row__input {
  border: 1.5px solid #d2d7e8;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  color: #222;
}
.promo-row__input:focus { border-color: var(--azul-btn); }
.promo-row__del {
  width: 26px; height: 26px;
  background: #fee2e2;
  color: #dc2626;
  border: none; border-radius: 50%;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}
.promo-row__del:hover { background: #fca5a5; }

.sec-btn-add-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px dashed #a0aec0;
  border-radius: 9px;
  background: transparent;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s, color .18s;
  margin-top: 4px;
}
.sec-btn-add-row:hover { border-color: var(--azul-btn); color: var(--azul-btn); }

/* ================================================
   FEATURE ROWS LIST
   ================================================ */
.feature-rows-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-edit-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
}
.feature-edit-row__num {
  font-size: 20px;
  line-height: 38px;
  text-align: center;
}
.feature-edit-row__fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 480px) {
  .promo-row { grid-template-columns: 0 56px 1fr 24px; }
  .promo-row__num { display: none; }
}

/* ================================================
   CATEGORY ADMIN – Nav Dropdown Controls
   ================================================ */

/* ── Item layout (flex row to hold link + ✕ btn) ── */
.dropdown .cat-dropdown-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--gris-borde);
}
.dropdown .cat-dropdown-item.cat-last { border-bottom: none; }

/* Override the generic "dropdown li a" block style */
.dropdown .cat-dropdown-item .cat-nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  border-bottom: none;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--texto);
  transition: background var(--trans), color var(--trans), padding-left var(--trans);
}
.dropdown .cat-dropdown-item .cat-nav-link:hover {
  background: #eef2ff;
  color: var(--azul-btn);
  padding-left: 24px;
}
.dropdown .cat-dropdown-item .cat-nav-link.active {
  background: #eef2ff;
  color: var(--azul-btn);
  font-weight: 700;
}

/* ── ✕ Delete button ── */
.cat-del-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: auto 10px auto 0;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s;
  line-height: 1;
}
.mode-admin .cat-del-btn { display: flex; }
.cat-del-btn:hover { background: #fca5a5; }

/* ── "Añadir categoría" item ── */
.cat-add-item { display: none; }
.mode-admin .cat-add-item { display: block; }

.cat-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-top: 1.5px dashed #c0cde0;
  color: var(--azul-btn);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
  text-align: left;
}
.cat-add-btn:hover { background: #eef2ff; }

/* ── Inline input to name a new category ── */
.cat-add-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-top: 1.5px dashed #c0cde0;
}
.cat-add-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1.5px solid var(--azul-btn);
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  color: var(--texto);
}
.cat-add-input:focus { border-color: var(--azul-oscuro); }

.cat-add-ok {
  padding: 5px 9px;
  background: var(--azul-btn);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
}
.cat-add-ok:hover { background: var(--azul-oscuro); }

.cat-add-cx {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #f1f5f9;
  color: #666;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s;
}
.cat-add-cx:hover { background: #e2e8f0; }

/* ── Confirmation dialog overlay ── */
@keyframes catOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes catBoxIn { from { transform: translateY(16px) scale(.96); opacity: 0; }
                      to   { transform: translateY(0)    scale(1);   opacity: 1; } }

.cat-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: catOverlayIn .18s ease;
}
.cat-confirm-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 36px 28px;
  min-width: 300px;
  max-width: 390px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
  animation: catBoxIn .22s cubic-bezier(.34,1.56,.64,1);
}
.cat-confirm-msg {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 26px;
}
.cat-confirm-msg strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  color: var(--azul-oscuro);
}
.cat-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.cat-confirm-cancel {
  padding: 10px 26px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.cat-confirm-cancel:hover { background: #f3f4f6; border-color: #b0b8c4; }

.cat-confirm-accept {
  padding: 10px 26px;
  border: none;
  border-radius: 8px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
  box-shadow: 0 2px 8px rgba(4,92,180,.25);
}
.cat-confirm-accept:hover { background: var(--azul-oscuro); }

/* ================================================
   CONTACTO ADMIN – Editar número WA / teléfonos
   ================================================ */

/* ── Botón flotante: indicador de edición ── */
.mode-admin #waFloat {
  cursor: pointer;
}
.mode-admin #waFloat::after {
  content: '✎';
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: var(--naranja);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* ── Footer phones: indicador editable ── */
.mode-admin .footer__phones {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background .18s;
  position: relative;
}
.mode-admin .footer__phones:hover { background: rgba(255,255,255,.12); }
.mode-admin .footer__phones::after {
  content: '✎ editar';
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  background: var(--naranja);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
  pointer-events: none;
}

/* ── Flash de éxito ── */
@keyframes waSavedFlash {
  0%   { transform: scale(1);    filter: brightness(1); }
  40%  { transform: scale(1.18); filter: brightness(1.35) saturate(1.4); }
  100% { transform: scale(1);    filter: brightness(1); }
}
.contacto-saved-flash { animation: waSavedFlash .7s cubic-bezier(.34,1.56,.64,1); }

/* ── Overlay ── */
@keyframes contactoOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes contactoBoxIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.contacto-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: contactoOverlayIn .18s ease;
}
.contacto-edit-box {
  background: #fff;
  border-radius: 14px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
  animation: contactoBoxIn .24s cubic-bezier(.34,1.56,.64,1);
}

/* ── Header ── */
.contacto-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--gris-borde);
  background: #f6f9ff;
}
.contacto-edit-head h3 {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--azul-oscuro);
  display: flex;
  align-items: center;
}
.contacto-edit-close {
  width: 28px; height: 28px;
  border: none; background: #e8ecf2; border-radius: 50%;
  font-size: 13px; cursor: pointer; color: #555;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}
.contacto-edit-close:hover { background: #d0d8e4; }

/* ── Body ── */
.contacto-edit-body {
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contacto-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contacto-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contacto-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.contacto-field input {
  padding: 9px 12px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 7px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--texto);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  background: #fff;
}
.contacto-field input:focus {
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(4,92,180,.12);
}
.contacto-hint {
  font-size: 0.73rem;
  color: #aaa;
  line-height: 1.3;
}

/* ── Footer ── */
.contacto-edit-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--gris-borde);
  background: #f6f9ff;
}
.contacto-btn-cancel {
  padding: 9px 22px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
}
.contacto-btn-cancel:hover { background: #f3f4f6; }
.contacto-btn-save {
  padding: 9px 22px;
  border: none;
  border-radius: 8px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
  box-shadow: 0 2px 8px rgba(4,92,180,.25);
}
.contacto-btn-save:hover { background: var(--azul-oscuro); }

@media (max-width: 480px) {
  .contacto-field-row { grid-template-columns: 1fr; }
}

/* ── Sección labels dentro del form de edición ── */
.contacto-edit-section {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--azul-btn);
  margin: 6px 0 2px;
  padding-top: 6px;
  border-top: 1px solid var(--gris-borde);
}
.contacto-edit-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

/* ================================================
   MODAL DE CONTACTO (info pública)
   ================================================ */
@keyframes ctmOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ctmBoxIn {
  from { opacity: 0; transform: translateY(24px) scale(.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

.ctm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ctmOverlayIn .18s ease;
}
.ctm-box {
  background: #fff;
  border-radius: 18px;
  width: 92%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.32);
  overflow: hidden;
  animation: ctmBoxIn .26s cubic-bezier(.34,1.4,.64,1);
}

/* ── Header ── */
.ctm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, #013D82 0%, #09399E 100%);
  color: #fff;
}
.ctm-brand { display: flex; align-items: center; gap: 10px; }
.ctm-brand-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ctm-brand strong { display: block; font-size: 0.95rem; font-weight: 700; }
.ctm-brand span   { display: block; font-size: 0.72rem; opacity: .75; margin-top: 1px; }

.ctm-head-right { display: flex; align-items: center; gap: 8px; }

.ctm-edit-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 20px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
}
.ctm-edit-btn:hover { background: rgba(255,255,255,.3); }

.ctm-close {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.18);
  border: none; border-radius: 50%;
  color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .18s;
  flex-shrink: 0;
}
.ctm-close:hover { background: rgba(255,255,255,.3); }

/* ── Body ── */
.ctm-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Canales (WA, soporte) */
.ctm-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .18s, transform .15s;
}
.ctm-channel:hover { transform: translateX(3px); }

.ctm-channel--wa     { background: #f0fdf4; }
.ctm-channel--wa:hover { background: #dcfce7; }
.ctm-channel--wa .ctm-channel-icon { background: #25d366; }

.ctm-channel--soporte     { background: #f0f6ff; }
.ctm-channel--soporte:hover { background: #dbeafe; }
.ctm-channel--soporte .ctm-channel-icon { background: var(--azul-btn); color: #fff; }

.ctm-channel-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ctm-channel-info { flex: 1; }
.ctm-channel-info strong { display: block; font-size: 0.9rem; font-weight: 700; color: #222; }
.ctm-channel-info span   { display: block; font-size: 0.78rem; color: #666; margin-top: 1px; }
.ctm-arrow { color: #bbb; flex-shrink: 0; }

/* Redes sociales */
.ctm-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #aaa;
  text-align: center;
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctm-section-label::before,
.ctm-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gris-borde);
}

.ctm-socials {
  display: flex;
  gap: 10px;
}
.ctm-social {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  transition: background .18s, transform .15s;
}
.ctm-social:hover { transform: translateY(-2px); }
.ctm-social span { color: #444; }

.ctm-social--ig { background: #fdf0f8; }
.ctm-social--ig:hover { background: #fce7f3; }
.ctm-social--ig svg { color: #E1306C; fill: #E1306C; }

.ctm-social--fb { background: #eff6ff; }
.ctm-social--fb:hover { background: #dbeafe; }
.ctm-social--fb svg { color: #1877F2; fill: #1877F2; }

.ctm-social--tt { background: #f9f9f9; }
.ctm-social--tt:hover { background: #f0f0f0; }
.ctm-social--tt svg { fill: #000; }

/* Dirección */
.ctm-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #f8faff;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #555;
  line-height: 1.45;
}
.ctm-address svg { flex-shrink: 0; margin-top: 2px; stroke: var(--azul-btn); }

@media (max-width: 400px) {
  .ctm-socials { gap: 7px; }
  .ctm-social   { padding: 10px 5px; font-size: 0.68rem; }
}
