/* ============================================================
   KAIROS ESSENCE · Tienda en línea
   ============================================================ */

:root {
  --oro: #b19750;
  --oro-claro: #c9b47c;
  --champan: #e0dca7;
  --tinta: #1d1d1b;
  --papel: #fffffc;
  --crema: #f7f4ec;
  --linea: #e6e1d5;
  --texto: #24241f;
  --texto-suave: #6f6b60;
  --fuente-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --fuente: 'Montserrat', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--crema);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.contenedor { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ── Encabezado ───────────────────────────────────────────── */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(29, 29, 27, .96);
  backdrop-filter: blur(10px);
  color: var(--papel);
  border-bottom: 1px solid rgba(224, 220, 167, .14);
}
.cabecera .contenedor { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.logotipo { display: flex; align-items: center; gap: 11px; color: var(--oro); }
.logotipo .texto { display: flex; flex-direction: column; line-height: 1; color: var(--papel); }
.logotipo .nombre { font-family: var(--fuente-display); font-size: 21px; letter-spacing: .24em; text-transform: uppercase; }
.logotipo .sub { font-size: 8px; letter-spacing: .36em; text-transform: uppercase; color: var(--oro); margin-top: 4px; }

.btn-carrito {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(224, 220, 167, .34);
  color: var(--champan);
  border-radius: 999px;
  padding: 8px 17px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
}
.btn-carrito:hover { background: var(--oro); border-color: var(--oro); color: #fff; }
.btn-carrito .cuenta { background: var(--oro); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; min-width: 19px; text-align: center; }

/* ── Portada ──────────────────────────────────────────────── */
.portada {
  background:
    radial-gradient(900px 500px at 12% -20%, rgba(177, 151, 80, .3), transparent 62%),
    radial-gradient(700px 420px at 108% 120%, rgba(224, 220, 167, .17), transparent 58%),
    var(--tinta);
  color: var(--papel);
  padding: 78px 0 86px;
  text-align: center;
}
.portada .lema { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--oro); }
.portada h1 { font-family: var(--fuente-display); font-size: clamp(38px, 7vw, 66px); font-weight: 400; margin: 14px 0 12px; line-height: 1.08; }
.portada p { max-width: 560px; margin: 0 auto; color: #bdb9ae; font-size: 15px; }
.regla { width: 54px; height: 1px; background: var(--oro); margin: 24px auto 0; }

/* ── Filtros ──────────────────────────────────────────────── */
.filtros-tienda {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 26px 0 6px;
}
.filtros-tienda input, .filtros-tienda select {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--linea);
  background: var(--papel);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--texto);
}
.filtros-tienda input:focus, .filtros-tienda select:focus { outline: none; border-color: var(--oro); }
.filtros-tienda .buscador { flex: 1; min-width: 220px; }

/* ── Rejilla de productos ─────────────────────────────────── */
.productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 22px;
  padding: 20px 0 70px;
}

.producto {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.producto:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(29, 29, 27, .1); }

.producto .lienzo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #f0ece0, #e4dfd0);
  display: grid;
  place-items: center;
  color: var(--oro);
  position: relative;
}
.producto .lienzo img { width: 100%; height: 100%; object-fit: cover; }
.producto .cinta {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--tinta);
  color: var(--champan);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
}

.producto .cuerpo { padding: 17px 18px 19px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.producto h3 { font-family: var(--fuente-display); font-size: 23px; font-weight: 500; margin: 0; line-height: 1.15; }
.producto .inspira { font-size: 11.5px; color: var(--texto-suave); }
.producto .notas { font-size: 12px; color: var(--texto-suave); border-top: 1px solid var(--linea); padding-top: 9px; }
.producto .etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }

.pastilla {
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: #f2efe4;
  color: var(--texto-suave);
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 600;
}
.pastilla.oro { background: #f5f0dc; color: #8d7639; }

.opciones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.opcion {
  border: 1px solid var(--linea);
  background: var(--papel);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  text-align: center;
  line-height: 1.25;
  transition: border-color .14s, background .14s;
}
.opcion:hover:not(:disabled) { border-color: var(--oro); background: #fdfcf7; }
.opcion.activa { border-color: var(--oro); background: #f8f4e6; }
.opcion:disabled { opacity: .4; cursor: not-allowed; }
.opcion b { display: block; font-size: 13px; }
.opcion span { color: var(--texto-suave); }

.precio-fila { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.precio { font-family: var(--fuente-display); font-size: 27px; }
.agotado { font-size: 11px; color: #a8352f; font-weight: 600; }

.btn-agregar {
  background: var(--tinta);
  color: var(--papel);
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
  transition: background .15s, color .15s;
  width: 100%;
}
.btn-agregar:hover { background: var(--oro); }
.btn-agregar:disabled { background: #ddd8cc; color: #8d897e; cursor: not-allowed; }

/* ── Carrito ──────────────────────────────────────────────── */
.velo { position: fixed; inset: 0; background: rgba(29, 29, 27, .55); z-index: 60; }
.cajon {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--papel);
  z-index: 70;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(29, 29, 27, .22);
  animation: entrar .22s ease-out;
}
@keyframes entrar { from { transform: translateX(24px); opacity: .4; } }

.cajon-cab { padding: 20px 22px; border-bottom: 1px solid var(--linea); display: flex; align-items: center; justify-content: space-between; }
.cajon-cab h2 { font-family: var(--fuente-display); font-size: 25px; margin: 0; font-weight: 500; }
.cajon-cuerpo { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cajon-pie { padding: 18px 22px; border-top: 1px solid var(--linea); background: #faf8f2; }
.cerrar-cajon { background: none; border: none; font-size: 24px; color: var(--texto-suave); line-height: 1; }

.renglon { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.renglon:last-child { border-bottom: none; }
.renglon .info { flex: 1; min-width: 0; }
.renglon .info strong { display: block; font-size: 13.5px; }
.renglon .info span { font-size: 11.5px; color: var(--texto-suave); }
.renglon .cant { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.renglon .cant button { width: 24px; height: 24px; border: 1px solid var(--linea); background: var(--papel); border-radius: 5px; line-height: 1; }
.renglon .importe { font-weight: 600; white-space: nowrap; }

.total-fila { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.total-fila.grande { font-size: 17px; font-weight: 600; border-top: 1px solid var(--linea); padding-top: 10px; margin-top: 10px; }

.campo-t { margin-bottom: 12px; }
.campo-t label { display: block; font-size: 11.5px; font-weight: 600; color: var(--texto-suave); margin-bottom: 4px; }
.campo-t input, .campo-t textarea {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--papel);
}
.campo-t input:focus, .campo-t textarea:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 3px rgba(177, 151, 80, .15); }

.btn-principal {
  width: 100%;
  background: var(--oro);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 14px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s;
}
.btn-principal:hover { background: #8d7639; }
.btn-principal:disabled { background: #d5cfc0; cursor: not-allowed; }
.btn-secundario {
  width: 100%;
  background: transparent;
  border: 1px solid var(--linea);
  border-radius: 9px;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.exito-pedido { text-align: center; padding: 30px 10px; }
.exito-pedido .marca-check { font-size: 40px; color: var(--oro); }
.exito-pedido h3 { font-family: var(--fuente-display); font-size: 27px; margin: 10px 0 6px; font-weight: 500; }

/* ── Pie ──────────────────────────────────────────────────── */
.pie {
  background: var(--tinta);
  color: #a9a49a;
  padding: 46px 0 40px;
  text-align: center;
  font-size: 12.5px;
}
.pie .logotipo { justify-content: center; margin-bottom: 16px; }
.pie a { color: var(--champan); }

.aviso-tienda {
  background: #fbf1de;
  color: #8a6316;
  border: 1px solid #f0e0c0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  margin: 22px 0 0;
}
.aviso-tienda.error { background: #fbeae9; color: #a8352f; border-color: #f0d6d4; }

.mensaje-vacio { text-align: center; padding: 60px 20px; color: var(--texto-suave); }

@media (max-width: 640px) {
  .portada { padding: 54px 0 60px; }
  .productos { grid-template-columns: 1fr; gap: 18px; }
  .contenedor { padding: 0 16px; }
}
