/* Tienda pública. Colores/fuentes: NO tocar acá, ir a tema.css */
@import url('tema.css');

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--tamanio-base); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: var(--fuente-texto); line-height: 1.55;
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; display: block; }
main svg { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; }   /* íconos en línea; los botones y tarjetas los agrandan */
a { color: var(--marca); text-decoration: none; }
a:hover { color: var(--marca-oscura); }
h1, h2, h3 { font-family: var(--fuente-titulos); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
main { flex: 1; }
.contenedor { width: 100%; max-width: var(--ancho-max); margin: 0 auto; padding: 0 var(--separacion); }
.oculto-accesible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- cabecera */
.cabecera { background: var(--superficie); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 20; }
.cabecera .contenedor { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--texto); }
.logo img { height: 40px; width: auto; }
.logo span { font-family: var(--fuente-titulos); font-size: 1.35rem; font-weight: 600; white-space: nowrap; }
.buscador { flex: 1; display: flex; max-width: 420px; margin-left: auto; }
.buscador input {
  width: 100%; border: 1px solid var(--borde); background: var(--fondo); border-radius: var(--radio-pildora);
  padding: 9px 16px; font: inherit; color: var(--texto); min-width: 0;
}
.buscador input:focus { outline: 2px solid var(--marca-suave); border-color: var(--marca); }
.btn-bolsa {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--texto); flex-shrink: 0;
}
.btn-bolsa:hover { background: var(--marca-suave); color: var(--marca); }
.btn-bolsa svg { width: 24px; height: 24px; }
.btn-bolsa .cuenta {
  position: absolute; top: 2px; right: 0; background: var(--marca); color: #fff; font-size: .7rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}
@media (max-width: 640px) {
  .cabecera .contenedor { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .buscador { order: 3; flex-basis: 100%; max-width: none; }
  .logo { margin-right: auto; }
}

/* ---------------------------------------------------------------- categorías */
.categorias { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: none; }
.categorias::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--radio-pildora); background: var(--superficie);
  border: 1px solid var(--borde); color: var(--texto); font-size: .92rem; white-space: nowrap;
}
.chip:hover { border-color: var(--marca); color: var(--marca); }
.chip.activo { background: var(--marca); border-color: var(--marca); color: #fff; }

/* ---------------------------------------------------------------- portada */
.portada { padding: 36px 0 20px; text-align: center; }
.portada p { color: var(--texto-suave); max-width: 560px; margin: 0 auto; }
.portada .lema { color: var(--acento); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: 8px; }

/* ---------------------------------------------------------------- grilla */
.barra-listado { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; }
.barra-listado h2 { margin: 0; }
.barra-listado select {
  font: inherit; padding: 7px 10px; border-radius: var(--radio-chico); border: 1px solid var(--borde); background: var(--superficie); color: var(--texto);
}
.grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tarjeta {
  background: var(--superficie); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
  color: var(--texto); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.tarjeta:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); color: var(--texto); }
.tarjeta .foto { aspect-ratio: 1; background: var(--marca-suave); position: relative; }
.tarjeta .foto img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.tarjeta .info { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tarjeta .nombre { font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarjeta .detalle { font-size: .8rem; color: var(--texto-suave); }
.tarjeta .precio { font-weight: 700; font-size: 1.05rem; margin-top: auto; padding-top: 4px; }
.sin-foto { width: 100%; height: 100%; display: grid; place-items: center; color: var(--marca); opacity: .5; }
.sin-foto svg { width: 40%; height: 40%; }

.etiqueta {
  display: inline-block; padding: 3px 10px; border-radius: var(--radio-pildora); font-size: .75rem; font-weight: 700;
  background: var(--acento-suave); color: var(--acento);
}
.tarjeta .etiqueta { position: absolute; top: 8px; left: 8px; }
.etiqueta.ultima { background: var(--alerta-suave); color: var(--alerta); }
.etiqueta.vendido { background: var(--error-suave); color: var(--error); }
.etiqueta.ok { background: var(--ok-suave); color: var(--ok); }

.paginado { display: flex; justify-content: center; gap: 8px; margin: 28px 0; flex-wrap: wrap; }
.paginado a, .paginado span { padding: 8px 14px; border-radius: var(--radio-chico); background: var(--superficie); border: 1px solid var(--borde); }
.paginado span { background: var(--marca); color: #fff; border-color: var(--marca); }

.vacio { text-align: center; padding: 48px 16px; color: var(--texto-suave); }
.vacio svg { width: 56px; height: 56px; color: var(--marca); opacity: .5; margin: 0 auto 12px; }

/* ---------------------------------------------------------------- ficha */
.miga { font-size: .85rem; color: var(--texto-suave); margin: 16px 0; }
.miga a { color: var(--texto-suave); }
.ficha { display: grid; gap: 24px; margin-bottom: 32px; }
@media (min-width: 820px) { .ficha { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; } }

.galeria { position: relative; }
.galeria .carril {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radio);
  background: var(--marca-suave); scrollbar-width: none;
}
.galeria .carril::-webkit-scrollbar { display: none; }
.galeria .carril img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; }
.galeria .miniaturas { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.galeria .miniaturas button {
  flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--radio-chico);
  overflow: hidden; cursor: pointer; background: none;
}
.galeria .miniaturas button.activa { border-color: var(--marca); }
.galeria .miniaturas img { width: 100%; height: 100%; object-fit: cover; }

.ficha .codigo { font-size: .8rem; color: var(--texto-suave); letter-spacing: .05em; }
.ficha .precio-grande { font-size: 1.9rem; font-weight: 700; margin: 4px 0 12px; }
.atributos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0; font-size: .95rem; }
.atributos dt { color: var(--texto-suave); }
.atributos dd { margin: 0; }
.descripcion { white-space: pre-line; color: var(--texto); }
.acciones { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }

/* ---------------------------------------------------------------- botones y formularios */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--radio-chico); border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--marca); color: #fff; text-align: center; transition: background .15s;
}
.btn:hover { background: var(--marca-oscura); color: #fff; }
.btn svg { width: 20px; height: 20px; }
.btn.secundario { background: var(--superficie); color: var(--marca); border-color: var(--marca); }
.btn.secundario:hover { background: var(--marca-suave); }
.btn.whatsapp { background: #25d366; color: #0b3d20; }
.btn.whatsapp:hover { background: #1ebe5a; }
.btn.chico { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn.texto { background: none; color: var(--texto-suave); border: none; font-weight: 600; }
.btn.texto:hover { color: var(--error); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.caja { background: var(--superficie); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo label { font-weight: 600; font-size: .92rem; }
.campo small { color: var(--texto-suave); }
.campo input, .campo textarea, .campo select {
  font: inherit; padding: 11px 14px; border: 1px solid var(--borde); border-radius: var(--radio-chico);
  background: var(--superficie); color: var(--texto);
}
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--marca-suave); border-color: var(--marca); }
.opciones { display: flex; flex-direction: column; gap: 8px; }
.opciones label {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--borde);
  border-radius: var(--radio-chico); font-weight: 400; cursor: pointer;
}
.opciones input { accent-color: var(--marca); }
.trampa { position: absolute; left: -9999px; }

.aviso { padding: 12px 16px; border-radius: var(--radio-chico); margin: 12px 0; background: var(--marca-suave); color: var(--marca-oscura); }
.aviso.error { background: var(--error-suave); color: var(--error); }
.aviso.ok { background: var(--ok-suave); color: var(--ok); }

/* ---------------------------------------------------------------- bolsa y reserva */
.bolsa-layout { display: grid; gap: 24px; margin: 20px 0 40px; }
@media (min-width: 860px) { .bolsa-layout { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.linea { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.linea:last-child { border-bottom: none; }
.linea img, .linea .sin-foto { width: 72px; height: 72px; border-radius: var(--radio-chico); object-fit: cover; background: var(--marca-suave); flex-shrink: 0; }
.linea .datos { flex: 1; min-width: 0; }
.linea .datos a { color: var(--texto); font-weight: 600; }
.linea .datos small { display: block; color: var(--texto-suave); }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; padding-top: 14px; }

.reserva-ok { text-align: center; padding: 28px 0 8px; }
.reserva-ok .icono { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-suave); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; }
.reserva-ok .icono svg { width: 34px; height: 34px; }
.numero-reserva { font-family: var(--fuente-titulos); font-size: 2.4rem; color: var(--marca); }

/* ---------------------------------------------------------------- pie */
.pie { background: var(--superficie); border-top: 1px solid var(--borde); margin-top: 40px; padding: 28px 0; font-size: .92rem; color: var(--texto-suave); }
.pie .contenedor { display: grid; gap: 16px; }
@media (min-width: 700px) { .pie .contenedor { grid-template-columns: 2fr 1fr 1fr; } }
.pie strong { color: var(--texto); font-family: var(--fuente-titulos); font-size: 1.1rem; }
.pie a { color: var(--texto-suave); }
.pie a:hover { color: var(--marca); }

/* Botón flotante de WhatsApp */
.wa-flotante {
  position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: #25d366;
  color: #fff; display: grid; place-items: center; box-shadow: var(--sombra-alta); z-index: 30;
}
.wa-flotante:hover { color: #fff; transform: scale(1.05); }
.wa-flotante svg { width: 30px; height: 30px; }
