/* Refugio Magno · web v8 · verde claro */
:root {
  --bg: #f4f7f3; --tx: #22302a; --mu: #5f6e66; --ln: #dce5de; --card: #fff;
  --ac: #3f6b55; --ac-ink: #fff; --hi: #8fb36b; --hi-ink: #16260f; --soft: #e5eee8; --deep: #2b4a3b;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-d: "Bitter", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 16px/1.5 var(--font-ui); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1 { font-family: var(--font-d); font-weight: 800; line-height: 1.06; letter-spacing: -.01em; margin: 0; color: var(--deep); text-wrap: balance; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem var(--font-ui); border-radius: 999px; padding: 12px 18px; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; }
.b1 { background: var(--ac); color: var(--ac-ink); }
.b3 { background: transparent; color: var(--ac); box-shadow: inset 0 0 0 2px var(--ac); }
.btn:focus-visible, .fab:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }

/* Cabecera */
.nav { position: relative; z-index: 3; }
.navin { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { font-family: var(--font-d); font-weight: 700; font-size: 1.2rem; color: var(--ac); text-decoration: none; margin-right: auto; }
.links { display: none; gap: 22px; }
.links a { text-decoration: none; font-weight: 600; color: var(--tx); }
.links a:hover { color: var(--ac); }
.info { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ac); background: transparent; color: var(--ac); font: 700 1.05rem var(--font-d); cursor: pointer; display: grid; place-items: center; }

/* Portada */
.hero { position: relative; }
.hero .ph img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; }
.hero .htxt { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 80px; padding-bottom: 6px; background: linear-gradient(transparent, var(--bg) 58%); }
.hero h1 { font-size: clamp(1.9rem, 7.6vw, 3.4rem); max-width: 18ch; }
.guide { padding-top: 14px; padding-bottom: 28px; display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--ln); border-radius: 18px; overflow: hidden; display: grid; text-decoration: none; color: inherit; }
.tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.tile div { padding: 10px; display: grid; gap: 6px; }
.tile b { font-family: var(--font-d); font-size: 1.12rem; }
.tile .btn { padding: 10px 8px; font-size: .88rem; }
.combo { width: 100%; }

/* Listas */
.lh { padding-top: 2px; padding-bottom: 14px; }
.lh h1 { font-size: 2rem; }
.back { font-weight: 600; font-size: .92rem; color: var(--ac); text-decoration: none; }
.cards { display: grid; gap: 12px; padding-bottom: 28px; }
.card { position: relative; background: var(--card); border: 1px solid var(--ln); border-radius: 18px; overflow: hidden; display: grid; grid-template-columns: 132px 1fr; text-decoration: none; color: inherit; }
.card img { width: 100%; height: 100%; min-height: 124px; object-fit: cover; }
.card div { padding: 12px; display: grid; gap: 2px; align-content: center; }
.card b { font-family: var(--font-d); font-size: 1.18rem; color: var(--deep); }
.card small { color: var(--mu); font-size: .9rem; }
.card .go { margin-top: 8px; justify-self: start; padding: 8px 16px; font-size: .85rem; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--hi); color: var(--hi-ink); font: 700 .72rem var(--font-ui); padding: 4px 9px; border-radius: 999px; }

/* Producto */
.pp { padding-bottom: 28px; }
.gal { position: relative; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3.3; background: var(--soft); }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide.draw { display: grid; place-items: center; }
.slide.draw svg { width: 80%; }
.gal .count { position: absolute; right: 12px; bottom: 12px; background: rgba(20,30,25,.6); color: #fff; font: 600 .78rem var(--font-ui); padding: 4px 10px; border-radius: 999px; }
.gal .badge { top: 14px; left: 14px; }
.pp .body { display: grid; gap: 10px; padding-top: 10px; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.th { flex: none; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; padding: 0; border: 0; cursor: pointer; opacity: .6; background: var(--soft); }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th.draw { display: grid; place-items: center; }
.th.draw svg { width: 88%; }
.th.on { opacity: 1; box-shadow: 0 0 0 2px var(--ac); }
.pp h1 { font-size: 2rem; }
.for { margin: -4px 0 0; font-size: 1.05rem; color: var(--mu); }
.infob { padding: 13px 16px; }

/* Pie */
.foot { background: var(--deep); color: #e8f0ea; padding: 22px 0 96px; }
.foot .wrap { display: grid; gap: 12px; }
.foot b { font-family: var(--font-d); font-size: 1.1rem; color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot li a { color: #e8f0ea; text-decoration: none; display: inline-flex; gap: 10px; align-items: center; }
.foot .ic { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.foot small { color: #a9bdb0; }
.foot small a { color: #c9d8ce; }

/* Botón flotante */
.fab { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 20; height: 56px; min-width: 56px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; background: var(--hi); color: var(--hi-ink); display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--font-ui); cursor: pointer; box-shadow: 0 6px 18px rgba(20,30,25,.3); transition: padding .25s, gap .25s; }
.fab .fi { display: grid; }
.fab svg { width: 24px; height: 24px; }
.fab .lbl { max-width: 140px; overflow: hidden; white-space: nowrap; transition: max-width .25s, opacity .2s; }
.fab.mini, .fab[aria-expanded="true"] { padding: 0; width: 56px; gap: 0; }
.fab.mini .lbl, .fab[aria-expanded="true"] .lbl { max-width: 0; opacity: 0; }
.fab[aria-expanded="true"] { background: var(--ac); color: #fff; }
.cpop { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 68px); z-index: 20; background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(20,30,25,.25); padding: 8px; display: grid; gap: 2px; min-width: 230px; }
.cpop[hidden] { display: none; }
.cpop a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--tx); font-weight: 600; }
.cpop a:hover { background: var(--soft); }
.cpop .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: .76rem; font-weight: 700; flex: none; }
.cpop .pp { background: var(--hi); color: var(--hi-ink); } .cpop .wa { background: #2f9e5a; } .cpop .tel { background: var(--ac); } .cpop .ml { background: #8a6a43; }
.cpop small { display: block; color: var(--mu); font-weight: 500; font-size: .8rem; }

/* Hoja de información */
.dim { position: fixed; inset: 0; background: rgba(20,30,25,.35); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 30px rgba(20,30,25,.22); padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-height: 86vh; overflow-y: auto; }
[hidden] { display: none !important; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--ln); justify-self: center; }
.sh-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sh-h h2 { margin: 0; font-family: var(--font-d); font-size: 1.25rem; color: var(--deep); }
.sh-h button { border: 0; background: var(--soft); border-radius: 999px; padding: 7px 14px; font: 600 .86rem var(--font-ui); color: var(--tx); cursor: pointer; }
.sheet dl { margin: 0; }
.sheet dl div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--ln); }
.sheet dl div:last-child { border-bottom: 0; }
.sheet dt { color: var(--mu); font-size: .9rem; }
.sheet dd { margin: 0; font-size: .93rem; }
.sheet .sec { font: 700 .74rem var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ac); margin: 6px 0 0; }
.sheet ul { margin: 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 3px; }

/* Ordenador */
@media (min-width: 760px) {
  .links { display: flex; }
  .hero .ph img { aspect-ratio: 16 / 7; }
  .hero .htxt { padding-top: 120px; }
  .two { gap: 18px; }
  .tile img { aspect-ratio: 4 / 3; }
  .tile div { padding: 16px; grid-template-columns: 1fr auto; align-items: center; }
  .tile b { font-size: 1.4rem; }
  .tile .btn { padding: 11px 20px; font-size: .95rem; }
  .combo { justify-self: center; width: auto; padding-left: 40px; padding-right: 40px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .card { grid-template-columns: 1fr; }
  .card img { aspect-ratio: 4 / 3; height: auto; }
  .card div { padding: 16px; }
  .lh h1, .pp h1 { font-size: 2.6rem; }
  .pp { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; align-items: start; padding-top: 6px; }
  .gal { margin: 0; border-radius: 20px; overflow: hidden; }
  .pp .body { padding-top: 0; }
  .pp .body .thumbs { order: 9; }
  .infob { justify-self: start; }
  .foot { padding-bottom: 40px; }
  .foot ul { grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 28px; }
  .sheet { left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%); width: min(520px, 92vw); border-radius: 22px; max-height: 84vh; }
  .grab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fab, .fab .lbl { transition: none; } }
