/* ELGATEC Rewards · SIRIO Energy */

/* V1.0.2: mueve Rewards a la izquierda del corazón y baja Revisado por ELGATEC debajo de la categoría. */

.elgr-points-badge {
  position: absolute;
  z-index: 9;
  top: 14px;
  right: 56px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(229, 175, 0, .72);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #fffbe0 0 13%, #ffd84c 42%, #e9aa00 100%);
  color: #031a26;
  box-shadow: 0 7px 17px rgba(98, 70, 0, .22), 0 0 0 2px rgba(28, 238, 255, .26);
  cursor: pointer;
  text-align: center;
  text-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.elgr-points-badge::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(3, 26, 38, .46);
  border-radius: 50%;
  pointer-events: none;
}
.elgr-points-badge:hover,
.elgr-points-badge:focus-visible {
  transform: translateY(-2px) rotate(2deg) scale(1.04);
  outline: 0;
  box-shadow: 0 9px 21px rgba(98,70,0,.26), 0 0 0 3px rgba(28,238,255,.30);
}
.elgr-points-badge strong,
.elgr-points-badge span {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1;
}
.elgr-points-badge strong {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.elgr-points-badge span {
  margin-top: -6px;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .06em;
}

.elgr-product-reward {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 0;
  padding: 8px 11px;
  border: 1px solid #ead58a;
  border-radius: 12px;
  background: #fff9dc;
  color: #5c4a00;
  font-size: 12px;
  font-weight: 800;
}
.elgr-product-reward b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg,#ffe96d,#e8aa00);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.elgr-product-reward button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #805f00;
  font: inherit;
  cursor: pointer;
}

body.elgr-modal-open { overflow: hidden; }
.elgr-modal[hidden] { display: none !important; }
.elgr-modal {
  position: fixed;
  z-index: 1000050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}
.elgr-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(1, 8, 15, .78);
  backdrop-filter: blur(10px) saturate(.72);
}
.elgr-modal__card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  width: min(510px, 100%);
  padding: 32px clamp(24px, 5vw, 42px) 27px;
  border: 1px solid rgba(79, 212, 239, .36);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), transparent 33%),
    linear-gradient(160deg, #061723, #04101a 58%, #071d2b);
  color: #f7fcff;
  box-shadow: 0 35px 110px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  text-align: center;
}
.elgr-modal__card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(65, 211, 239, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(65, 211, 239, .035) 1px, transparent 1px);
  background-size: 30px 30px;
  content: '';
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.elgr-modal__glow {
  position: absolute;
  z-index: -1;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}
.elgr-modal__glow.is-one { top: -130px; left: -90px; background: rgba(31, 205, 237, .2); }
.elgr-modal__glow.is-two { right: -130px; bottom: -135px; background: rgba(250, 190, 30, .13); }
.elgr-modal__close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(149, 214, 229, .35);
  border-radius: 50%;
  background: rgba(4, 21, 32, .78);
  color: #dff8ff;
  font-size: 23px;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.elgr-modal__close:hover,
.elgr-modal__close:focus-visible { border-color: #65d9ee; outline: 0; background: #0a3545; transform: rotate(4deg); }
.elgr-kicker {
  display: block;
  color: #68def3;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.elgr-modal__coin {
  display: block;
  width: 126px;
  height: 126px;
  margin: 20px auto 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .4));
}
.elgr-modal__coin:focus-visible { box-shadow: 0 0 0 3px #061723, 0 0 0 6px #54d7ef; }
.elgr-modal__coin-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2,.78,.2,1);
}
.elgr-modal__coin.is-flipped .elgr-modal__coin-inner { transform: rotateY(180deg); }
.elgr-modal__coin-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 238, 164, .92);
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 0 5px rgba(98, 65, 0, .16), inset 0 2px 8px rgba(255,255,255,.75), 0 0 0 7px rgba(255, 210, 56, .09);
}
.elgr-modal__coin-face.is-front {
  background: radial-gradient(circle at 34% 24%, #fffce8 0 10%, #ffe370 30%, #e9a700 72%, #8c5900 100%);
  color: #fff;
  text-shadow: 0 2px 2px rgba(91, 55, 0, .44);
}
.elgr-modal__coin-face.is-front::before {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(79, 46, 0, .4);
  border-radius: 50%;
  content: '';
}
.elgr-modal__coin-face.is-front strong { position: relative; font-size: 31px; line-height: 1; letter-spacing: -.045em; }
.elgr-modal__coin-face small { position: relative; margin-top: 7px; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.elgr-modal__coin-face.is-back {
  transform: rotateY(180deg);
  border-color: rgba(103, 216, 241, .75);
  background: radial-gradient(circle at 50% 45%, #0d3150, #020914 72%);
  box-shadow: inset 0 0 0 5px rgba(53, 151, 208, .16), 0 0 0 7px rgba(61, 205, 239, .08);
}
.elgr-modal__coin-face.is-back img { width: 105%; height: 105%; object-fit: cover; }
.elgr-modal__coin-face.is-back small {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 5px #000;
}
.elgr-modal__flip-hint { display: block; color: #7596a2; font-size: 8px; font-weight: 750; }
.elgr-modal__card h2 { margin: 18px 0 0; color: #fff; font-size: clamp(25px, 5.4vw, 32px); letter-spacing: -.04em; line-height: 1.05; }
.elgr-modal__card > p:not(.elgr-modal__foot) { margin: 12px auto 0; max-width: 410px; color: #a9c0c9; font-size: 13px; line-height: 1.58; }
.elgr-modal__card > p strong { color: #ffdc61; }
.elgr-modal__rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.elgr-modal__rules > span { display: grid; align-content: center; min-height: 67px; padding: 10px 7px; border: 1px solid rgba(119, 198, 216, .18); border-radius: 12px; background: rgba(255,255,255,.045); }
.elgr-modal__rules b { color: #e9faff; font-size: 10px; }
.elgr-modal__rules small { margin-top: 4px; color: #7e9ba6; font-size: 7px; line-height: 1.35; }
.elgr-modal__cta {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 21px;
  padding: 11px 19px;
  border: 1px solid rgba(255, 222, 101, .55);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffdc55, #e8ae11);
  color: #071522 !important;
  box-shadow: 0 11px 27px rgba(194, 137, 0, .22);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
.elgr-modal__cta:hover { transform: translateY(-2px); box-shadow: 0 15px 31px rgba(194, 137, 0, .31); }
.elgr-modal__foot { margin: 14px 0 0 !important; color: #66828d !important; font-size: 7px !important; line-height: 1.45 !important; }

.elgr-account {
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto 60px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #d6e7ec;
  border-radius: 25px;
  background: linear-gradient(145deg,#ffffff,#f5fafb);
  box-shadow: 0 16px 54px rgba(7,21,34,.08);
}
.elgr-account__head { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.elgr-account__head h2 { margin: 5px 0 8px; color: #071522; font-size: clamp(28px,4vw,42px); letter-spacing: -.04em; }
.elgr-account__head p { max-width: 690px; margin: 0; color: #637681; line-height: 1.55; }
.elgr-balance { flex: 0 0 auto; min-width: 180px; padding: 18px; border-radius: 18px; background: #071522; color: #fff; text-align: center; }
.elgr-balance strong { display: block; font-size: 38px; line-height: 1; }
.elgr-balance span { display: block; margin-top: 6px; color: #8bdcf4; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.elgr-balance small { display: block; margin-top: 7px; color: #b9c8ce; font-size: 9px; }
.elgr-account__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.elgr-account__grid article { padding: 20px; border: 1px solid #d6e7ec; border-radius: 17px; background: #fff; }
.elgr-account__grid h3 { margin: 10px 0 7px; color: #071522; }
.elgr-account__grid p { margin: 0; color: #637681; font-size: 13px; line-height: 1.5; }
.elgr-account__icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #fff2ad; color: #6f5800; font-size: 17px; font-weight: 900; }
.elgr-account__icon.is-sirio { background: #dff5fb; color: #075f7d; }
.elgr-account form { display: flex; align-items: end; gap: 8px; margin-top: 16px; }
.elgr-account form label { display: flex; flex: 1; flex-direction: column; gap: 5px; color: #526974; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.elgr-account form input { min-height: 43px; padding: 0 12px; border: 1px solid #cfdfe5; border-radius: 10px; background: #fff; }
.elgr-account form button { min-height: 43px; padding: 8px 14px; border: 0; border-radius: 10px; background: #071522; color: #fff; font-weight: 850; cursor: pointer; }
.elgr-account form button:disabled { opacity: .45; cursor: default; }
.elgr-account__result { min-height: 18px; margin-top: 10px; color: #075f7d; font-size: 12px; font-weight: 750; }
.elgr-account dl { margin: 15px 0 0; }
.elgr-account dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf2f4; }
.elgr-account dt { color: #738690; font-size: 11px; }
.elgr-account dd { margin: 0; color: #183643; font-size: 11px; font-weight: 850; }

@media (max-width: 620px) {
  .elgr-points-badge { top: 12px; right: 50px; width: 39px; height: 39px; }
  .elgr-points-badge strong { margin-top: 5px; font-size: 10px; }
  .elgr-points-badge span { margin-top: -6px; font-size: 6px; }
  .elgr-modal { align-items: start; overflow-y: auto; padding: 12px; }
  .elgr-modal__card { margin: auto 0; padding: 27px 17px 22px; border-radius: 22px; }
  .elgr-modal__coin { width: 110px; height: 110px; margin-top: 17px; }
  .elgr-modal__coin-face.is-front strong { font-size: 27px; }
  .elgr-modal__card h2 { margin-top: 15px; }
  .elgr-modal__card > p:not(.elgr-modal__foot) { font-size: 12px; }
  .elgr-modal__rules { gap: 5px; }
  .elgr-modal__rules > span { min-height: 62px; padding-inline: 4px; }
  .elgr-modal__rules b { font-size: 9px; }
  .elgr-modal__rules small { font-size: 6px; }
  .elgr-modal__cta { width: 100%; }
  .elgr-account__head { align-items: stretch; flex-direction: column; }
  .elgr-balance { width: 100%; }
  .elgr-account__grid { grid-template-columns: 1fr; }
  .elgr-account form { align-items: stretch; flex-direction: column; }
}


/* V1.0.2 card micro-layout */
.elgtf-card { position: relative; }
.elgtf-card__media { overflow: visible; }
.elgtf-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px 10px;
}
.elgtf-card__meta > a {
  flex: 0 1 auto;
  min-width: 0;
}
.elgtf-card__meta .elgtf-reviewed,
.elgtf-card__meta .elgtf-reviewed.is-compact {
  order: 10;
  width: 100%;
  margin-top: 2px;
  color: #6b7782;
  font-size: 11px;
  font-weight: 800;
}
.elgtf-card__meta .elgtf-reviewed::before,
.elgtf-card__meta .elgtf-reviewed.is-compact::before {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}


/* V1.0.3: tarjetas compactas; no estirar una ficha a la altura de la más larga de la fila. */
body.elgtf-store-catalogue .elgtf-grid {
  grid-auto-rows: auto !important;
  align-items: start !important;
}
body.elgtf-store-catalogue .elgtf-card {
  height: auto !important;
  align-self: start !important;
}
body.elgtf-store-catalogue .elgtf-card__body {
  flex: 0 0 auto !important;
}
body.elgtf-store-catalogue .elgtf-card__footer {
  margin-top: 12px !important;
}

@media (max-width: 720px) {
  body.elgtf-store-catalogue .elgtf-card {
    height: auto !important;
  }
  body.elgtf-store-catalogue .elgtf-card__body {
    align-self: stretch;
  }
}


/* V1.0.4: límite de 3 líneas en la descripción para mantener proporción visual. */
body.elgtf-store-catalogue .elgtf-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: calc(1.55em * 3);
  max-height: calc(1.55em * 3);
}


/* V1.0.5: límite de 2 líneas en el título para igualar alturas visuales. */
body.elgtf-store-catalogue .elgtf-card__title,
body.elgtf-store-catalogue .elgtf-card__title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.12em * 2);
  max-height: calc(1.12em * 2);
}


/* V1.0.6: selectores reales del catálogo. Título 2 líneas y descripción 3 líneas para mantener proporción. */
body.elgtf-store-catalogue .elgtf-card h3 {
  min-height: calc(1.26em * 2) !important;
  max-height: calc(1.26em * 2) !important;
  overflow: hidden !important;
}
body.elgtf-store-catalogue .elgtf-card h3 a {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden !important;
}
body.elgtf-store-catalogue .elgtf-card__desc {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden !important;
  min-height: calc(1.48em * 3) !important;
  max-height: calc(1.48em * 3) !important;
}

/* V1.0.7: encuadre inteligente para imágenes con mucho margen blanco interno. */
body.elgtf-store-catalogue .elgtf-card__media {
  overflow: hidden !important;
}
body.elgtf-store-catalogue .elgtf-card__media img[data-elgr-smart-fit="1"] {
  transform: scale(var(--elgr-smart-scale, 1)) !important;
  transform-origin: center center;
  transition: transform .28s ease !important;
  will-change: transform;
}
body.elgtf-store-catalogue .elgtf-card:hover .elgtf-card__media img[data-elgr-smart-fit="1"] {
  transform: scale(var(--elgr-smart-hover-scale, var(--elgr-smart-scale, 1))) !important;
}

@media (prefers-reduced-motion: reduce) {
  .elgr-modal__coin-inner,
  .elgr-modal__close,
  .elgr-modal__cta,
  .elgr-points-badge,
  body.elgtf-store-catalogue .elgtf-card__media img[data-elgr-smart-fit="1"] {
    transition: none !important;
  }
}
