/* ============================================================
   BOTON "VER FLYER" + MODAL, para la ficha de producto.
   Namespace cf- (cleo-flyer) para no chocar con el tema.
   ============================================================ */

.cf-btn{
  --cf-rosa:#c8a090;
  --cf-rosa-osc:#a87d6b;
  --cf-tinta:#2e2622;
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;margin-top:10px;padding:13px 18px;
  font-family:inherit;font-size:13px;letter-spacing:1.5px;
  text-transform:uppercase;font-weight:600;
  color:var(--cf-rosa-osc);background:#fff;
  border:1.5px solid var(--cf-rosa);border-radius:8px;
  cursor:pointer;
  transition:background .2s,color .2s,transform .15s;
}
.cf-btn:hover{background:var(--cf-rosa);color:#fff}
.cf-btn:active{transform:translateY(1px)}
.cf-btn:focus-visible{outline:2px solid var(--cf-rosa-osc);outline-offset:2px}
.cf-btn svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* ============================================================
   MODAL
   ============================================================ */
.cf-modal{
  position:fixed;inset:0;z-index:9999;
  display:none;align-items:center;justify-content:center;
  padding:22px 16px;
  background:rgba(46,38,34,.72);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  opacity:0;transition:opacity .22s ease;
}
.cf-modal.cf-abierto{display:flex;opacity:1}

.cf-panel{
  position:relative;
  width:100%;max-width:600px;
  /* La altura tiene que ser explicita. Con solo max-height el panel
     se encoge al contenido, .cf-cuerpo se queda en 0 y el iframe
     (height:100%) colapsa: se veia una franja de 130px del flyer. */
  height:94vh;height:94dvh;
  max-height:1040px;
  background:#faf6f2;border-radius:16px;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
  transform:translateY(16px) scale(.98);
  transition:transform .28s cubic-bezier(.2,.7,.3,1);
}
.cf-modal.cf-abierto .cf-panel{transform:none}

.cf-cab{
  display:flex;align-items:center;gap:12px;flex:none;
  padding:14px 16px;border-bottom:1px solid #e6dad2;background:#fffdfb;
}
.cf-cab .cf-tit{
  flex:1;min-width:0;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:19px;font-weight:600;color:#2e2622;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cf-cerrar{
  flex:none;width:34px;height:34px;border-radius:50%;
  border:1px solid #e6dad2;background:#fff;color:#6d5c53;
  font-size:20px;line-height:1;cursor:pointer;
  transition:background .2s,color .2s;
}
.cf-cerrar:hover{background:#c8a090;color:#fff;border-color:#c8a090}
.cf-cerrar:focus-visible{outline:2px solid #a87d6b;outline-offset:2px}

/* El flyer vive en un iframe: se ve exactamente igual que en su
   pagina y no hay que duplicar su maquetacion aqui. */
.cf-cuerpo{flex:1;min-height:0;overflow:hidden;background:#faf6f2}
.cf-cuerpo iframe{width:100%;height:100%;border:0;display:block}

.cf-cargando{
  position:absolute;inset:56px 0 62px;display:grid;place-items:center;
  color:#6d5c53;font-size:12px;letter-spacing:1.6px;text-transform:uppercase;
  pointer-events:none;transition:opacity .3s;
}
.cf-cargando.cf-oculto{opacity:0}

.cf-pie{
  display:flex;gap:8px;flex-wrap:wrap;justify-content:center;flex:none;
  padding:12px 16px;border-top:1px solid #e6dad2;background:#fffdfb;
}
.cf-pie button,.cf-pie a{
  font-family:inherit;font-size:11px;letter-spacing:1.5px;
  text-transform:uppercase;font-weight:500;text-decoration:none;
  color:#6d5c53;background:#fff;border:1px solid #e6dad2;border-radius:7px;
  padding:9px 14px;cursor:pointer;display:inline-flex;align-items:center;
  transition:background .2s,color .2s,border-color .2s;
}
.cf-pie button:hover,.cf-pie a:hover{background:#c8a090;color:#fff;border-color:#c8a090}
.cf-pie button:focus-visible,.cf-pie a:focus-visible{outline:2px solid #a87d6b;outline-offset:2px}
.cf-pie .cf-primario{background:#c8a090;color:#fff;border-color:#c8a090}
.cf-pie .cf-primario:hover{background:#a87d6b;border-color:#a87d6b}

/* aviso flotante */
.cf-toast{
  position:fixed;left:50%;bottom:26px;transform:translate(-50%,14px);
  background:#2e2622;color:#fff;border-radius:8px;padding:11px 20px;
  font-size:12px;letter-spacing:1px;opacity:0;pointer-events:none;
  transition:opacity .25s,transform .25s;z-index:10000;
}
.cf-toast.cf-on{opacity:1;transform:translate(-50%,0)}

@media (max-width:640px){
  .cf-modal{padding:0}
  .cf-panel{max-width:none;max-height:none;height:100vh;height:100dvh;border-radius:0}
  .cf-pie{gap:6px;padding:10px 12px}
  .cf-pie button,.cf-pie a{padding:9px 11px;font-size:10px;letter-spacing:1.2px}
}

@media (prefers-reduced-motion:reduce){
  .cf-modal,.cf-panel{transition:none}
}

@media print{.cf-btn,.cf-modal,.cf-toast{display:none!important}}
