/* ============================================
   ASGIS TIENDA - estilos.css
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --azul:      #0a1628;
  --azul-mid:  #0d2042;
  --azul-light:#1a3a6e;
  --amarillo:  #f5c518;
  --amarillo2: #e0a800;
  --blanco:    #ffffff;
  --gris:      #f4f6fa;
  --gris-text: #6c7a8d;
  --rojo:      #e53935;
  --verde:     #2e7d32;
  --sombra:    0 8px 32px rgba(10,22,40,0.15);
  --radius:    12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--gris);
  color: var(--azul);
  min-height: 100vh;
}
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============ TOPBAR ============ */
.topbar {
  background: var(--amarillo);
  color: var(--azul);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar span { display: flex; align-items: center; gap: 6px; }
.social-links { margin-left: auto; display: flex; gap: 10px; }
.social-links a {
  background: var(--azul);
  color: var(--amarillo);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.social-links a:hover { transform: scale(1.15); }

/* ============ NAVBAR ============ */
.navbar {
  background: var(--azul);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.navbar .logo img { height: 54px; padding: 8px 0; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links li a {
  color: rgba(255,255,255,0.8);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.87rem;
  padding: 20px 14px;
  display: block;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--amarillo);
  border-bottom-color: var(--amarillo);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-whatsapp:hover { background: #1ebe59; }
.hamburger {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--azul-mid);
  padding: 10px 0;
}
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  padding: 12px 28px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu a:hover { color: var(--amarillo); }
.mobile-menu.open { display: flex; }

/* ============ HERO TIENDA ============ */
.hero-tienda {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-light) 60%, #0d3575 100%);
  position: relative;
  padding: 80px 40px 70px;
  overflow: hidden;
  text-align: center;
}
.hero-tienda::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5c518' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.badge {
  display: inline-block;
  background: rgba(245,197,24,0.15);
  color: var(--amarillo);
  border: 1px solid rgba(245,197,24,0.35);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--blanco);
  margin-bottom: 12px;
  line-height: 1.1;
}
.hero-content h1 span { color: var(--amarillo); }
.hero-content p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ============ FILTROS ============ */
.filtros-section {
  background: var(--blanco);
  border-bottom: 2px solid rgba(0,0,0,0.06);
  padding: 18px 0;
  position: sticky;
  top: 72px;
  z-index: 99;
  box-shadow: var(--sombra);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.filtros-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--gris);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  gap: 8px;
  transition: border 0.2s;
  flex: 1;
  min-width: 180px;
}
.search-box:focus-within { border-color: var(--amarillo); }
.search-box i { color: var(--gris-text); font-size: 0.9rem; }
.search-box input {
  border: none; background: none; outline: none;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--azul);
  padding: 10px 0;
  width: 100%;
}
.filtro-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-btn {
  background: var(--gris);
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--gris-text);
  transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--amarillo); color: var(--azul); }
.cat-btn.active { background: var(--amarillo); color: var(--azul); border-color: var(--amarillo); }
.btn-agregar {
  background: var(--azul);
  color: var(--amarillo);
  border: 2px solid var(--azul);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-agregar:hover { background: var(--amarillo); color: var(--azul); }

/* ============ PRODUCTOS GRID ============ */
.productos-section { padding: 40px 0 60px; }
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

/* ============ TARJETA PRODUCTO ============ */
.producto-card {
  background: var(--blanco);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(10,22,40,0.2);
}
.card-img-wrap {
  position: relative;
  height: 240px;
  background: var(--gris);
  overflow: hidden;
  cursor: pointer;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.35s;
}
.producto-card:hover .card-img-wrap img { transform: scale(1.04); }
.card-categoria {
  position: absolute; top: 10px; left: 10px;
  background: var(--amarillo);
  color: var(--azul);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.card-stock {
  position: absolute; top: 10px; right: 10px;
  background: rgba(10,22,40,0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}
.card-stock.agotado { background: rgba(229,57,53,0.85); }
.card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-marca {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gris-text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.card-nombre {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--azul);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.82rem;
  color: var(--gris-text);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-precio {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--azul);
  margin-top: 12px;
}
.card-precio small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gris-text);
  margin-left: 2px;
}
.card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.btn-ver {
  flex: 1;
  background: var(--azul);
  color: var(--amarillo);
  border: none;
  border-radius: 7px;
  padding: 9px 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-ver:hover { background: var(--azul-light); }
.btn-edit {
  background: rgba(245,197,24,0.12);
  color: var(--amarillo2);
  border: 2px solid var(--amarillo2);
  border-radius: 7px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-edit:hover { background: var(--amarillo); color: var(--azul); }
.btn-del {
  background: rgba(229,57,53,0.08);
  color: var(--rojo);
  border: 2px solid rgba(229,57,53,0.35);
  border-radius: 7px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-del:hover { background: var(--rojo); color: #fff; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--gris-text);
  grid-column: 1/-1;
}
.empty-state i { font-size: 4rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-family: 'Montserrat', sans-serif; font-size: 1.3rem; margin-bottom: 8px; }

/* ============ MODALES ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--blanco);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  background: var(--azul);
  color: var(--blanco);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.modal-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px;
}
.modal-header h2 i { color: var(--amarillo); }
.modal-close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }

/* FORM */
.modal-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--azul);
  letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 2px solid #e0e6ef;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--azul);
  background: var(--gris);
  outline: none;
  transition: border 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--amarillo); background: white; }
.form-group small { color: var(--gris-text); font-size: 0.75rem; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.btn-cancelar {
  background: var(--gris);
  border: 2px solid #dde3ef;
  color: var(--gris-text);
  border-radius: 8px;
  padding: 10px 22px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancelar:hover { border-color: var(--azul); color: var(--azul); }
.btn-guardar {
  background: var(--azul);
  color: var(--amarillo);
  border: 2px solid var(--azul);
  border-radius: 8px;
  padding: 10px 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: all 0.2s;
}
.btn-guardar:hover { background: var(--amarillo); color: var(--azul); }

/* MODAL DETALLE */
.modal-detalle { max-width: 640px; }
.detalle-body { padding: 24px; }
.detalle-img {
  width: 100%; height: 240px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}
.detalle-cat {
  display: inline-block;
  background: var(--amarillo);
  color: var(--azul);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.detalle-nombre {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--azul);
  margin-bottom: 6px;
}
.detalle-marca { font-size: 0.82rem; color: var(--gris-text); font-weight: 600; margin-bottom: 14px; }
.detalle-desc { font-size: 0.9rem; color: #455; line-height: 1.7; margin-bottom: 20px; }
.detalle-info-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.detalle-info-item { display: flex; flex-direction: column; gap: 2px; }
.detalle-info-item .label { font-size: 0.72rem; font-weight: 700; color: var(--gris-text); text-transform: uppercase; letter-spacing: 0.5px; }
.detalle-info-item .value { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--azul); }
.btn-cotizar-detalle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-cotizar-detalle:hover { background: #1ebe59; }

/* MODAL CONFIRMAR ELIMINAR */
.modal-confirm {
  max-width: 380px;
  padding: 40px 32px;
  text-align: center;
}
.confirm-icon {
  width: 64px; height: 64px;
  background: rgba(229,57,53,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: var(--rojo);
  margin: 0 auto 18px;
}
.modal-confirm h3 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem; margin-bottom: 8px; }
.modal-confirm p { color: var(--gris-text); font-size: 0.88rem; margin-bottom: 24px; }
.modal-confirm .modal-actions { justify-content: center; }
.btn-eliminar {
  background: var(--rojo);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: background 0.2s;
}
.btn-eliminar:hover { background: #c62828; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--azul);
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 10px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: slideLeft 0.3s ease;
  border-left: 4px solid var(--amarillo);
}
.toast.success { border-left-color: #25d366; }
.toast.error   { border-left-color: var(--rojo); }
@keyframes slideLeft { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ FOOTER ============ */
.footer {
  background: var(--azul);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 0;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand img { height: 50px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.85; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; }
.footer h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--amarillo);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.84rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--amarillo); }
.footer-contact p { font-size: 0.84rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.footer-contact a:hover { color: var(--amarillo); }
.footer-contact .fab.fa-whatsapp { color: #25d366; font-size: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .btn-whatsapp { display: none; }
  .hamburger { display: flex; }
  .topbar { padding: 7px 20px; }
  .navbar { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-tienda { padding: 50px 20px; }
  .filtros-bar { flex-direction: column; align-items: stretch; }
  .btn-agregar { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .detalle-info-row { gap: 14px; }
}

/* ============================================================
   NUEVOS ESTILOS v2 — Contraseña + Galería + Admin
   ============================================================ */

/* Botón admin discreto */
.btn-admin-login {
  background: transparent;
  border: 2px solid rgba(10,22,40,0.15);
  color: var(--gris-text);
  border-radius: 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-admin-login:hover { background: var(--azul); color: var(--amarillo); border-color: var(--azul); }

/* Botón cerrar sesión */
.btn-cerrar-sesion {
  background: rgba(229,57,53,0.08);
  border: 2px solid rgba(229,57,53,0.35);
  color: var(--rojo);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-cerrar-sesion:hover { background: var(--rojo); color: #fff; }

/* ===== MODAL LOGIN ===== */
.modal-login { max-width: 420px; }
.login-icon {
  text-align: center;
  margin: 24px 0 6px;
  font-size: 2.8rem;
  color: var(--azul);
}
.login-sub {
  text-align: center;
  color: var(--gris-text);
  font-size: 0.88rem;
  margin-bottom: 20px;
  padding: 0 24px;
}
.pass-group { position: relative; }
.pass-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.pass-input-wrap input { padding-right: 42px; flex: 1; }
.toggle-pass {
  position: absolute; right: 10px;
  background: none; border: none;
  color: var(--gris-text); cursor: pointer;
  font-size: 0.9rem; padding: 0;
  transition: color 0.2s;
}
.toggle-pass:hover { color: var(--azul); }
.field-error {
  color: var(--rojo);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 4px;
  display: block;
  min-height: 16px;
}
.btn-link-pass {
  background: none; border: none;
  color: var(--azul-light);
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; text-decoration: underline;
  padding: 0;
  transition: color 0.2s;
}
.btn-link-pass:hover { color: var(--amarillo2); }

/* ===== BADGE MULTI-IMAGEN ===== */
.card-multi-img {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(10,22,40,0.7);
  color: var(--amarillo);
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  display: flex; align-items: center; gap: 4px;
}

/* ===== UPLOAD IMÁGENES ===== */
.label-hint {
  font-size: 0.72rem;
  color: var(--gris-text);
  font-weight: 400;
  margin-left: 4px;
}
.img-upload-area {
  border: 2px dashed #c8d3e6;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--gris-text);
  background: var(--gris);
}
.img-upload-area:hover { border-color: var(--amarillo); background: rgba(245,197,24,0.05); color: var(--azul); }
.img-upload-area i { font-size: 2rem; color: var(--amarillo); }
.img-upload-area span { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.9rem; }
.img-upload-area small { font-size: 0.75rem; }

.img-preview-wrap { margin-top: 12px; }
.img-preview-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 6px;
}
.img-preview-item {
  position: relative;
  width: 90px; height: 90px;
  border-radius: 8px;
  overflow: visible;
  border: 2px solid #dde3ef;
}
.img-preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.img-remove-btn {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--rojo);
  color: white; border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.img-remove-btn:hover { background: #c62828; }
.img-principal-badge {
  position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%);
  background: var(--amarillo);
  color: var(--azul);
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 10px;
  white-space: nowrap;
}
.img-count {
  font-size: 0.78rem;
  color: var(--gris-text);
  font-weight: 600;
}

/* ===== MODAL FORM BIG ===== */
.modal-form-big { max-width: 620px; }

/* ===== GALERÍA EN DETALLE ===== */
.galeria-wrap { margin-bottom: 20px; }
.galeria-main {
  position: relative;
  width: 100%; height: 340px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gris);
  margin-bottom: 10px;
}
.galeria-main img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity 0.2s;
}
.gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(10,22,40,0.65);
  color: white; border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.gal-arrow:hover { background: var(--amarillo); color: var(--azul); }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-counter {
  position: absolute; bottom: 8px; right: 10px;
  background: rgba(0,0,0,0.6);
  color: white; font-size: 0.72rem; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
}
.galeria-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.gal-thumb {
  width: 60px; height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: all 0.2s;
}
.gal-thumb:hover { opacity: 1; }
.gal-thumb.active { border-color: var(--amarillo); opacity: 1; }
.detalle-img-single {
  width: 100%; height: 320px;
  object-fit: contain;
  background: var(--gris);
  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}
.detalle-info-wrap { padding: 0 2px; }

/* ===== EMPTY STATE FLEX ===== */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--gris-text);
  grid-column: 1/-1;
}

/* ============================================================
   CATEGORÍAS DINÁMICAS v3
   ============================================================ */

/* Contenedor de cada categoría con su botón eliminar */
.cat-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Botón ✕ para eliminar categoría — se muestra al hacer hover sobre cat-item */
.cat-del-btn {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--rojo);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.55rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
}
.cat-del-btn:hover {
  background: #c62828;
  transform: scale(1.2);
}

/* Mostrar el ✕ solo al pasar el mouse sobre el grupo */
.cat-item:hover .cat-del-btn {
  display: flex;
}

/* Botón "+ Nueva categoría" */
.cat-add-btn {
  background: transparent;
  border: 2px dashed var(--azul-light);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--azul-light);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.cat-add-btn:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--amarillo);
}

/* Modal categoría pequeño */
.modal-cat {
  max-width: 380px;
}

/* ============================================================
   LOGO ELECTRO ASGIS
   ============================================================ */

.logo-navbar {
  height: 52px;
  padding: 5px 0;
  transition: opacity 0.2s;
  object-fit: contain;
}
.logo-navbar:hover { opacity: 0.85; }

.logo-footer {
  height: 52px;
  margin-bottom: 14px;
  display: block;
  object-fit: contain;
}

/* ============================================================
   v4 — Badge "Nueva" para imágenes recién subidas
   ============================================================ */
.img-nueva-badge {
  position: absolute; top: -8px; left: -8px;
  background: #25d366;
  color: white;
  font-size: 0.55rem; font-weight: 800;
  padding: 2px 6px; border-radius: 8px;
  white-space: nowrap;
  z-index: 3;
}

/* Spinner para botón de guardar mientras sube imágenes */
.btn-guardar:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
