/* RTG 2.0 — favoritos y vistos recientemente */

/* Lectores de pantalla */
.rtg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ═════════ Corazón ═════════ */
.product-fav {
  position: absolute; right: 12px; bottom: 12px; z-index: 4;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10,10,10,.74);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,76,.45);
  color: var(--gold); cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .4s var(--ease), border-color .25s ease;
}
.product-fav svg { fill: transparent; transition: fill .3s ease; display: block; }
@media (hover: hover) { .product-fav:hover { transform: scale(1.08); border-color: var(--gold); } }
.product-fav.is-on { background: var(--gold); border-color: var(--gold); color: var(--black); }
.product-fav.is-on svg { fill: currentColor; }
.product-fav.is-pop { animation: rtgfav-pop .55s var(--ease); }
@keyframes rtgfav-pop { 0% { transform: scale(.7); } 50% { transform: scale(1.28); } 100% { transform: scale(1); } }
.product-fav:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* en la vista rápida: junto al recorrido de categorías */
.rtgqv-toprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; padding-right: 92px; }
.rtgqv-toprow .rtgqv-crumb { margin: 0; padding: 0; }
.product-fav--qv { position: static; flex: none; width: 38px; height: 38px; }

/* en la página de producto: botón con texto */
.rtgfav-inline { margin: -8px 0 20px; }
.product-fav--lg {
  position: static; width: auto; height: auto; border-radius: 999px; padding: 10px 18px 10px 14px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
}
.product-fav--lg .lbl-on { display: none; }
.product-fav--lg.is-on .lbl-on { display: inline; }
.product-fav--lg.is-on .lbl-off { display: none; }

/* ═════════ Encabezado ═════════ */
.nav-fav {
  background: none; border: 0; cursor: pointer; color: var(--white); position: relative;
  display: flex; align-items: center; padding: 4px; transition: color .2s ease;
}
.nav-fav:hover, .nav-fav:focus-visible { color: var(--gold); }
.fav-count {
  position: absolute; top: -4px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--black);
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700;
}
.fav-count[hidden] { display: none; }
.nav-fav.is-bump svg { animation: rtgfav-pop .6s var(--ease); }

/* ═════════ Panel ═════════ */
.rtgfav { position: fixed; inset: 0; z-index: 430; visibility: hidden; pointer-events: none; }
.rtgfav.is-open { visibility: visible; pointer-events: auto; }
.rtgfav-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .4s ease; }
.rtgfav.is-open .rtgfav-backdrop { opacity: 1; }
.rtgfav-box {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 100vw);
  display: flex; flex-direction: column; background: #0c0c0c; border-left: 1px solid var(--border);
  box-shadow: -30px 0 80px rgba(0,0,0,.5);
  transform: translateX(104%); transition: transform .55s var(--ease);
}
.rtgfav.is-open .rtgfav-box { transform: none; }
.rtgfav-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 22px 0; border-bottom: 1px solid var(--border); }
.rtgfav-eyebrow { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.rtgfav-tabs { display: flex; gap: 22px; }
.rtgfav-tabs button {
  background: transparent; border: 0; padding: 0 0 14px; cursor: pointer; position: relative;
  font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 1px; color: #5b5750; transition: color .25s ease;
}
.rtgfav-tabs button i { font-style: normal; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0; vertical-align: top; margin-left: 4px; color: var(--gold); }
.rtgfav-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.rtgfav-tabs button.is-active { color: var(--white); }
.rtgfav-tabs button.is-active::after { transform: scaleX(1); }
.rtgfav-tabs button:hover { color: var(--white); }
.rtgfav-close { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid #2c2c2c; background: transparent; color: var(--white); cursor: pointer; transition: border-color .25s ease, color .25s ease, transform .4s var(--ease); }
.rtgfav-close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }

.rtgfav-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 22px 28px; }
.rtgfav-list { display: flex; flex-direction: column; }
.rtgfav-item {
  display: grid; grid-template-columns: 82px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid #1b1b1b;
  opacity: 0; transform: translateY(14px); animation: rtgfav-in .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rtgfav-in { to { opacity: 1; transform: none; } }
.rtgfav-thumb { display: block; width: 82px; height: 82px; border-radius: 16px; overflow: hidden; background: #151515; }
.rtgfav-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rtgfav-item.is-out .rtgfav-thumb img { filter: grayscale(.7) brightness(.7); }
.rtgfav-brand { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.rtgfav-name { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--white); }
.rtgfav-price { margin-top: 6px; font-family: 'Bebas Neue', sans-serif; font-size: 21px; letter-spacing: 1px; color: var(--gold-light); }
.rtgfav-price del { opacity: .45; font-size: .65em; margin-right: 6px; }
.rtgfav-price ins { text-decoration: none; }
.rtgfav-tag { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: #333; color: #bbb; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.rtgfav-act { display: flex; flex-direction: column; gap: 8px; }
.rtgfav-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid #333; background: transparent; color: var(--white); cursor: pointer;
  display: grid; place-items: center; position: static;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.rtgfav-btn:hover { border-color: var(--gold); color: var(--gold); }
.rtgfav-btn.product-fav { position: static; width: 38px; height: 38px; background: transparent; border-color: #333; color: var(--gold); -webkit-backdrop-filter: none; backdrop-filter: none; }
.rtgfav-btn.product-fav.is-on { background: var(--gold); color: var(--black); border-color: var(--gold); }

.rtgfav-empty { text-align: center; padding: 70px 10px; color: var(--muted); }
.rtgfav-empty-big { font-family: 'Bebas Neue', sans-serif; font-size: 150px; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--gold); margin-bottom: 16px; }
.rtgfav-empty p { margin: 0 auto 22px; max-width: 30ch; line-height: 1.6; }
.rtgfav-skel { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.rtgfav-skel i { display: block; height: 82px; border-radius: 16px; background: linear-gradient(100deg, #121212 30%, #1a1a1a 50%, #121212 70%); background-size: 200% 100%; animation: rtgqv-sh 1.2s linear infinite; }

@media (max-width: 520px) { .rtgfav-tabs button { font-size: 30px; } .rtgfav-item { grid-template-columns: 70px 1fr auto; gap: 12px; } .rtgfav-thumb { width: 70px; height: 70px; } }
@media (prefers-reduced-motion: reduce) {
  .rtgfav-box, .rtgfav-backdrop { transition: none; }
  .rtgfav-item { animation: none; opacity: 1; transform: none; }
  .product-fav.is-pop, .nav-fav.is-bump svg { animation: none; }
}

/* ═════════ Botón "Limpiar" (vistos recientemente) ═════════ */
.rtg-clear {
  flex: none; cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid #333; border-radius: 999px; padding: 8px 18px;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.rtg-clear:hover, .rtg-clear:focus-visible { color: var(--white); border-color: var(--gold); }
.rtg-clear.is-armed { background: #b3261e; border-color: #b3261e; color: #fff; }
.rtgfav-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.rtg-recent .rtg-sec-head { align-items: flex-end; }
.rtg-recent .rtg-sec-head .rtg-clear { margin-left: auto; }
