/* Design proposal A styles. */
:root {
  --bg: #FFF9EC; --paper: #FFFFFF; --sun: #FFD45C; --sun-soft: #FFEFB8;
  --teal: #1F7A72; --teal-soft: #DDF1EE; --ink: #2A3B3A; --muted: #5B6B69;
  --coral: #F08A6A; --sky: #E6F4FA; --radius: 26px;
  --shadow: 0 10px 30px rgba(42, 59, 58, .10);
  --font: "Segoe UI Variable Display", "Segoe UI", ui-rounded, system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 1.05rem; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.tag { display: inline-block; background: var(--sun-soft); color: #7A5A00; font-weight: 700; font-size: .85rem; padding: .25em .8em; border-radius: 99px; margin-bottom: .8em; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.5em; border-radius: 99px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-buy { background: var(--teal); color: #fff; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 2px solid var(--teal-soft); }

/* Header */
header { position: sticky; top: 0; z-index: 20; background: rgba(255, 249, 236, .9); backdrop-filter: blur(8px); border-bottom: 1px solid #F3E6C4; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.logo img { width: 128px; height: auto; }
nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
nav a { display: block; padding: .5em .8em; border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; transition: background .2s; }
nav a:hover { background: var(--sun-soft); }
.menu-btn { display: none; background: none; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 1.2rem; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  nav { position: absolute; inset: 100% 0 auto; background: var(--bg); border-bottom: 1px solid #F3E6C4; display: none; }
  nav.open { display: block; }
  nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .bar .btn-buy { padding: .6em 1em; }
}

/* Hero */
.hero { position: relative; padding: 48px 0 80px; overflow: hidden; background: linear-gradient(180deg, var(--sky), var(--bg)); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); }
.hero h1 span { color: var(--teal); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero-balam { justify-self: center; width: min(320px, 78vw); text-align: center; }
.hero-balam small { display: block; color: var(--muted); margin-top: 6px; }
.cloud { position: absolute; background: #fff; border-radius: 99px; opacity: .9; animation: drift linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 50%; height: 160%; left: 15%; bottom: 20%; }
.cloud::after { width: 35%; height: 120%; right: 15%; bottom: 25%; }
.c1 { width: 140px; height: 40px; top: 14%; animation-duration: 48s; }
.c2 { width: 90px; height: 28px; top: 40%; animation-duration: 36s; animation-delay: -18s; }
.c3 { width: 180px; height: 48px; top: 70%; animation-duration: 60s; animation-delay: -30s; opacity: .6; }
@keyframes drift { from { transform: translateX(-220px); } to { transform: translateX(110vw); } }

/* Sections & cards */
section { padding: 72px 0; }
.center { text-align: center; max-width: 40em; margin: 0 auto 36px; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; }
.card:hover, .card:focus-within { transform: translateY(-6px) scale(1.03); box-shadow: 0 18px 40px rgba(42, 59, 58, .16); }

/* Books */
.book { display: flex; flex-direction: column; }
.book .cover { border-radius: 16px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 4 / 5; background: var(--teal-soft); }
.book .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.book:hover .cover img { transform: scale(1.06) rotate(-1deg); }
.book p { color: var(--muted); flex: 1; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.ribbon { position: absolute; top: 14px; left: 14px; background: var(--coral); color: #3A1A0E; font-weight: 800; font-size: .8rem; padding: .25em .8em; border-radius: 99px; }
.book { position: relative; }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.soon .cover { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--sun-soft), var(--sun-soft) 14px, #FFF5D6 14px, #FFF5D6 28px); }
.soon .cover span { font-size: 4rem; }
@media (max-width: 700px) { .soon .cover { aspect-ratio: auto; height: 140px; } }

.packs { margin-top: 28px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pack { display: flex; gap: 16px; align-items: center; border: 3px dashed var(--sun); background: #FFFDF5; }
.pack .emoji { font-size: 2.6rem; }
.pack h3 { margin: 0; }
.pack .save { background: var(--teal-soft); color: var(--teal); font-weight: 800; border-radius: 99px; padding: .1em .7em; font-size: .85rem; }
.pay-note { margin-top: 22px; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; background: var(--paper); border-radius: 18px; padding: 14px 18px; }

/* About */
.about { background: var(--sun-soft); }
.about .wrap { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) { .about .wrap { grid-template-columns: .8fr 1.2fr; } }
.photo { position: relative; justify-self: center; width: min(360px, 86vw); }
.photo img { border-radius: 50% 50% 46% 54% / 40% 44% 56% 60%; box-shadow: var(--shadow); aspect-ratio: 3 / 4; object-fit: cover; }
.photo .bubble { position: absolute; right: -6px; bottom: 18px; background: #fff; border-radius: 20px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 22px; }
.fact { padding: 16px 18px; }
.fact b { display: block; font-size: 1.5rem; color: var(--teal); }
.donate { margin-top: 22px; background: var(--teal); color: #fff; border-radius: var(--radius); padding: 22px; display: flex; gap: 14px; align-items: center; }
.donate span { font-size: 2.2rem; }

/* Gallery & community */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.tile { aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center; text-align: center; padding: 10px; font-weight: 700; color: var(--muted); background: var(--teal-soft); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.tile:nth-child(3n+2) { background: var(--sun-soft); } .tile:nth-child(3n) { background: #FBE3DA; }
.tile:hover { transform: rotate(-2deg) scale(1.06); }
.upload { margin-top: 28px; display: grid; gap: 20px; align-items: center; background: var(--paper); }
@media (min-width: 760px) { .upload { grid-template-columns: auto 1fr auto; } }
.upload .peek { width: 120px; height: 110px; justify-self: center; }
.steps { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 8px 0 0; list-style: none; color: var(--muted); font-size: .95rem; }

/* Map */
.places { display: grid; gap: 22px; }
@media (min-width: 860px) { .places { grid-template-columns: 1fr 1.3fr; } }
.place { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; }
.place .pin { font-size: 1.6rem; }
.map { min-height: 320px; border-radius: var(--radius); background: linear-gradient(135deg, var(--teal-soft), var(--sky)); display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; border: 3px dashed #BFE3DE; }

/* Contact */
.contact { text-align: center; background: linear-gradient(180deg, var(--bg), var(--sun-soft)); }
.contact .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

footer { background: var(--ink); color: #E7EFEE; padding: 36px 0 110px; font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer a { color: var(--sun); }
footer img { width: 160px; filter: invert(1); opacity: .85; }

/* Floating buy button (always reachable) */
@keyframes pulse { 50% { box-shadow: 0 10px 30px rgba(31, 122, 114, .4), 0 0 0 10px rgba(31, 122, 114, .12); } }

/* Scroll reveal (only when JS is available) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

.proposal-note { background: #2A3B3A; color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; }
.proposal-note a { color: var(--sun); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Dynamic sections (offers, locations, map) */
.buy-form { display: inline; margin: 0; }
.buy-form button { font-family: inherit; }
.map iframe, [data-map] iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: inherit; display: block; }
[data-map]:has(iframe) { padding: 0; border: 0; }
.map-note { display: block; font-size: .85rem; margin-top: 10px; max-width: 36ch; justify-self: center; }
.map-btn { margin-top: 8px; background: none; border: 2px solid currentColor; color: inherit; border-radius: 99px; padding: .3em .9em; font: inherit; font-weight: 700; cursor: pointer; opacity: .85; }
.map-btn[aria-pressed="true"] { background: #1F7A72; border-color: #1F7A72; color: #fff; opacity: 1; }
.place-meta { display: block; font-size: .92rem; opacity: .85; }
.place-meta small { font-size: .85em; }
/* Points of sale: a list the author fills; long lists show the first ones and "Ver más puntos de venta…" (site.js) */
.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.place-list.is-collapsed > .is-extra { display: none; }
.place > div { min-width: 0; overflow-wrap: anywhere; }
.place-btns { display: flex; flex-wrap: wrap; gap: 8px; }
a.map-btn { display: inline-block; text-decoration: none; }
.open-now { display: inline-block; margin: 4px 0 2px; font-size: .9rem; font-weight: 800; color: #A3412E; }
.open-now::before { content: "● "; }
.open-now.is-open { color: #157A4C; }
.place-col .places-more { display: block; margin: 14px auto 0; }
@media (min-width: 860px) { .places > .map { position: sticky; top: 110px; align-self: start; min-height: 420px; } }
.place-col .add-place { margin-top: 14px; min-height: 0; padding: 18px; }
/* Announcement bar (edited in the panel) */
.site-banner { display: block; text-align: center; padding: 10px 16px; background: #FFD45C; color: #2A3B3A; font-weight: 700; text-decoration: none; }
.site-banner:hover { text-decoration: underline; }

/* Real gallery photos + lightbox */
.photo-open { all: unset; cursor: zoom-in; display: block; position: relative; border-radius: 20px; overflow: hidden; }
.photo-open:focus-visible { outline: 3px solid #2A3B3A; outline-offset: 3px; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.photo-open:hover img { transform: scale(1.06); }
.photo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.photo-card { margin: 0; }
.photo-card .photo-open { aspect-ratio: 4 / 3; box-shadow: 0 10px 30px rgba(42, 59, 58, .10); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.photo-card .photo-open:hover { transform: rotate(-1.5deg) scale(1.03); }
.photo-card figcaption { margin-top: 8px; font-size: .95rem; text-align: center; opacity: .8; }
.ph-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; color: #fff; font-weight: 700; font-size: .9rem; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.empty-note { text-align: center; opacity: .8; font-weight: 600; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 30, 30, .85); }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; border-radius: 16px; margin: 0 auto; }
.lightbox-caption { color: #fff; text-align: center; font-weight: 600; margin: 10px 0 0; }
.lightbox-caption:empty { display: none; }
.lightbox-close { position: absolute; top: -14px; right: -6px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #2A3B3A; font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.lightbox[open] { animation: lb-in .25s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } .photo-open img { transition: none; } }