/* =====================================================================
   RV25 Relojería · PANEL LATERAL
   ---------------------------------------------------------------------
   La ventana del carrito y de los favoritos (js/componentes/panel.js).
   Entra desde la derecha sobre un fondo oscuro; en celular ocupa toda
   la pantalla. Cabeza con título y ×, cuerpo que se desplaza y pie
   fijo abajo (total y botones).

   También aquí: lo que comparten las listas del carrito y de favoritos
   (.lista-relojes) y el mensaje de lista vacía (.panel-vacio).
   ===================================================================== */

.panel { position: fixed; inset: 0; z-index: 70; }
.panel[hidden] { display: none; }
html.con-panel, html.con-panel body { overflow: hidden; }

.panel-fondo {
  position: absolute; inset: 0;
  background: rgba(6, 26, 40, .55);
  animation: panel-fondo .25s ease;
}
@keyframes panel-fondo { from { opacity: 0; } }

.panel-caja {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  width: 100%;
  background: var(--fondo); color: var(--tinta);
  box-shadow: -12px 0 40px rgba(6, 26, 40, .2);
  animation: panel-entra .32s cubic-bezier(.2, .7, .2, 1);
}
@keyframes panel-entra { from { transform: translateX(100%); } }

.panel-cabeza {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex: none;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(var(--margen), env(safe-area-inset-right, 0px)) 14px var(--margen);
  border-bottom: 1px solid var(--arena-2);
}
.panel-titulo { font: 400 26px/1.1 var(--titulo); letter-spacing: -0.01em; }
.panel-cerrar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;
  border: 0; border-radius: 50%; background: none; color: var(--tinta); cursor: pointer;
}
.panel-cerrar:hover { background: var(--arena); }
.panel-cerrar .icono { width: 22px; height: 22px; }

.panel-cuerpo {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px max(var(--margen), env(safe-area-inset-right, 0px)) 24px var(--margen);
}
.panel-pie {
  flex: none;
  padding: 18px max(var(--margen), env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) var(--margen);
  background: var(--marfil);
  border-top: 1px solid var(--arena-2);
}
.panel-pie:empty { display: none; }

/* --- Lista de relojes (carrito y favoritos) --- */
.lista-relojes { list-style: none; margin: 0; padding: 0; }
.lista-reloj {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--arena-2);
}
.lista-foto {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 4; background: var(--marfil); border-radius: 2px; overflow: hidden;
}
.lista-foto img { width: 100%; height: 100%; object-fit: cover; }
.lista-foto svg { height: 86%; width: auto; }
.lista-datos { display: grid; gap: 4px; align-content: start; min-width: 0; }
.lista-marca { font: 600 11px/1.2 var(--letra); letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-suave); }
.lista-nombre { font: 400 20px/1.15 var(--titulo); color: var(--tinta); text-decoration: none; }
.lista-nombre:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lista-precio { font: 600 16px/1.3 var(--letra); }
.lista-datos .estado { justify-self: start; margin-top: 4px; min-height: 24px; font-size: 11px; box-shadow: none; }
.lista-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }

/* Enlace de texto pequeño: "Quitar", "Vaciar carrito" */
.enlace-quitar {
  min-height: 36px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: 500 13px/1 var(--letra); color: var(--tinta-suave);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.enlace-quitar:hover { color: var(--tinta); }

/* --- Lista vacía --- */
.panel-vacio { display: grid; justify-items: center; gap: 14px; padding: 56px 12px; text-align: center; }
.panel-vacio .icono { width: 40px; height: 40px; color: var(--arena-hover); }
.panel-vacio h3 { font: 400 24px/1.2 var(--titulo); }
.panel-vacio p { max-width: 22em; color: var(--tinta-suave); }
.panel-vacio .boton { margin-top: 8px; }

@media (min-width: 560px) {
  .panel-caja { width: min(440px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .panel-caja, .panel-fondo { animation: none; }
}
