/* =========================================================
   BAMBOLA · Tienda online
   Paleta: verde #1f3b2d + crema #f5ebd7 (y tonos derivados)
   ========================================================= */
:root {
  --verde: #1f3b2d;
  --verde-osc: #142a20;
  --verde-suave: #4d6457;
  --crema: #f5ebd7;
  --crema-clara: #fbf6ec;
  --crema-osc: #e8dcc2;
  --linea: rgba(31, 59, 45, .14);
  --error: #9b2c2c;
  --error-claro: #f7e3dc;

  --f-logo: "Playfair Display", Georgia, serif;
  --f-titulo: "Fraunces", Georgia, serif;
  --f-texto: "EB Garamond", Georgia, serif;
  --f-ui: "Hanken Grotesk", system-ui, sans-serif;

  --radio: 22px;
  --sombra: 0 2px 6px rgba(31, 59, 45, .05), 0 14px 34px rgba(31, 59, 45, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--verde);
  font: 17px/1.55 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--f-titulo);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  color: var(--verde);
}
a { color: inherit; }
.contenedor { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Cabecera (igual a la web principal) ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 10;
  background: var(--verde);
  color: var(--crema);
}
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; height: 92px; gap: 16px; }
.marca { text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; line-height: 1; color: var(--crema); }
.marca__nombre { font-family: var(--f-logo); font-weight: 500; font-size: 46px; letter-spacing: .01em; }
.marca__lema { font-family: var(--f-texto); font-size: 13px; letter-spacing: .09em; text-transform: uppercase; margin-top: 4px; opacity: .85; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav__ig { color: var(--crema); display: inline-flex; }
.nav__ig:hover { opacity: .8; }
.nav__link { font-family: var(--f-ui); font-size: 16px; text-decoration: none; color: var(--crema); opacity: .92; }
.nav__link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.boton-carrito {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--crema); color: var(--verde);
  font-family: var(--f-ui); font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 13px 24px; border-radius: 999px; transition: background .15s;
}
.boton-carrito:hover { background: var(--crema-clara); }
.burbuja {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--verde); color: var(--crema); font-size: 12px; letter-spacing: 0;
  display: inline-grid; place-items: center;
}

@media (max-width: 1020px) { .nav { gap: 22px; } }
@media (max-width: 860px) { .nav__link { display: none; } }
@media (max-width: 640px) {
  .cabecera__fila { height: 74px; }
  .marca__nombre { font-size: 34px; }
  .marca__lema { font-size: 10px; }
  .nav { gap: 14px; }
  .nav__link, .nav__ig { display: none; }
  .boton-carrito { padding: 11px 16px; font-size: 12px; }
}

/* ---------- Encabezado de la tienda ---------- */
.intro { padding-top: 64px; padding-bottom: 56px; text-align: center; }
.intro .bajada { margin-left: auto; margin-right: auto; }
.banda { height: 30px; background: var(--verde); }
h1 { font-size: clamp(40px, 6.5vw, 68px); letter-spacing: -.01em; }
.bajada {
  font-family: var(--f-texto); font-weight: 600; font-size: clamp(19px, 2.2vw, 24px);
  margin: 18px 0 0; max-width: 60ch; color: var(--verde);
}
@media (max-width: 640px) { .intro { padding-top: 36px; padding-bottom: 32px; } }

/* ---------- Diseño general ---------- */
.diseno { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 120px; }
@media (min-width: 980px) {
  .diseno { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; padding-bottom: 72px; }
  .panel-pedido { position: sticky; top: 116px; max-height: calc(100vh - 136px); overflow: auto; }
  .barra-movil { display: none !important; }
}
.cargando { font-family: var(--f-texto); font-size: 19px; color: var(--verde-suave); margin: 0; }

/* ---------- Productos ---------- */
.grilla-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.producto {
  background: var(--crema-clara); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 26px 22px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  text-align: center; transition: transform .2s, box-shadow .2s;
}
.producto:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.producto h3 { font-size: 30px; }
.producto p { font-family: var(--f-texto); font-size: 17px; font-weight: 500; margin: 8px 0 0; color: var(--verde-suave); }
.producto__pie { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.producto__pie .boton { max-width: 100%; }
.precio { font-family: var(--f-texto); font-weight: 700; font-size: 24px; }

/* ---------- Botones ---------- */
.boton {
  appearance: none; border: 1px solid transparent; border-radius: 999px; padding: 12px 26px;
  font-family: var(--f-ui); font-size: 13px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  transition: background .15s, color .15s, transform .05s;
}
.boton:active { transform: scale(.98); }
.boton--primario { background: var(--verde); color: var(--crema); }
.boton--primario:hover { background: var(--verde-osc); }
.boton--secundario { background: transparent; color: var(--verde); border-color: var(--verde); }
.boton--secundario:hover { background: var(--verde); color: var(--crema); }
.boton--ancho { width: 100%; padding: 16px; font-size: 14px; }
.boton:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Panel del pedido ---------- */
.panel-pedido {
  background: var(--crema-clara); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 24px; box-shadow: var(--sombra);
}
.panel-pedido h2 { font-size: 32px; margin-bottom: 12px; }
.carrito-vacio { font-family: var(--f-texto); font-size: 18px; color: var(--verde-suave); margin: 0; }
.lista-carrito { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.item strong { font-family: var(--f-titulo); font-weight: 700; font-size: 19px; }
.item__sabores { margin: 4px 0 0; padding-left: 18px; font-family: var(--f-texto); font-size: 16px; color: var(--verde-suave); }
.item__obs { margin: 4px 0 0; font-family: var(--f-texto); font-style: italic; font-size: 15px; color: var(--verde); }
.item__acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.item__precio { font-family: var(--f-texto); font-weight: 700; font-size: 18px; }
.cantidad { display: inline-flex; align-items: center; border: 1px solid var(--verde); border-radius: 999px; }
.cantidad button {
  width: 34px; height: 34px; border: 0; background: none; font-size: 18px;
  cursor: pointer; color: var(--verde); border-radius: 999px;
}
.cantidad button:hover { background: var(--crema-osc); }
.cantidad span { min-width: 22px; text-align: center; font-weight: 700; }

/* ---------- Checkout ---------- */
.checkout { margin-top: 20px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-family: var(--f-titulo); font-weight: 700; font-size: 20px; margin-bottom: 10px; padding: 0; }
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcion {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--linea); border-radius: 14px; cursor: pointer; font-size: 14px; font-weight: 500;
  background: var(--crema-clara);
}
.opcion:has(input:checked) { border-color: var(--verde); background: var(--verde); color: var(--crema); }
.opcion input { accent-color: var(--crema); margin: 0; width: auto; flex-shrink: 0; }

.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campos--sub { grid-column: 1 / -1; }
.campo { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--verde-suave); }
.campo--ancho { grid-column: 1 / -1; }
.campo small { font-weight: 400; }
input, textarea {
  font: inherit; font-family: var(--f-ui); font-size: 16px; color: var(--verde); background: #fff;
  border: 1px solid var(--linea); border-radius: 12px; padding: 11px 13px; width: 100%;
}
input::placeholder, textarea::placeholder { color: rgba(31, 59, 45, .45); }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--verde); outline-offset: 1px; }
.oculto { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.resumen { margin: 20px 0 14px; padding-top: 14px; border-top: 1px dashed rgba(31, 59, 45, .3); font-family: var(--f-texto); font-size: 18px; }
.resumen div { display: flex; justify-content: space-between; margin: 4px 0; }
.resumen dt { color: var(--verde-suave); }
.resumen dd { margin: 0; font-weight: 600; }
.resumen__total { font-size: 24px; margin-top: 8px !important; }
.resumen__total dt, .resumen__total dd { color: var(--verde); font-weight: 700; }

.error {
  font-family: var(--f-ui); color: var(--error); background: var(--error-claro);
  border-radius: 12px; padding: 11px 14px; font-size: 14px; margin: 0 0 12px;
}
.nota { text-align: center; font-family: var(--f-texto); font-size: 15px; color: var(--verde-suave); margin: 10px 0 0; }

/* ---------- Barra móvil ---------- */
.barra-movil {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20;
  background: var(--verde); color: var(--crema); text-decoration: none; text-align: center;
  font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 16px; border-radius: 999px; box-shadow: 0 10px 30px rgba(31, 59, 45, .35);
}

/* ---------- Modal de sabores ---------- */
.modal {
  border: 0; padding: 0; border-radius: 26px;
  width: min(660px, calc(100% - 24px)); max-height: calc(100vh - 32px);
  background: var(--crema); color: var(--verde);
}
.modal::backdrop { background: rgba(20, 42, 32, .55); }
.modal__contenido { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.modal__cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal__cabecera h3 { font-size: 34px; }
.modal__contador { margin: 4px 0 0; font-family: var(--f-texto); font-weight: 600; font-size: 18px; }
.cerrar {
  border: 1px solid var(--verde); background: transparent; width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 999px; font-size: 22px; line-height: 1; cursor: pointer; color: var(--verde);
}
.cerrar:hover { background: var(--verde); color: var(--crema); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 42vh; overflow: auto; padding: 2px; }
.chip {
  border: 1px solid var(--linea); background: var(--crema-clara); color: var(--verde);
  border-radius: 999px; padding: 9px 16px; font-family: var(--f-texto); font-size: 17px; font-weight: 500; cursor: pointer;
}
.chip:hover:not(:disabled) { border-color: var(--verde); }
.chip--activo { background: var(--verde); border-color: var(--verde); color: var(--crema); }
.chip:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 30;
  background: var(--verde); color: var(--crema); padding: 11px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s;
}
.toast--visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pie (igual a la web principal) ---------- */
.pie { background: var(--verde); color: var(--crema); padding: 40px 0 28px; }
.pie__fila { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; padding-bottom: 22px; }
.pie__raya { display: block; width: 48px; height: 3px; background: var(--crema); margin-bottom: 40px; }
.pie__marca { font-family: var(--f-titulo); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 700; font-size: 30px; line-height: 1.1; }
.pie__lema { font-family: var(--f-texto); font-weight: 700; font-size: 19px; margin: 10px 0 0; }
.pie__datos { font-style: normal; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; font-size: 16px; }
.pie__etiqueta { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: none; }
.pie__base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(245, 235, 215, .55); padding-top: 14px; font-size: 13px; }
.pie__credito { text-align: center; font-size: 14px; line-height: 1.45; margin: 36px 0 0; }
.pie__credito a { text-decoration: none; }
.pie__credito a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .pie__datos { align-items: flex-start; text-align: left; }
  .pie__raya { margin-bottom: 24px; }
}

/* ---------- Páginas de pago y estado ---------- */
.estado { max-width: 580px; margin: 48px auto 72px; padding: 0 16px; }
.tarjeta {
  background: var(--crema-clara); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 30px; box-shadow: var(--sombra);
}
.tarjeta h1 { font-size: 40px; margin-bottom: 12px; }
.tarjeta p { margin: 0 0 10px; font-family: var(--f-texto); font-size: 19px; }
.icono { width: 58px; height: 58px; border-radius: 999px; display: grid; place-items: center; font-size: 28px; margin-bottom: 16px; }
.icono--ok { background: var(--verde); color: var(--crema); }
.icono--mal { background: var(--error-claro); color: var(--error); }
.icono--espera { background: var(--crema-osc); color: var(--verde); }
.codigo { font-family: ui-monospace, monospace; font-size: 15px; background: var(--crema-osc); padding: 2px 8px; border-radius: 6px; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tarjeta .aviso-sim {
  background: var(--crema); border: 1px dashed var(--verde); border-radius: 14px;
  padding: 10px 14px; font-family: var(--f-ui); font-size: 14px; margin-bottom: 18px;
}

@media (max-width: 420px) {
  .campos, .segmento { grid-template-columns: 1fr; }
  .panel-pedido, .tarjeta { padding: 20px; }
}
