/*
  Club EcoVilla Alegre · R7
  Página pública y compacta. La prioridad es: consultar saldo privado,
  ver premios y coordinar un canje sin repetir explicaciones.
*/

:root {
  --forest: #174b37;
  --forest-deep: #0f3829;
  --forest-soft: #2e674c;
  --olive: #7e7d41;
  --cream: #fbf7ed;
  --paper: #fffdf7;
  --ink: #173b2d;
  --text: #47524a;
  --line: #dfe4dc;
  --shell: min(1160px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.48;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
img { display: block; max-width: 100%; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -60px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--forest);
}
.skip-link:focus { top: 12px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--olive);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .87rem;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible,
a:focus-visible,
summary:focus-visible,
.access-link:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid #e8bd65;
  outline-offset: 3px;
}
.button-primary { color: #fff; background: var(--forest); box-shadow: 0 9px 18px rgba(15, 56, 41, .18); }
.button-primary:hover { background: var(--forest-deep); }
.button-light { color: var(--forest); border-color: #cbd9cd; background: #fffdf8; }

/* Navegación: solo rutas que ayudan a llegar al saldo o a los premios. */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(23, 75, 55, .10);
  background: rgba(255, 253, 247, .96);
  backdrop-filter: blur(12px);
}
.nav-row { display: flex; min-height: 64px; align-items: center; gap: 16px; }
.brand { display: flex; width: 135px; min-width: 135px; align-items: center; }
.brand img { width: 100%; height: 44px; object-fit: contain; object-position: left; }
.desktop-nav { display: flex; gap: 20px; margin-left: auto; color: #355444; font-size: .78rem; font-weight: 750; }
.desktop-nav a:hover { color: var(--forest); }
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid #c7d3c8;
  border-radius: 50%;
  color: var(--forest);
  background: #fffdf8;
  font-size: 1rem;
}
.mobile-menu {
  position: absolute;
  top: 58px;
  right: 15px;
  left: 15px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d9e1d8;
  border-radius: 15px;
  background: #fffdf8;
  box-shadow: 0 16px 32px rgba(30, 52, 40, .17);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 11px 12px; border-radius: 9px; color: #345044; font-weight: 750; }
.mobile-menu a:hover { background: #edf2e9; }

/* Entrada breve: el acceso privado se muestra antes que cualquier explicación. */
.club-intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e0e5db;
  background: linear-gradient(118deg, #edf2e5 0%, #fbf4e7 62%, #e7efde 100%);
}
.club-intro::after {
  position: absolute;
  top: -160px;
  right: 10%;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(23, 75, 55, .12);
  border-radius: 50%;
  content: "";
}
.club-intro-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: 38px;
  align-items: center;
  padding: 28px 0;
}
.club-intro-copy { max-width: 650px; }
.club-intro-copy h1,
.section-heading h2,
.club-add-on h2,
.access-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: .99;
  letter-spacing: -.035em;
}
.club-intro-copy h1 { max-width: 620px; font-size: clamp(2.15rem, 4.25vw, 3.7rem); }
.club-intro-copy > p:last-child { margin: 10px 0 0; font-size: .98rem; }
.club-access-button {
  width: 100%;
  min-height: 56px;
  justify-content: space-between;
  padding-inline: 18px;
  border-radius: 13px;
  font-size: 1rem;
}
.club-access-button span { color: #f6dda4; font-size: 1.25rem; line-height: 1; }

/* Catálogo compacto con miniaturas cuadradas y puntos junto al nombre. */
.rewards { padding: clamp(20px, 2.4vw, 30px) 0; scroll-margin-top: 4.25rem; }
.rewards-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.rewards-heading h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.12; letter-spacing: -.02em; }
.rewards-heading > p { margin: 0; font-size: .78rem; }
.reward-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.reward-card {
  display: grid;
  grid-template-columns: clamp(94px, 10vw, 134px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e0e4d6;
  border-radius: 14px;
  background: var(--paper);
}
.reward-card:hover { border-color: #c8d6b8; box-shadow: 0 6px 14px rgba(48, 85, 52, .07); }
.reward-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 9px; background: #eff3ea; }
.reward-photo-product {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 7px;
  background: #e0e0ca url("../../assets/images/productos/taconachos-fondo-ecovilla-v128.webp") left bottom / cover no-repeat;
}
.reward-photo-product img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(2px 4px 3px rgba(44, 39, 20, .32));
}
.reward-card-content { display: grid; min-width: 0; justify-items: start; gap: 5px; }
.reward-points {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--forest);
  background: #eaf1e5;
}
.reward-points strong { font-size: .85rem; line-height: 1.2; }
.reward-points small { font-size: .69rem; font-weight: 750; }
.reward-card h3 { margin: 0; color: #293f31; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.12; }
.reward-availability { margin: 0; color: #5e6b60; font-size: .75rem; line-height: 1.25; }
.reward-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin-top: 1px;
  padding: 6px 8px;
  border: 1px solid #d7e5d7;
  border-radius: 8px;
  color: var(--forest);
  background: #f0f5ed;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.2;
}
.reward-action:hover { background: #e5efe2; }
.reward-action span { font-size: 1rem; }

/* Complemento comercial separado del saldo y de los premios. */
.club-add-on { border-block: 1px solid #dce6d7; background: #eef4e9; }
.club-add-on-grid {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 17px 0;
}
/* El fondo y las bolsas van en capas para conservar el arte original del empaque. */
.club-add-on-products {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  border: 1px solid rgba(67, 82, 44, .16);
  border-radius: 12px;
  background: #e0e0ca;
}
.club-add-on-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right bottom; }
.club-add-on-pack {
  position: absolute;
  bottom: 10%;
  width: auto;
  height: 80%;
  filter: drop-shadow(3px 5px 3px rgba(44, 39, 20, .3));
}
.club-add-on-andinos { left: 9%; height: 74%; transform: rotate(-4deg); }
.club-add-on-original { left: 42%; transform: rotate(4deg); }
.club-add-on h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); }
.club-add-on p:not(.eyebrow) { margin: 7px 0 0; font-size: .82rem; }
.club-add-on .button { white-space: nowrap; }

/* La explicación se mantiene disponible sin competir con los premios. */
.club-summary { padding: 22px 0 34px; }
.club-summary details { padding: 13px 16px; border: 1px solid #dce4d8; border-radius: 13px; background: #fffdf7; }
.club-summary summary { color: var(--forest); font-size: .82rem; font-weight: 850; cursor: pointer; }
.club-summary p { max-width: 650px; margin: 10px 0 1px; font-size: .8rem; }

/* Acceso persistente, compacto y exclusivo para coordinar Taconachos. */
.floating-taconachos {
  position: fixed;
  z-index: 30;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  min-height: 66px;
  max-width: calc(100vw - 32px);
  align-items: center;
  gap: 9px;
  padding: 4px 14px 4px 5px;
  border: 1px solid rgba(23, 75, 55, .22);
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 253, 247, .97);
  box-shadow: 0 12px 28px rgba(23, 75, 55, .20);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.floating-taconachos:hover { transform: translateY(-2px); border-color: rgba(23, 75, 55, .45); box-shadow: 0 16px 30px rgba(23, 75, 55, .25); }
.floating-taconachos:focus-visible { outline: 3px solid #e8bd65; outline-offset: 4px; }
.floating-taconachos-product {
  display: grid;
  width: 50px;
  height: 60px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(117, 101, 43, .12);
  border-radius: 12px;
  background: linear-gradient(145deg, #e9edd9, #f9edd4);
}
.floating-taconachos-product img { width: 46px; height: 58px; object-fit: contain; filter: drop-shadow(1px 2px 2px rgba(44, 39, 20, .24)); }
.floating-taconachos-label { white-space: nowrap; }
.floating-taconachos-arrow { color: #6d733c; font-size: 1rem; }

.site-footer { color: #d9e7dc; background: #103927; }
.footer-row { display: flex; min-height: 72px; align-items: center; gap: 12px; font-size: .73rem; }
.footer-row img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; background: #fff; }
.footer-row p { margin: 0; }
.footer-row a { margin-left: auto; color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Acceso privado: el saldo llega únicamente tras verificar un código SMS. */
body:has(.access-dialog[open]) { overflow: hidden; }
.access-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: var(--paper);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .36);
}
.access-dialog::backdrop { background: rgba(8, 34, 24, .70); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 23px 25px 17px; border-bottom: 1px solid #e5e6dc; }
.dialog-head h2 { font-size: 2rem; }
.icon-button { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid #d5dfd4; border-radius: 50%; color: var(--forest); background: #fff; font-size: 1.5rem; line-height: 1; }
.access-flow { padding: 23px 25px 25px; }
.access-loading { margin: 0; color: #607065; font-size: .86rem; }
.access-intro { margin: 0 0 18px; color: #566359; font-size: .86rem; }
.access-form { display: grid; gap: 14px; }
.access-field { display: grid; gap: 7px; color: #304b3c; font-size: .77rem; font-weight: 800; }
.access-field input,
.access-field select,
.remember-duration select,
.redeem-quantity select {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #cbd9cd;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: 0;
}
.access-field input { min-height: 48px; padding: 11px 13px; font-size: 1rem; }
.access-field input:focus,
.access-field select:focus,
.remember-duration select:focus,
.redeem-quantity select:focus { border-color: #547e62; box-shadow: 0 0 0 3px rgba(84, 126, 98, .16); }
.access-field small { color: #728076; font-size: .71rem; font-weight: 500; }
.access-code-input { max-width: 260px; letter-spacing: .25em; text-align: center; }
.access-message { margin: 0; padding: 11px 12px; border-radius: 11px; color: #456352; background: #edf4e9; font-size: .78rem; }
.access-message.is-error { color: #8a3c2f; background: #fbebe7; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.access-link { padding: 0; border: 0; color: var(--forest); background: transparent; font-size: .76rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.access-remember { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 12px; border: 1px solid #dfe7dc; border-radius: 13px; background: #f7faf3; }
.remember-toggle { display: flex; align-items: center; gap: 8px; color: #304b3c; font-size: .78rem; font-weight: 850; }
.remember-toggle input { width: 17px; height: 17px; accent-color: var(--forest); }
.remember-duration { display: flex; align-items: center; gap: 8px; color: #52665a; font-size: .71rem; font-weight: 800; }
.remember-duration select { width: auto; min-height: 34px; padding: 5px 7px; font-size: .76rem; }
.access-remember small { grid-column: 1 / -1; color: #728076; font-size: .69rem; line-height: 1.35; }
.account-card { padding: 22px; border-radius: 18px; color: #fff; background: linear-gradient(140deg, #174b37, #2c694c); }
.account-card > span { color: #dfebde; font-size: .67rem; font-weight: 850; letter-spacing: .13em; }
.account-card strong { display: block; margin: 16px 0 5px; font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.1; }
.account-card p { margin: 0; color: #e0eee1; font-size: .76rem; }
.account-points { display: flex; align-items: baseline; gap: 10px; margin-top: 21px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .22); }
.account-points b { font-size: 2.15rem; line-height: 1; }
.account-points span { font-size: .72rem; }
.account-held { margin: 13px 0 0; padding: 10px 12px; border: 1px solid #e0e5d9; border-radius: 12px; color: #5c695e; background: #fffcf5; font-size: .77rem; }
.account-rewards { display: grid; gap: 9px; margin-top: 17px; }
.account-rewards h3 { margin: 0; color: #294333; font-size: .92rem; }
.account-reward { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #e0e5d9; border-radius: 12px; background: #fffcf5; }
.account-reward strong,
.account-reward span { display: block; }
.account-reward strong { color: #365141; font-size: .79rem; }
.account-reward span { margin-top: 2px; color: #748074; font-size: .7rem; }
.account-reward b { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #507445; background: #e8f0dc; font-size: .62rem; }
.account-reward b.is-pending { color: #756f4c; background: #f0eddb; }
.account-redeem { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: 3px; padding-top: 10px; border-top: 1px solid #e7ebe1; }
.redeem-quantity { display: grid; gap: 4px; color: #617065; font-size: .67rem; font-weight: 850; }
.redeem-quantity select { min-width: 76px; min-height: 36px; font-size: .78rem; }
.redeem-action { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 11px; border-radius: 10px; color: #fff; background: #1e6d43; font-size: .71rem; font-weight: 900; line-height: 1.15; text-align: center; box-shadow: 0 7px 14px rgba(23, 75, 55, .14); }
.redeem-action:hover { color: #fff; background: var(--forest-deep); }
.dialog-note { margin: 18px 0 0; color: #657166; font-size: .75rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

@media (max-width: 880px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; margin-left: auto; place-items: center; }
  .club-intro-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .reward-grid { grid-template-columns: 1fr; gap: 8px; }
  .reward-card { grid-template-columns: clamp(86px, 26vw, 112px) minmax(0, 1fr); }
  .club-add-on-grid { grid-template-columns: 190px minmax(0, 1fr) auto; gap: 19px; }
}

@media (max-width: 660px) {
  :root { --shell: calc(100% - 30px); }
  .nav-row { min-height: 59px; gap: 8px; }
  .brand { width: 106px; min-width: 106px; }
  .brand img { height: 39px; }
  .club-intro-grid { grid-template-columns: 1fr; gap: 13px; padding: 20px 0; }
  .club-intro-copy h1 { font-size: clamp(2.25rem, 11.5vw, 3.15rem); }
  .club-intro-copy > p:last-child { margin-top: 8px; font-size: .91rem; }
  .club-access-button { min-height: 50px; }
  .rewards { padding: 18px 0 22px; }
  .reward-grid { margin-top: 10px; }
  .reward-card { gap: 10px; }
  .reward-action { min-height: 44px; }
  .club-add-on-grid { grid-template-columns: clamp(112px, 36vw, 146px) minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .club-add-on h2 { font-size: 1.45rem; }
  .club-add-on p:not(.eyebrow) { margin-top: 4px; font-size: .75rem; }
  .club-add-on .button { grid-column: 1 / -1; width: 100%; }
  .club-summary { padding: 17px 0 25px; }
  .floating-taconachos { right: max(11px, env(safe-area-inset-right)); bottom: max(11px, env(safe-area-inset-bottom)); min-height: 60px; padding-right: 11px; font-size: .74rem; }
  .floating-taconachos-product { width: 46px; height: 56px; border-radius: 11px; }
  .floating-taconachos-product img { width: 42px; height: 56px; }
  .footer-row { flex-wrap: wrap; padding-block: 16px; }
  .footer-row a { width: 100%; margin-left: 0; }
  .access-dialog { width: min(680px, calc(100% - 20px)); max-height: calc(100dvh - 20px); }
  .dialog-head { padding: 19px 18px 15px; }
  .dialog-head h2 { font-size: 1.7rem; }
  .access-flow { padding: 19px 18px 21px; }
  .dialog-actions { display: grid; }
  .dialog-actions .button { width: 100%; }
  .access-code-input { max-width: none; }
  .access-remember { grid-template-columns: 1fr; }
  .remember-duration { justify-content: space-between; }
  .account-redeem { align-items: stretch; flex-direction: column; }
  .redeem-quantity { grid-template-columns: 1fr auto; align-items: center; }
  .redeem-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
