/* ============================================================
   Cafetería y Pastelería MIL HOJAS - Estilos web pública
   Paleta cálida, artesanal y elegante. Mobile first.
   ============================================================ */
:root {
  --crema: #f7efe3;
  --crema-2: #fbf6ee;
  --cafe: #6f4e37;
  --cafe-osc: #3f2d21;
  --dorado: #c9a227;
  --dorado-suave: #e3c878;
  --marron: #8d6e63;
  --blanco: #ffffff;
  --texto: #3a2c22;
  --texto-suave: #6b5a4d;
  --sombra: 0 10px 30px rgba(63, 45, 33, 0.12);
  --sombra-sm: 0 4px 14px rgba(63, 45, 33, 0.1);
  --radio: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texto);
  background: var(--crema);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, .marca { font-family: 'Playfair Display', Georgia, serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.contenedor { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; }
.sec-titulo { text-align: center; margin-bottom: 14px; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--cafe-osc); }
.sec-sub { text-align: center; color: var(--texto-suave); max-width: 620px; margin: 0 auto 46px; }
.adorno { display: block; width: 70px; height: 4px; border-radius: 4px; margin: 10px auto 0; background: linear-gradient(90deg, var(--dorado), var(--dorado-suave)); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 50px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primario { background: var(--cafe); color: #fff; box-shadow: var(--sombra-sm); }
.btn-primario:hover { background: var(--cafe-osc); transform: translateY(-2px); }
.btn-wsp { background: #25d366; color: #fff; }
.btn-wsp:hover { background: #20bd5a; transform: translateY(-2px); }
.btn-secundario { background: transparent; color: var(--cafe-osc); border-color: var(--cafe); }
.btn-secundario:hover { background: var(--cafe); color: #fff; }
.btn-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.btn-ig:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ---------- Header / nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 238, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--max); margin: 0 auto; }
.marca { font-size: 1.25rem; font-weight: 700; color: var(--cafe-osc); display: flex; align-items: center; gap: 10px; }
.marca .ico { font-size: 1.5rem; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--texto-suave); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--cafe); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--cafe-osc); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 86vh; display: flex; align-items: center;
  background:
    linear-gradient(rgba(63, 45, 33, 0.55), rgba(63, 45, 33, 0.65)),
    url('https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1600&q=80') center/cover;
  color: #fff; text-align: center;
}
.hero-bg-fallback { background-color: var(--cafe); }
.hero-inner { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.1; margin-bottom: 18px; text-shadow: 0 4px 20px rgba(0,0,0,.3); }
.hero p.sub { font-size: clamp(1.05rem, 2.5vw, 1.4rem); margin-bottom: 34px; opacity: .96; }
.hero .acciones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .badge { display: inline-block; background: var(--dorado); color: var(--cafe-osc); font-weight: 600; padding: 6px 16px; border-radius: 50px; font-size: .85rem; margin-bottom: 22px; letter-spacing: .5px; }

/* ---------- Sobre nosotros ---------- */
.sobre { background: var(--crema-2); }
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.sobre-img { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); aspect-ratio: 4/3; background: var(--dorado-suave) url('https://images.unsplash.com/photo-1551024601-bec78aea704b?auto=format&fit=crop&w=900&q=80') center/cover; }
.sobre-texto h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--cafe-osc); margin-bottom: 18px; }
.sobre-texto p { color: var(--texto-suave); font-size: 1.08rem; margin-bottom: 16px; }
.sobre-feats { display: flex; gap: 24px; margin-top: 22px; flex-wrap: wrap; }
.feat { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--cafe); }
.feat .ico { font-size: 1.5rem; }

/* ---------- Productos destacados ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-sm);
  transition: transform .2s ease, box-shadow .2s ease; border: 1px solid rgba(111,78,55,.06);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sombra); }
.card-img { height: 170px; background-size: cover; background-position: center; position: relative; }
.card-emoji { height: 170px; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: linear-gradient(135deg, var(--crema), var(--dorado-suave)); }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 1.2rem; color: var(--cafe-osc); margin-bottom: 6px; }
.card-body p { color: var(--texto-suave); font-size: .92rem; }

/* ---------- Menú digital ---------- */
.menu { background: var(--crema-2); }
.menu-cats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.menu-cat-btn { padding: 9px 20px; border-radius: 50px; border: 1.5px solid var(--marron); background: #fff; color: var(--cafe); font-weight: 600; cursor: pointer; font-size: .9rem; transition: all .2s; }
.menu-cat-btn.activo, .menu-cat-btn:hover { background: var(--cafe); color: #fff; border-color: var(--cafe); }
.menu-grupo { margin-bottom: 40px; }
.menu-grupo h3 { font-size: 1.5rem; color: var(--cafe-osc); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; border-bottom: 2px dashed var(--dorado-suave); padding-bottom: 8px; }
.menu-items { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.menu-item { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-bottom: 1px dotted rgba(141,110,99,.3); }
.menu-item .info { flex: 1; }
.menu-item .nom { font-weight: 600; color: var(--cafe-osc); }
.menu-item .desc { font-size: .85rem; color: var(--texto-suave); }
.menu-item .precio { font-weight: 700; color: var(--cafe); white-space: nowrap; font-family: 'Playfair Display', serif; }
.menu-item.agotado { opacity: .5; }
.no-disp { font-size: .72rem; background: #e7d9c9; color: var(--cafe-osc); padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.menu-aviso { text-align: center; color: var(--texto-suave); font-style: italic; }

/* ---------- Franja CTA ---------- */
.cta-franja { background: linear-gradient(135deg, var(--cafe), var(--cafe-osc)); color: #fff; text-align: center; }
.cta-franja h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.cta-franja p { opacity: .9; margin-bottom: 26px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Ubicación / horarios / contacto ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-card { background: #fff; border-radius: var(--radio); padding: 30px; box-shadow: var(--sombra-sm); }
.info-card h3 { color: var(--cafe-osc); font-size: 1.4rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.info-card p { color: var(--texto-suave); margin-bottom: 12px; }
.info-card .dato { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.info-card .dato .ico { font-size: 1.3rem; color: var(--dorado); }
.mapa { width: 100%; border: 0; border-radius: var(--radio); min-height: 300px; box-shadow: var(--sombra-sm); }
.horarios-lista { list-style: none; }
.horarios-lista li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dotted rgba(141,110,99,.3); }

/* ---------- Footer ---------- */
footer.pie { background: var(--cafe-osc); color: #e9ddd0; padding: 50px 0 24px; }
.pie-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.pie h4 { color: #fff; margin-bottom: 14px; font-family: 'Playfair Display', serif; }
.pie a { color: #cdbcab; display: block; margin-bottom: 8px; transition: color .2s; }
.pie a:hover { color: var(--dorado-suave); }
.pie .marca-pie { font-size: 1.3rem; color: #fff; margin-bottom: 12px; }
.pie-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: .82rem; color: #b09e8d; }
.pie-bottom .vialtrix { font-size: .75rem; opacity: .7; margin-top: 6px; }

/* ---------- WhatsApp flotante ---------- */
.wsp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
  box-shadow: 0 8px 22px rgba(37,211,102,.5); transition: transform .2s;
  animation: pulse 2.4s infinite;
}
.wsp-float:hover { transform: scale(1.1); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5);} 70%{ box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100%{ box-shadow: 0 0 0 0 rgba(37,211,102,0);} }

/* ---------- Chatbot ---------- */
.chat-toggle {
  position: fixed; bottom: 22px; left: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: var(--cafe); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; cursor: pointer;
  box-shadow: var(--sombra); border: none; transition: transform .2s;
}
.chat-toggle:hover { transform: scale(1.08); }
.chat-panel {
  position: fixed; bottom: 90px; left: 22px; z-index: 61; width: min(340px, calc(100vw - 44px));
  background: #fff; border-radius: 18px; box-shadow: var(--sombra); overflow: hidden;
  display: flex; flex-direction: column; max-height: 70vh; transform: translateY(20px) scale(.96); opacity: 0; pointer-events: none; transition: all .25s ease;
}
.chat-panel.abierto { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-header { background: var(--cafe); color: #fff; padding: 16px; display: flex; align-items: center; gap: 12px; }
.chat-header .av { width: 38px; height: 38px; border-radius: 50%; background: var(--dorado); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-header .tit { font-weight: 600; font-size: .95rem; }
.chat-header .est { font-size: .72rem; opacity: .85; }
.chat-header .cerrar { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.chat-body { padding: 16px; overflow-y: auto; flex: 1; background: var(--crema-2); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.4; }
.msg.bot { background: #fff; color: var(--texto); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: var(--sombra-sm); }
.msg.user { background: var(--cafe); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; background: #fff; border-top: 1px solid rgba(0,0,0,.06); }
.chat-quick button { font-size: .78rem; padding: 7px 12px; border-radius: 50px; border: 1px solid var(--marron); background: #fff; color: var(--cafe); cursor: pointer; transition: all .15s; }
.chat-quick button:hover { background: var(--cafe); color: #fff; }

/* ---------- Reveal animación ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sobre-grid, .info-grid { grid-template-columns: 1fr; }
  .menu-items { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--crema-2); padding: 16px 20px; gap: 14px; box-shadow: var(--sombra-sm); }
  .nav-links.abierto { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .hero { min-height: 78vh; }
}
