.at-tarjeta { position: relative; display: grid; height: 100%; }
.at-tarjeta:hover { z-index: 1; }
.at-tarjeta__link { position: absolute; inset: 0; }
.at-tarjeta__contenido {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  color: var(--at-texto);
  pointer-events: none;
}
.at-tarjeta__contenido a,
.at-tarjeta__contenido button,
.at-tarjeta__fotos { pointer-events: auto; }
.at-tarjeta__galeria-link,
.at-tarjeta__titulo-link { display: contents; color: inherit; text-decoration: none; }
.at-tarjeta__galeria { position: relative; overflow: hidden; container-type: inline-size; }
.at-tarjeta__fotos {
  display: flex;
  width: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: var(--at-fondo);
}
.at-tarjeta__fotos::-webkit-scrollbar { display: none; }
.at-tarjeta__foto {
  position: relative;
  flex: 0 0 auto;
  width: round(up, 100%, 1px);
  aspect-ratio: var(--at-tarjeta-proporcion, 1);
  overflow: hidden;
  scroll-snap-align: center;
}
.at-tarjeta__imagen { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.at-tarjeta__flecha {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0 20px;
  border: 0;
  background: none;
  color: #fff;
  mix-blend-mode: difference;
  opacity: 0;
  cursor: pointer;
  transition: opacity .125s ease;
}
.at-tarjeta__flecha--anterior { left: 0; }
.at-tarjeta__flecha--siguiente { right: 0; }
.at-tarjeta__flecha svg { width: 20px; height: 20px; }
.at-tarjeta__galeria:is(:hover, :focus-within) .at-tarjeta__flecha { opacity: 1; }
@container (max-width: 249px) { .at-tarjeta__flecha { padding: 0 11.2px 0 0; } }
@media (max-width: 749px) { .at-tarjeta__flecha { display: none; } }

.at-tarjeta__etiqueta {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 1px 6px;
  border-radius: var(--at-etiqueta-radio, 100px);
  background: var(--at-fondo);
  color: var(--at-texto);
  font-family: var(--at-fuente-cuerpo);
  font-weight: var(--at-fuente-cuerpo-peso);
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
}
.at-tarjeta__etiqueta--agotado { background: var(--at-agotado-fondo); }
@media (min-width: 750px) { .at-tarjeta__etiqueta { padding: 4px 10px; } }

.at-tarjeta__rapido { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.at-tarjeta__elegir {
  position: absolute;
  right: 12.8px;
  bottom: 12.8px;
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 36px;
  max-width: calc(100% - 12.8px);
  height: 36px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgb(0 0 0 / .15);
  border-radius: 50px;
  background: linear-gradient(var(--at-fondo) 0 100%) padding-box;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--at-texto);
  font-family: var(--at-fuente-cuerpo);
  font-size: var(--at-tamano-parrafo);
  line-height: var(--at-interlineado-parrafo);
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: all;
  interpolate-size: allow-keywords;
  transition: scale .125s cubic-bezier(.33, 1, .68, 1), opacity .125s cubic-bezier(.33, 1, .68, 1), width .125s cubic-bezier(.33, 1, .68, 1);
}
.at-tarjeta__elegir-icono { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 100%; }
.at-tarjeta__elegir-icono svg { width: 20px; height: 20px; }
@media (min-width: 750px) {
  .at-tarjeta__elegir { display: flex; }
  .at-tarjeta:is(:hover, :focus-within) .at-tarjeta__elegir { opacity: 1; }
  .at-tarjeta__elegir:is(:hover, :focus-visible) { width: max-content; padding-right: 11.2px; scale: 1.03; }
  .at-tarjeta__elegir:active { scale: .99; }
}
@container (max-width: 70px) { .at-tarjeta__galeria:hover .at-tarjeta__elegir { display: none; } }

.at-tarjeta__titulo { width: var(--at-tarjeta-titulo-ancho, 100%); padding-top: 4px; }
.at-tarjeta__titulo p {
  margin: 0;
  font-family: var(--at-fuente-cuerpo);
  font-weight: var(--at-fuente-cuerpo-peso);
  font-size: var(--at-tamano-parrafo);
  line-height: var(--at-interlineado-parrafo);
  text-wrap: pretty;
  user-select: text;
}
.at-tarjeta__precio {
  font-family: var(--at-fuente-subtitulo);
  font-weight: var(--at-fuente-subtitulo-peso);
  font-size: 12px;
  line-height: 1.2;
}
.at-tarjeta__precio { display: flex; }
@media (max-width: 749px) { .at-tarjeta__precio { transform: translateZ(0); } }
.at-tarjeta__precio-actual,
.at-tarjeta__precio-tachado { display: inline-block; white-space: nowrap; }
.at-tarjeta__precio-tachado { color: rgb(0 0 0 / .8); text-decoration: line-through 1.5px rgb(0 0 0 / .3); }

.at-grilla-productos {
  display: grid;
  grid-template-columns: repeat(var(--at-grilla-columnas-celular, 2), minmax(0, 1fr));
  gap: var(--at-grilla-hueco-celular, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
  isolation: isolate;
}
.at-grilla-productos > li { min-width: 0; }
@media (min-width: 750px) {
  .at-grilla-productos {
    grid-template-columns: var(--at-grilla-columnas-compu, repeat(auto-fill, minmax(250px, 1fr)));
    gap: var(--at-grilla-hueco-compu, 24px 16px);
  }
}
@media (max-width: 749px) {
  .at-grilla-productos--borde .at-tarjeta__contenido { padding-inline: 8px; }
  .at-grilla-productos--borde .at-tarjeta__galeria { margin-inline: -8px; }
}

.at-elegir {
  width: min(54rem, 96vw);
  max-width: none;
  height: min(38.5rem, 96vh);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--at-borde);
  border-radius: var(--at-ventana-radio, 14px);
  background: var(--at-fondo);
  color: var(--at-texto);
  box-shadow: 0 5px 30px rgb(0 0 0 / .15);
}
.at-elegir::backdrop { background: rgb(0 0 0 / .25); }
.at-elegir[open] { display: flex; animation: at-bc-ventana-entra .2s ease forwards; }
@keyframes at-bc-ventana-entra { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
.at-elegir__cerrar {
  position: absolute;
  top: 4.8px;
  right: 4.8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--at-texto);
  cursor: pointer;
}
.at-elegir__cerrar svg { width: 13.6px; height: 13.6px; }
.at-elegir__lugar { display: flex; flex: 1 1 auto; min-width: 0; }
.at-elegir__contenido { position: relative; display: grid; grid-template-columns: 24rem 1fr; flex: 1 1 auto; min-width: 0; height: 100%; }
.at-elegir__fotos { display: flex; flex-direction: column; gap: 4.8px; height: 100%; overflow-y: auto; scrollbar-width: none; }
.at-elegir__fotos::-webkit-scrollbar { display: none; }
.at-elegir__foto { display: block; flex: 0 0 auto; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--at-fondo); }
.at-elegir__detalles { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-top: 28px; }
.at-elegir__titulo { margin: 0; padding: 0 46px 0 28px; font-family: var(--at-fuente-titulo); font-size: 24px; font-weight: 600; line-height: 1.2; }
.at-elegir__titulo a { color: inherit; text-decoration: none; }
.at-elegir__comprar { position: sticky; bottom: 0; margin-top: auto; padding: 6px 28px 39.2px; background: var(--at-fondo); }
.at-elegir__boton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--at-verde, #1A9C4D);
  color: #fff;
  font-family: var(--at-fuente-cuerpo);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.6;
  cursor: pointer;
}
.at-elegir__boton[aria-busy='true'] { opacity: .7; cursor: progress; }
.at-elegir__error { margin: 8px 0 0; color: #b42318; font-size: 13px; }
@media (max-width: 749px) {
  .at-elegir { width: 100%; height: auto; max-height: 92dvh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .at-elegir__contenido { grid-template-columns: 1fr; padding: 20px; gap: 16px; overflow-y: auto; }
  .at-elegir__fotos { flex-direction: row; overflow-x: auto; overflow-y: hidden; height: auto; }
  .at-elegir__foto { width: 70%; }
  .at-elegir__detalles { padding-top: 0; overflow: visible; }
  .at-elegir__titulo { padding: 0; font-size: 18px; }
  .at-elegir__comprar { padding: 16px 0 0; }
}

.at-lupa {
  width: min(66dvw, 42rem);
  max-width: none;
  max-height: calc(100% - 34px);
  margin: calc(50dvh - 65dvh / 2 - 2rem) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--at-borde);
  border-radius: var(--at-ventana-radio, 14px);
  background: var(--at-fondo);
  color: var(--at-texto);
  box-shadow: 0 4px 20px rgb(0 0 0 / .15);
}
.at-lupa::backdrop { background: rgb(0 0 0 / .25); }
.at-lupa[open] { display: flex; animation: at-bc-lupa-entra .3s cubic-bezier(.32, .72, 0, 1) forwards; }
@keyframes at-bc-lupa-entra { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 749px) {
  .at-lupa { width: 100dvw; height: 100dvh; max-height: 100%; margin: 0; border-radius: 0; }
  .at-lupa::backdrop { background: none; }
}
.at-lupa__caja { display: flex; width: 100%; background: var(--at-fondo); }
.at-lupa__form { position: relative; display: flex; flex-direction: column; width: 100%; }
.at-lupa__cabecera {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 4px 11.2px;
  border-bottom: 1px solid var(--at-borde);
  background: var(--at-fondo);
}
.at-lupa__campo { position: relative; display: flex; flex: 1 1 auto; min-width: 0; border-radius: 4px; background: var(--at-fondo); }
.at-lupa__entrada {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 11.2px 0 11.2px 40px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--at-texto);
  font-family: var(--at-fuente-cuerpo);
  font-size: 16px;
  line-height: 1.6;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.at-lupa__entrada::-webkit-search-cancel-button,
.at-lupa__entrada::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.at-lupa__entrada::placeholder { color: rgb(0 0 0 / .6); }
.at-lupa__icono { position: absolute; top: 12px; left: 8.8px; display: flex; width: 24px; height: 24px; color: rgb(0 0 0 / .6); pointer-events: none; }
.at-lupa__borrar {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 12.8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--at-texto);
  font: inherit;
  cursor: pointer;
}
.at-lupa__borrar[hidden] { display: flex; visibility: hidden; }
.at-lupa__cerrar {
  display: flex;
  flex: 0 0 39.9062px;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 0 0 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--at-texto);
  cursor: pointer;
}
.at-lupa__cerrar svg { width: 13.6px; height: 13.6px; }
@media (min-width: 750px) {
  .at-lupa__cabecera { padding: 4px 4px 0; }
  .at-lupa__campo { border-radius: 14px; }
  .at-lupa__borrar { margin-right: 4.8px; }
  .at-lupa__cerrar { flex-basis: 40.5625px; margin-left: 11.2px; padding: 0; }
}
.at-lupa__contenido { position: relative; max-height: 65dvh; overflow-y: auto; }
@media (max-width: 749px) { .at-lupa__contenido { max-height: none; flex: 1 1 auto; } }
.at-lupa__resultados { padding-block: 16px; }
.at-lupa__grupo { padding: 0 20px; }
.at-lupa__grupo + .at-lupa__grupo { margin-top: 16px; }
.at-lupa__grupo-titulo { margin: 0 0 11.2px; font-family: var(--at-fuente-subtitulo); font-size: 14px; font-weight: 500; line-height: 1; }
@media (min-width: 750px) { .at-lupa__grupo-titulo { margin-bottom: 8px; } }
.at-lupa__lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14.4px; padding: 1px 0 16px; }
@media (min-width: 750px) { .at-lupa__lista { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 11.2px; } }
.at-lupa__item { position: relative; min-width: 0; }
.at-lupa__links { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.at-lupa__link { color: inherit; }
.at-lupa__sin-resultados { margin: 0; padding: 0 20px; color: rgb(0 0 0 / .8); }
.at-lupa__pie { position: sticky; bottom: 0; display: flex; justify-content: center; padding: 8px 20px 16px; background: linear-gradient(to top, rgb(255 255 255 / .9), rgb(255 255 255 / .8), rgb(255 255 255 / .4), transparent); }
.at-lupa__pie[hidden] { display: none; }
.at-lupa__item[aria-selected='true'] .at-lupa-tarjeta { outline: 1px solid currentColor; outline-offset: 2px; }

.at-lupa-tarjeta { position: relative; display: flex; flex-direction: column; row-gap: 8px; height: 100%; }
.at-lupa-tarjeta__link { position: absolute; inset: 0; z-index: 1; }
.at-lupa-tarjeta__foto { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 0; }
.at-lupa-tarjeta__imagen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: opacity .2s ease; }
.at-lupa-tarjeta__imagen--segunda { opacity: 0; }
@media (hover: hover) {
  .at-lupa-tarjeta:hover .at-lupa-tarjeta__imagen--segunda { opacity: 1; }
}
.at-lupa-tarjeta__texto { display: flex; flex-direction: column; gap: 2px; }
.at-lupa-tarjeta__titulo {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.3;
}
.at-lupa-tarjeta__precio { font-size: 14px; line-height: 1.6; }
.at-lupa-tarjeta__tachado { color: rgb(0 0 0 / .8); text-decoration: line-through rgb(0 0 0 / .3); white-space: nowrap; }
.at-lupa-tarjeta__actual { font-weight: 500; white-space: nowrap; }
