:root {
  --azul: #13294B;
  --azul-2: #1C3762;
  --naranja: #FF7A1A;
  --naranja-claro: #FFE6D3;
  --verde: #15805A;
  --tinta: #0F1B2D;
  --gris: #4A5A72;
  --linea: #DCE2EA;
  --fondo: #F3F5F8;
  --blanco: #FFFFFF;
  --radio: 14px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --texto: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fondo); color: var(--tinta); font-family: var(--texto); font-size: 16px; line-height: 1.5; }
a { color: var(--azul); }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { min-height: 60vh; padding-top: 24px; padding-bottom: 48px; outline: none; }
h1, h2, h3 { font-family: var(--display); color: var(--azul); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 800; }
p { margin: 0 0 12px; }
.muted { color: var(--gris); }

/* Encabezado */
.top { background: var(--azul); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-txt { display: flex; flex-direction: column; font-family: var(--display); line-height: 0.88; transform: skewX(-8deg); }
.logo-txt b { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.05em; }
.logo-txt i { color: var(--naranja); font-style: normal; font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.buscar { flex: 1 1 320px; display: flex; background: #fff; border-radius: 12px; overflow: hidden; min-width: 0; }
.buscar input { flex: 1; border: 0; padding: 12px 14px; font: inherit; min-width: 0; min-height: 46px; }
.buscar input:focus { outline: none; }
.buscar:focus-within { box-shadow: 0 0 0 3px var(--naranja); }
.buscar button { border: 0; background: var(--naranja); color: var(--azul); padding: 0 16px; cursor: pointer; min-width: 48px; }
.acciones { display: flex; align-items: center; gap: 14px; }
.link-top { color: #fff; text-decoration: none; font-weight: 600; }
.link-top:hover { color: var(--naranja); }
.btn-carrito { position: relative; color: #fff; display: inline-flex; padding: 10px; border-radius: 10px; }
.btn-carrito:hover { background: var(--azul-2); }
.badge[hidden] { display: none; }
.badge { position: absolute; top: 2px; right: 0; background: var(--naranja); color: var(--azul); font-size: 12px; font-weight: 800; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.subnav { background: var(--azul-2); }
.subnav-row { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; flex: 1 1 100%; }
.chips a { color: #fff; text-decoration: none; white-space: nowrap; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.chips a:hover, .chips a.activa { background: var(--naranja); color: var(--azul); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 22px; min-height: 48px; cursor: pointer; text-decoration: none; }
.btn-primario { background: var(--naranja); color: var(--azul); }
.btn-primario:hover { background: #ff8c38; }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: var(--azul-2); }
.btn-borde { background: transparent; color: var(--azul); border: 2px solid var(--azul); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-chico { min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* Portada */
.hero { background: var(--azul); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; margin-bottom: 32px; }
.hero h1 { color: #fff; }
.hero h1 em { color: var(--naranja); font-style: normal; }
.hero p { color: #C9D4E5; font-size: 18px; max-width: 520px; }
.hero-arte { display: grid; place-items: center; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn-borde { color: #fff; border-color: #fff; }
.pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.paso { background: #fff; border-radius: var(--radio); padding: 20px; }
.paso-n { width: 34px; height: 34px; border-radius: 50%; background: var(--naranja); color: var(--azul); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }
.seccion { margin-bottom: 40px; }
.seccion-top { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat { background: #fff; border-radius: var(--radio); padding: 18px; text-decoration: none; color: var(--azul); font-weight: 700; border: 2px solid transparent; }
.cat:hover { border-color: var(--naranja); }

/* Productos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color .15s; }
.card:hover { border-color: var(--naranja); }
.card-img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--linea); }
.card-img img { max-height: 100%; object-fit: contain; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-marca { font-size: 12px; color: var(--gris); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.card-nombre { font-weight: 600; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-precio { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--azul); margin-top: auto; }
.card-nota { font-size: 12px; color: var(--gris); }
.sin-img { width: 60%; opacity: 0.25; }

/* Ficha */
.ficha { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; background: #fff; border-radius: 20px; padding: clamp(16px, 3vw, 32px); }
.galeria-principal { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--linea); border-radius: var(--radio); padding: 20px; }
.galeria-principal img { max-height: 100%; object-fit: contain; }
.miniaturas { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.miniaturas button { border: 2px solid var(--linea); border-radius: 10px; background: #fff; padding: 4px; width: 64px; height: 64px; cursor: pointer; flex: none; }
.miniaturas button.activa { border-color: var(--naranja); }
.miniaturas img { width: 100%; height: 100%; object-fit: contain; }
.precio-grande { font-family: var(--display); font-size: 40px; font-weight: 800; color: var(--azul); line-height: 1; margin: 8px 0; }
.desglose { background: var(--fondo); border-radius: 12px; padding: 14px; margin: 14px 0; font-size: 14px; }
.desglose div { display: flex; justify-content: space-between; padding: 3px 0; }
.etiqueta { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--naranja-claro); color: var(--azul); }
.etiqueta-verde { background: var(--verde); color: #fff; }
.cantidad { display: inline-flex; align-items: center; border: 2px solid var(--linea); border-radius: 12px; overflow: hidden; }
.cantidad button { border: 0; background: #fff; width: 44px; height: 44px; font-size: 20px; cursor: pointer; color: var(--azul); }
.cantidad span { min-width: 40px; text-align: center; font-weight: 700; }
.comprar-fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.descripcion { white-space: pre-line; color: var(--gris); }
.aviso-box { border: 2px dashed var(--linea); border-radius: 12px; padding: 14px; margin-top: 18px; }

/* Formularios */
.form { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-weight: 700; font-size: 14px; }
.campo input, .campo select, .campo textarea { font: inherit; border: 2px solid var(--linea); border-radius: 10px; padding: 10px 12px; min-height: 46px; background: #fff; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--naranja); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 2px; }
.caja { background: #fff; border-radius: 20px; padding: clamp(16px, 3vw, 28px); }
.dos-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.error { color: #B42318; font-weight: 600; }

/* Carrito */
.linea { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.linea img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--linea); border-radius: 10px; padding: 4px; background: #fff; }
.linea-nombre { font-weight: 600; }
.quitar { background: none; border: 0; color: #B42318; cursor: pointer; font: inherit; font-size: 14px; padding: 6px 0; text-decoration: underline; }
.resumen div { display: flex; justify-content: space-between; padding: 6px 0; }
.resumen .total { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--azul); border-top: 2px solid var(--linea); margin-top: 8px; padding-top: 12px; }
.nota-min { background: var(--naranja-claro); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }

/* Seguimiento */
.timeline { list-style: none; padding: 0; margin: 16px 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--naranja); }
.timeline li::after { content: ''; position: absolute; left: 11px; top: 20px; bottom: 0; width: 2px; background: var(--linea); }
.timeline li:last-child::after { display: none; }

.vacio { background: #fff; border-radius: 20px; padding: 40px 24px; text-align: center; }
.cargando { padding: 60px 0; text-align: center; color: var(--gris); }

/* Pie */
.pie { background: var(--tinta); color: #C9D4E5; padding: 40px 0 24px; font-size: 14px; }
.pie a { color: #fff; display: block; text-decoration: none; padding: 3px 0; }
.pie a:hover { color: var(--naranja); }
.pie-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.pie-marca { font-family: var(--display); font-size: 22px; color: #fff; transform: skewX(-8deg); display: inline-block; }
.pie-marca i { color: var(--naranja); font-style: normal; font-weight: 800; }
.pie-t { color: #fff; font-weight: 700; }
.pie-legal { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 24px; padding-top: 16px; font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--azul); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: calc(100% - 32px); }
#toast.ver { opacity: 1; }

@media (max-width: 860px) {
  .hero, .ficha, .dos-col { grid-template-columns: 1fr; }
  .hero-arte { display: none; }
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pie-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top-row { gap: 10px; }
  .buscar { order: 3; flex-basis: 100%; }
  .acciones { margin-left: auto; }
  .pasos, .form-2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-precio { font-size: 18px; }
  .chips { gap: 6px; }
  .chips a { font-size: 13px; padding: 5px 10px; }
}
.opcion { max-width: 320px; margin: 10px 0; }
.opcion select { width: 100%; font: inherit; border: 2px solid var(--linea); border-radius: 10px; padding: 10px 12px; min-height: 46px; background: #fff; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.subcats a { text-decoration: none; color: var(--azul); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--linea); background: #fff; }
.subcats a:hover { border-color: var(--naranja); }
.subcats a.activa { background: var(--azul); border-color: var(--azul); color: #fff; }
