@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Source+Sans+3:wght@400;500;600&family=Source+Code+Pro:wght@400;500;600;700&display=swap');

:root{
  /* Paleta oficial Cloe */
  --cream: #F5F5EB;
  --oat: #E1D9CB;
  --pale-pink: #F0E7DA;
  --rust: #B3907B;
  --muted-brown: #C1B6A3;
  --brown: #918674;
  --black: #1A1A1A;
  --white: #FFFFFF;

  --bg: var(--cream);
  --bg-soft: var(--pale-pink);
  --ink: var(--black);
  --ink-soft: var(--brown);
  --card: var(--white);
  --line: var(--oat);
  --rose: var(--rust);
  --rose-deep: #8F6E58;
  --rose-bg: var(--pale-pink);
  --radius: 0px;
  --font-display: 'Figtree', sans-serif;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3, .display{
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0;
}

a{ color: inherit; }

.eyebrow{
  font-family: 'Source Code Pro', monospace;
  display:block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ---------- header ---------- */
.site-header{
  padding: 22px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position: sticky;
  top:0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  z-index: 10;
  border-bottom: 1px solid var(--line);
}
#siteHeader{ justify-content:center; }
.brand{
  font-family:'Figtree', sans-serif;
  font-size: 1.3rem;
  font-weight:600;
  letter-spacing: 0.01em;
}
.brand span{ color: var(--rose); }

/* ---------- hero ---------- */
.hero{
  background: var(--bg-soft);
  padding: 90px 24px 70px;
  text-align:center;
}
.hero .eyebrow{ display:flex; justify-content:center; }
.hero h1{
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.12;
  max-width: 760px;
  margin: 0 auto;
}
.hero p{
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 18px;
  line-height: 1.6;
  max-width: 560px;
  margin-left:auto;
  margin-right:auto;
}

/* ---------- branch filter ---------- */
.branch-filter{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  padding: 40px 24px 8px;
}
.pill{
  font-family: 'Source Code Pro', monospace;
  border:1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing:0.02em;
  cursor:pointer;
  transition: all .15s ease;
}
.pill:hover{ border-color: var(--rose); color: var(--ink); }
.pill.active{
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------- treatments grid (editorial style) ---------- */
.grid{
  max-width: 1160px;
  margin: 24px auto 100px;
  padding: 0 32px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px 32px;
}

.card{
  display:flex;
  flex-direction:column;
}
.card-img{
  width:100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--rose-bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: opacity .2s ease;
}
.card:hover .card-img{ opacity: 0.88; }
.card-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.card h3{ font-size: 1.3rem; }
.card p{
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height:1.55;
  margin:0;
}
.tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:2px;
}
.tag{
  font-size:0.7rem;
  letter-spacing:0.03em;
  color: var(--ink-soft);
  padding: 0;
}
.tag:not(:last-child)::after{ content: "·"; margin-left:6px; color: var(--line); }
.schedule-text{
  font-size: 0.78rem;
  color: var(--rose-deep);
  margin: 0;
  font-weight: 500;
}

.avail{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin: 4px 0 2px;
}
.avail-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.avail-branch{
  font-weight: 600;
  color: var(--ink);
}

.short-desc{
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.ver-mas-btn{
  align-self: flex-start;
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rose-deep);
  text-decoration: underline;
  cursor: pointer;
}
#popupBody p{
  margin:0;
  font-size: 0.9rem;
  line-height:1.6;
  color: var(--ink-soft);
}
#popupBody p strong{
  display:block;
  color: var(--ink);
  font-weight:600;
  margin-bottom:2px;
}
.quiz-banner{
  display:block;
  width: calc(100% - 64px);
  max-width: 1080px;
  margin: 8px auto 0;
  background: var(--quiz-btn-bg, var(--ink));
  color: var(--quiz-btn-text, var(--bg));
  border: 1.5px solid var(--quiz-btn-border, var(--ink));
  padding: 18px 24px;
  border-radius: var(--quiz-btn-radius, 999px);
  font-family: 'Figtree', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: opacity .15s ease;
}
.quiz-banner:hover{ opacity: 0.85; }

.quiz-opt-btn{
  display:block;
  width:100%;
  text-align:left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease;
}
.quiz-opt-btn:hover{ border-color: var(--rose); }

#floatingWaBtn{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 40;
  transition: transform .15s ease;
}
#floatingWaBtn:hover{ transform: scale(1.06); }
.wa-btn{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  color: var(--wa-btn-text, #FFFFFF);
  text-decoration:none;
  font-size:0.88rem;
  font-weight:600;
  align-self:flex-start;
  padding: 9px 18px;
  border-radius: var(--wa-btn-radius, 999px);
  background: var(--wa-btn-bg, var(--rose));
  border: 1.5px solid var(--wa-btn-border, var(--rose));
  transition: opacity .15s ease;
}
.wa-btn:hover{ opacity: 0.82; }

/* ---------- jornadas ---------- */
.jornada-card{
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.jornada-card h3{ font-size: 1.6rem; margin: 2px 0 12px; }
.slots{ display:flex; flex-direction:column; gap:6px; }
.slot-item{
  display:flex;
  justify-content:space-between;
  font-size: 0.85rem;
  padding: 7px 10px;
  border-radius: 6px;
  background: #fff;
}
.slot-libre{ color: var(--sage-text, #4E7A5C); }
.slot-libre > *:last-child{ font-weight:600; color:#4E7A5C; }
.slot-ocupado > *:last-child{ font-weight:600; color:#B24A3C; }
.slot-reservado{ background: #EAF0F5 !important; }
.slot-reservado > *:last-child{ font-weight:600; color:#4A6D8C; }
.slot-confirmado{ background: var(--pale-pink) !important; }
.slot-confirmado > *:last-child{ font-weight:600; color: var(--rose-deep); }
.slot-cancelado > *:last-child{ font-weight:600; color:#9A9187; text-decoration:line-through; }
.slot-noasistio > *:last-child{ font-weight:600; color:#C2453A; }

/* ---------- states ---------- */
.state-msg{
  text-align:center;
  color: var(--ink-soft);
  padding: 60px 24px;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- footer / contact band ---------- */
.contact-band{
  background: var(--ink);
  color: #F6EEEC;
  text-align:center;
  padding: 70px 24px;
}
.contact-band .eyebrow{ color: var(--rose); justify-content:center; display:flex; }
.contact-band h2{ font-size: clamp(1.8rem, 4vw, 2.6rem); color:#fff; }
.contact-band p{ color:#CDBFBC; max-width:480px; margin: 16px auto 26px; line-height:1.6; }
.contact-band .wa-cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: var(--rose);
  color:#fff;
  text-decoration:none;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight:600;
  font-size:0.95rem;
  transition: background .15s ease;
}
.contact-band .wa-cta:hover{ background: var(--rose-deep); }

.site-footer{
  padding: 28px 24px 50px;
  text-align:center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height:1.8;
  background: var(--ink);
}
.site-footer strong{ color: #fff; }

/* ---------- admin ---------- */
.admin-wrap{
  max-width: 880px;
  margin: 0 auto;
  padding: 24px;
}
.login-wrap{
  max-width: 380px;
  margin: 90px auto;
  padding: 32px;
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
}
.field{ margin-bottom: 16px; }
.field label{
  display:block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom:6px;
}
input[type=text], input[type=email], input[type=password], input[type=number], textarea{
  width:100%;
  padding: 10px 12px;
  border:1px solid var(--line);
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  background: #fff;
}
textarea{ min-height: 90px; resize: vertical; }
.checks{ display:flex; gap:14px; flex-wrap:wrap; }
.checks label{ display:flex; align-items:center; gap:6px; font-size:0.9rem; }
.btn{
  background: var(--ink);
  color: #fff;
  border:none;
  padding: 11px 20px;
  border-radius: 8px;
  font-size:0.92rem;
  font-weight:500;
  cursor:pointer;
}
.btn:hover{ background: var(--rose-deep); }
.btn-ghost{
  background:transparent;
  color: var(--ink-soft);
  border:1px solid var(--line);
}
.btn-danger{
  background:transparent;
  color: #B24A3C;
  border:1px solid #E9C9C2;
}
.admin-row{
  display:flex;
  gap:16px;
  align-items:center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row img{
  width:64px; height:64px; object-fit:cover; border-radius:8px; background:var(--rose-bg);
}
.admin-row .meta{ flex:1; }
.admin-row .meta h4{ margin:0 0 4px; font-family:'Figtree',sans-serif; font-weight:500; }
.admin-row .meta span{ color: var(--ink-soft); font-size:0.82rem; }
.admin-actions{ display:flex; gap:8px; }
.top-bar{
  display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;
}
.modal-bg{
  position:fixed; inset:0; background: rgba(34,31,31,0.5);
  display:flex; align-items:center; justify-content:center; padding:20px; z-index:50;
}
.modal{
  background:#fff; border-radius: var(--radius); padding:28px; max-width:480px; width:100%;
  max-height: 88vh; overflow-y:auto;
}
.error-msg{ color:#B24A3C; font-size:0.85rem; margin-top:8px; }
.hint{ color: var(--ink-soft); font-size:0.8rem; margin-top:4px; }
