/* ===========================
   CATALOGO.CSS
   Estilos específicos de catalogo.html
   =========================== */

/* ---------- NAVBAR ACTIVE ---------- */
.nav-active {
  color: var(--rosa) !important;
  font-weight: 600 !important;
}


/* ---------- HEADER ---------- */
.catalogo-header {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-light) 100%);
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.catalogo-tag {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.06em;
}

.catalogo-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--blanco);
  margin-bottom: 0.75rem;
}

.catalogo-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

/* Buscador grande */
.catalogo-buscador-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.buscador-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.catalogo-buscador {
  width: 100%;
  padding: 1rem 3rem 1rem 3.25rem;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: rgba(255,255,255,0.15);
  color: var(--blanco);
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.catalogo-buscador::placeholder {
  color: rgba(255,255,255,0.5);
}

.catalogo-buscador:focus {
  background: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 3px rgba(217,108,157,0.4);
}

.buscador-clear {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.buscador-clear:hover {
  background: rgba(255,255,255,0.35);
}


/* ---------- LAYOUT PRINCIPAL ---------- */
.catalogo-main {
  padding: 2.5rem 1.5rem 5rem;
  background: var(--beige);
  min-height: 60vh;
}

.catalogo-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}


/* ---------- SIDEBAR ---------- */
.catalogo-sidebar {
  background: var(--blanco);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.sidebar-section {
  margin-bottom: 1.75rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gris);
  margin-bottom: 0.9rem;
}

.sidebar-cats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cat-btn {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gris);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-btn:hover {
  background: var(--beige);
  color: var(--azul);
}

.cat-btn.active {
  background: var(--rosa);
  color: var(--blanco);
}

.cat-count {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.7;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--gris);
  cursor: pointer;
}

.check-label input {
  accent-color: var(--rosa);
  width: 16px;
  height: 16px;
  cursor: pointer;
}


/* ---------- FILTROS CHIPS (móvil) ---------- */
.filtros-chips {
  display: none;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.filtros-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  background: var(--blanco);
  border: 1.5px solid rgba(0,0,0,0.1);
  color: var(--gris);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--rosa);
  color: var(--rosa);
}

.chip.active {
  background: var(--rosa);
  border-color: var(--rosa);
  color: var(--blanco);
}


/* ---------- BARRA RESULTADOS ---------- */
.resultados-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.resultados-text {
  font-size: 0.88rem;
  color: var(--gris);
}

.vista-btns {
  display: flex;
  gap: 0.4rem;
}

.vista-btn {
  background: var(--blanco);
  border: 1.5px solid rgba(0,0,0,0.1);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--gris);
}

.vista-btn.active {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}


/* ---------- GRID DE PRODUCTOS ---------- */
/* Heredado de style.css + overrides */
#productos-grid {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
}

#productos-grid.lista {
  grid-template-columns: 1fr;
}

#productos-grid.lista .producto-card {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#productos-grid.lista .producto-img-placeholder {
  width: 90px;
  height: 90px;
  aspect-ratio: unset;
  flex-shrink: 0;
  font-size: 2.2rem;
  border-radius: var(--radius) 0 0 var(--radius);
}

#productos-grid.lista .producto-img {
  width: 90px;
  height: 90px;
  aspect-ratio: unset;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

#productos-grid.lista .producto-info {
  padding: 1rem 1.25rem;
  flex: 1;
}

/* Cursor pointer en tarjetas del catálogo */
.producto-card {
  cursor: pointer;
}


/* ---------- SIN RESULTADOS ---------- */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
}

.no-results-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--azul);
  margin-bottom: 0.5rem;
}

.no-results-sub {
  color: var(--gris);
  font-size: 0.9rem;
}


/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background: var(--blanco);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease;
  display: grid;
  grid-template-columns: 180px 1fr;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0,0,0,0.15);
}

.modal-img-wrap {
  background: var(--beige-2);
}

.modal-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.modal-img-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-nombre {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--azul);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.modal-desc {
  color: var(--gris);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.modal-precio-wrap {
  margin: 0.25rem 0;
}

.modal-precio {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rosa);
}

.modal-btns {
  margin-top: auto;
  padding-top: 1rem;
}


/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .catalogo-layout {
    grid-template-columns: 1fr;
  }

  .catalogo-sidebar {
    display: none;
  }

  .filtros-chips {
    display: flex;
  }

  #productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

@media (max-width: 540px) {
  .modal-card {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-img-placeholder {
    min-height: 160px;
  }

  #productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* ---------- CARRITO LATERAL ---------- */
.fab-cart {
  position: fixed;
  bottom: 6rem; /* Justo encima del de WhatsApp */
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: var(--azul);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 990;
  transition: transform 0.2s;
}
.fab-cart:hover { transform: scale(1.1); }
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--rosa);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 3000;
  transition: opacity 0.3s;
}
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--blanco);
  z-index: 3001;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.cart-panel.closed { transform: translateX(100%); }
.cart-header { padding: 1.5rem; border-bottom: 1px solid var(--gris-light); display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--azul); margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--beige-2); padding-bottom: 1rem; }
.cart-item-title { font-weight: 600; font-size: 0.9rem; color: var(--azul); margin-bottom: 0.2rem; }
.cart-item-price { color: var(--rosa); font-weight: 700; font-size: 0.95rem; }
.cart-item-remove { color: #ef4444; font-size: 0.8rem; cursor: pointer; border: none; background: none; text-decoration: underline; padding: 0;}
.cart-footer { padding: 1.5rem; border-top: 1px solid var(--gris-light); background: var(--beige); }
.cart-total { font-size: 1.2rem; font-weight: 700; color: var(--azul); margin-bottom: 1rem; display: flex; justify-content: space-between; }