@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fuentes/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fuentes/PlusJakartaSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fuentes/PlusJakartaSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fuentes/PlusJakartaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --fondo: #f8f9fb;
  --superficie: #ffffff;
  --texto: #11181e;
  --apoyo: #6b7176;
  --accion: #2a73c4;
  --sobre: #ffffff;
  --error: #c0392b;
  --linea: #e6e9ee;
  --hueco: #e4e9ef;
  --ok: #1f7a4d;
  --radio: 18px;
  --radio-foto: 16px;
  --radio-campo: 28px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--fondo);
  color: var(--texto);
  font-size: 15px;
  line-height: 1.4;
}

.marco {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--fondo);
  padding-bottom: 88px;
}

.marco.sin-barra { padding-bottom: 32px; }

.appbar {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 8px 16px;
  background: var(--fondo);
}

.appbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

main { padding: 0 16px 32px; }

h2 {
  margin: 16px 0 8px;
  font-size: 17px;
  font-weight: 600;
}

a { color: var(--accion); }

.aviso { color: var(--error); margin: 0 0 12px; }

.ok { color: var(--ok); }

.vacio, .apoyo { color: var(--apoyo); font-size: 13px; }

label {
  display: block;
  margin: 12px 0 4px;
  color: var(--apoyo);
  font-size: 15px;
}

input, select {
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border: 1px solid var(--linea);
  border-radius: var(--radio-campo);
  background: var(--superficie);
  color: var(--texto);
  font: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accion);
  border-width: 1.6px;
}

button, .boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accion);
  color: var(--sobre);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button.secundario, a.secundario {
  background: transparent;
  color: var(--accion);
  border: 1px solid var(--accion);
}

form.tarjeta, .tarjeta {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--linea);
  vertical-align: top;
}

th { color: var(--apoyo); font-size: 13px; font-weight: 500; }

.fila { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.fila form, .fila button { margin: 0; }

.precio { font-weight: 600; }

.buscar {
  position: relative;
  margin-bottom: 12px;
}

.buscar input { padding-left: 48px; }

.buscar svg {
  position: absolute;
  left: 16px;
  top: 14px;
  width: 24px;
  height: 24px;
  fill: var(--apoyo);
}

.cintillo {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0 -16px 12px;
  padding-left: 16px;
  padding-right: 16px;
}

.cintillo a {
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.logo-marca {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hueco);
  color: var(--apoyo);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--accion);
  color: var(--sobre);
}

.pill .logo-marca {
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--apoyo);
}

.pill span { font-size: 16px; font-weight: 600; }

.rejilla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modelo {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 8px;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  text-decoration: none;
  color: inherit;
}

.foto {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radio-foto);
  overflow: hidden;
  background: var(--hueco);
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.foto .hueco {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.foto .hueco svg { width: 40px; height: 40px; fill: var(--apoyo); }

.foto.grande {
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.modelo .nombre {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modelo .stock { margin-top: 2px; font-size: 13px; color: var(--apoyo); }

.modelo .costo {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  color: var(--accion);
}

.colores, .tallas-detalle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.muestra {
  width: 56px;
  height: 56px;
  border-radius: var(--radio-foto);
  border: 1px solid var(--linea);
  overflow: hidden;
  text-decoration: none;
}

.muestra.elegida { border: 2px solid var(--accion); }

.talla-chip {
  min-height: 36px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--superficie);
  color: var(--texto);
  border: 1px solid var(--linea);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.talla-chip.elegida {
  background: var(--accion);
  color: var(--sobre);
  border-color: var(--accion);
}

.detalle .titulo {
  margin: 16px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.detalle .importe {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--accion);
}

.detalle form button { width: 100%; }

.menu a.fila-menu {
  display: flex;
  align-items: center;
  min-height: 56px;
  margin: 0;
  padding: 0 16px;
  border-radius: var(--radio);
  color: var(--texto);
  text-decoration: none;
  font-size: 16px;
}

.menu a.fila-menu:hover { background: var(--hueco); }

.barra {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  height: 72px;
  display: flex;
  background: var(--superficie);
  border-top: 1px solid var(--linea);
}

.barra a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--apoyo);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.barra a.activo { color: var(--accion); }

.barra .pastilla {
  min-width: 64px;
  padding: 4px 16px;
  border-radius: 16px;
  text-align: center;
}

.barra a.activo .pastilla { background: rgba(42, 115, 196, 0.14); }
