/* Cookabot — estilos (Astro). Diseño limpio y responsive. */
:root {
  --bg: #f7f7f5; --card: #fff; --ink: #1f2a2e; --muted: #667079;
  --brand: #0f766e; --brand-d: #0b5a54; --accent: #f59e0b; --line: #e6e8ea;
  --radius: 14px; --shadow: 0 2px 10px rgba(0,0,0,.06); --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; padding: 11px 20px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--brand-d); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand-name { letter-spacing: -.5px; }
.main-nav { display: flex; gap: 18px; margin-left: 8px; margin-right: auto; }
.main-nav a { color: var(--ink); font-weight: 500; }
.lang-switch { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-opt { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 8px; border-radius: 999px; }
.lang-opt.is-active { background: var(--brand); color: #fff; }
.lang-opt:hover { text-decoration: none; }
.auth-area { margin-left: 4px; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0; }
.footer-links { margin: 0 0 8px; }
.footer-disc { margin: 0; }

/* Hero */
.hero { background: linear-gradient(160deg,#0f766e,#0b5a54); color: #fff; padding: 54px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); text-transform: uppercase; letter-spacing: -.5px; margin: 10px 0 12px; }
.hero-sub { max-width: 720px; margin: 0 auto 22px; font-size: 1.1rem; opacity: .95; }
.hero-sub b { color: #ffe9b8; }
.hero-free { display: inline-block; background: var(--accent); color: #3a2500; font-weight: 800; padding: 6px 14px; border-radius: 999px; font-size: .8rem; letter-spacing: .5px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.hero-search input { flex: 1; padding: 13px 16px; border-radius: 999px; border: 0; font-size: 1rem; }
.hero-search button { border: 0; background: var(--accent); color: #3a2500; font-weight: 700; padding: 0 22px; border-radius: 999px; cursor: pointer; }

/* Secciones home */
.home-sec { padding: 34px 0 8px; }
.home-sec > h2 { font-size: 1.5rem; }
.robot-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 14px; }
.robot-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); color: var(--ink); }
.robot-card:hover { border-color: var(--brand); text-decoration: none; }
.robot-card b { font-size: 1.05rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); font-size: .92rem; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip-count { color: var(--muted); font-size: .8rem; }

/* Grid de tarjetas de receta */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 16px; margin: 14px 0 22px; }
.recipe-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.1); text-decoration: none; }
.rc-emoji { font-size: 2.6rem; text-align: center; padding: 20px 0 8px; background: linear-gradient(160deg,#f0fdfa,#e6fffb); }
.rc-body { padding: 12px 14px 15px; }
.rc-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--brand); font-weight: 700; }
.rc-title { font-size: 1.02rem; margin: 4px 0 8px; }
.rc-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* Newsletter */
.newsletter { background: #fff7e6; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 0; margin-top: 30px; text-align: center; }
.nl-form { display: flex; gap: 8px; max-width: 460px; margin: 12px auto 6px; }
.nl-form input { flex: 1; padding: 12px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 1rem; }
.nl-form button { border: 0; background: var(--brand); color: #fff; font-weight: 700; padding: 0 22px; border-radius: 999px; cursor: pointer; }

.seo-intro { max-width: 820px; }
.seo-intro p { color: #3a464c; }

/* Listado + filtros */
.listing { padding-top: 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.filters input, .filters select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; background: #fff; }
.filters #fSearch { flex: 1; min-width: 200px; }

/* Hub */
.hub { padding-top: 24px; }
.hub h1 { font-size: clamp(1.6rem,4vw,2.3rem); }
.hub-intro { max-width: 820px; color: #3a464c; font-size: 1.05rem; }
.cmp { border-collapse: collapse; margin: 12px 0 26px; width: 100%; max-width: 560px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.cmp th, .cmp td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.cmp th { background: #f0fdfa; }

/* FAQ */
.faq { margin: 28px 0; max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 8px 0 0; color: #3a464c; }

/* Página de receta */
.recipe-page { padding-top: 20px; max-width: 960px; }
.crumbs { color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.recipe-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.recipe-emoji { font-size: 3.4rem; background: linear-gradient(160deg,#f0fdfa,#e6fffb); border-radius: var(--radius); padding: 14px 20px; }
.recipe-head h1 { font-size: clamp(1.5rem,4vw,2.2rem); margin: 4px 0 8px; }
.recipe-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); font-weight: 700; }
.diet-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.diet-badge { background: #e6fffb; color: var(--brand-d); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; }
.recipe-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 22px; }
.recipe-facts > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; text-align: center; min-width: 92px; }
.recipe-facts b { display: block; font-size: 1.05rem; }
.recipe-facts span { font-size: .76rem; color: var(--muted); }
.recipe-cols { display: grid; grid-template-columns: 1fr 1.7fr; gap: 30px; }
.block-title { font-size: 1.2rem; border-bottom: 2px solid var(--brand); display: inline-block; padding-bottom: 3px; }
.ing-list { padding-left: 18px; }
.ing-list li { margin-bottom: 6px; }
.step-list { padding-left: 22px; }
.step-list li { margin-bottom: 12px; }
.machine-picker { margin: 6px 0 14px; }
.mp-label { font-size: .85rem; color: var(--muted); display: block; margin-bottom: 6px; }
.mp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: .88rem; }
.mp-btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tips-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 18px; margin: 22px 0; }
.tips-box h2 { font-size: 1.1rem; margin-top: 0; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag { background: #eef2f3; border-radius: 999px; padding: 4px 11px; font-size: .82rem; color: var(--muted); }
.related { margin-top: 34px; }

/* Trucos */
.trucos-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 16px; margin-top: 18px; }
.truco-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.truco-emoji { font-size: 1.8rem; }

/* Prose (páginas de texto) */
.prose { max-width: 780px; padding: 26px 18px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.4em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Banner cookies */
#cookieBanner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none; }
#cookieBanner.is-visible { display: block; }
.cookie-inner { max-width: var(--wrap); margin: 0 auto; background: #1f2a2e; color: #fff; border-radius: 12px 12px 0 0; padding: 14px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: 0 -4px 18px rgba(0,0,0,.2); }
.cookie-inner p { margin: 0; flex: 1; min-width: 220px; font-size: .9rem; }
.cookie-inner a { color: #ffe9b8; }
.cookie-actions { display: flex; gap: 8px; }

/* ===== Comunidad / login (cb-*, ua-*) ===== */
.auth-area .ua-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.ua-signin { background: var(--brand); color: #fff; border-color: var(--brand); }
.ua-box { display: flex; align-items: center; gap: 8px; }
.ua-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ua-initial { background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ua-name { font-weight: 600; font-size: .9rem; }
.community { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; }
.cb-title { }
.cb-muted { color: var(--muted); }
.cb-list { margin: 12px 0; }
.cb-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cb-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.cb-initial { background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cb-body { flex: 1; }
.cb-uname { font-weight: 600; font-size: .9rem; }
.cb-photo { border-radius: 10px; margin: 6px 0; max-height: 320px; width: auto; }
.cb-stars { color: var(--accent); letter-spacing: 2px; }
.cb-imp { background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 1px 6px; font-size: .8rem; }
.cb-avg { background: #f0fdfa; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.cb-cta { background: #f0fdfa; border-radius: 12px; padding: 16px; text-align: center; }
.cb-forms { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.cb-star-input { font-size: 1.5rem; color: var(--accent); cursor: pointer; }
.cb-si { cursor: pointer; }
.cb-text { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-family: inherit; margin: 8px 0; }
.cb-extra { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cb-file-lbl { cursor: pointer; }
.cb-file { display: none; }
.cb-msg { margin-top: 8px; font-size: .9rem; }
.cb-ok { color: var(--brand); }
.cb-bad { color: #c0392b; }
.cb-del-one { background: none; border: 0; cursor: pointer; font-size: 1rem; }
.cb-modact { display: flex; gap: 8px; align-items: center; }
.cb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 18px; }
.cb-overlay.is-hidden { display: none; }
.cb-card { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 380px; position: relative; }
.cb-card.cb-mod { max-width: 620px; max-height: 84vh; overflow: auto; }
.cb-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; }
.cb-google { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; }
.cb-or { text-align: center; color: var(--muted); margin: 12px 0; }
.cb-card input { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.cb-actions { display: flex; gap: 8px; }
.cb-actions button { flex: 1; padding: 11px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 600; }
.cb-login { background: var(--brand); color: #fff; }
.cb-signup { background: #eef2f3; }
.cb-err { color: #c0392b; font-size: .85rem; min-height: 1em; }
.cb-pend { flex-direction: column; align-items: flex-start; }

/* Responsive */
@media (max-width: 760px) {
  .recipe-cols { grid-template-columns: 1fr; gap: 20px; }
  .main-nav { gap: 12px; font-size: .92rem; }
}
@media (max-width: 560px) {
  .main-nav a:nth-child(n+3) { display: none; }
  .hero-search, .nl-form { flex-direction: column; }
  .hero-search input, .hero-search button, .nl-form input, .nl-form button { width: 100%; }
  .ua-tx { display: none; }
}
