/* ============================================================
   HOME — Organism C (High-Yield Bento) + Molecule B (Rankings)
   ============================================================ */
.ll-home-bento {
  margin-bottom: 2rem;
}

.ll-home-bento-link {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.2fr);
  min-height: 390px;
  background: #121212;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--ll-shadow-xl);
}

.ll-home-bento-media {
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

.ll-home-bento-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition:
    transform 0.9s ease,
    opacity 0.4s ease;
  opacity: 0.7;
}

.ll-home-bento-link:hover .ll-home-bento-media img {
  transform: scale(1.08);
  opacity: 0.9;
}

.ll-home-bento-media-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: #1a1a1a;
}

.ll-home-bento-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(18, 18, 18, 0.15) 0%,
    rgba(18, 18, 18, 0.85) 75%,
    #121212 100%
  );
}

.ll-home-bento-content {
  position: relative;
  z-index: 1;
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}

.ll-home-bento-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  background: var(--ll-gold);
  color: #121212;
  padding: 0.4rem 0.95rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ll-home-bento-pill svg {
  width: 0.9rem;
  height: 0.9rem;
}

.ll-home-bento-title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
}

.ll-home-bento-subline {
  margin: 0;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.55);
}

.ll-home-bento-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1rem;
}

.ll-home-bento-metric {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 0.9rem;
}

.ll-home-bento-metric span {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.45rem;
}

.ll-home-bento-metric strong {
  font-family: var(--ff-serif);
  font-size: 1.6rem;
  color: #fff;
}

.ll-home-profit-text-positive {
  color: var(--ll-profit-positive);
}
.ll-home-profit-text-negative {
  color: var(--ll-profit-negative);
}
.ll-home-profit-text-neutral {
  color: rgba(255, 255, 255, 0.7);
}

.ll-home-bento-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.3rem;
}

.ll-home-bento-btn {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.9rem 1.2rem;
}

.ll-home-bento-btn-primary {
  background: var(--ll-gold);
  color: #121212;
}

.ll-home-bento-btn-secondary {
  border-bottom: 2px solid var(--ll-gold);
  color: #fff;
}

.ll-home-rankings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.ll-home-ranking-card {
  background: var(--ll-card);
  border: 1px solid var(--ll-border);
  box-shadow: var(--ll-shadow);
  padding: 1rem;
}

.ll-home-ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--ll-border);
}

.ll-home-ranking-head h3 {
  margin: 0;
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.ll-home-ranking-head a {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-gold-dark);
}

.ll-home-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ll-home-ranking-row {
  background: var(--ll-card);
  border: 1px solid var(--ll-border);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.ll-home-ranking-row:hover {
  border-color: rgba(224, 168, 86, 0.4);
  box-shadow: var(--ll-shadow);
}

.ll-home-ranking-row-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.15rem;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
}

.ll-home-ranking-media {
  width: 100%;
  min-width: 0;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0efe9;
  flex-shrink: 0;
}

.ll-home-ranking-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition:
    filter 0.35s ease,
    transform 0.6s ease;
}

.ll-home-ranking-row:hover .ll-home-ranking-media img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.ll-home-ranking-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.ll-home-ranking-main {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.ll-home-ranking-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.ll-home-ranking-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.45rem;
  font-family: var(--ff-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ll-gold-dark);
  background: rgba(224, 168, 86, 0.1);
  border: 1px solid rgba(224, 168, 86, 0.35);
  line-height: 1;
}

.ll-home-ranking-rank small {
  font-size: 0.58rem;
  margin-right: 0.1rem;
  opacity: 0.8;
}

.ll-home-ranking-title {
  margin: 0;
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

.ll-home-ranking-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ll-muted);
}

.ll-home-ranking-meta-tag {
  display: inline-flex;
  align-items: center;
}

.ll-home-ranking-side {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  border-top: 1px solid var(--ll-border);
  padding-top: 1.05rem;
}

/* Contenedor de los dos precios (DVE + Ref. España) */
.ll-home-ranking-side-prices {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.4rem;
}

.ll-home-ranking-side-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.ll-home-ranking-side-price span {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-muted);
}

.ll-home-ranking-side-price strong {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  color: var(--ll-text);
}

/* Ref. España — columna secundaria muted */
.ll-home-ranking-side-market {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.ll-home-ranking-side-market span {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-muted);
}
.ll-home-ranking-side-market strong {
  font-family: var(--ff-serif);
  font-size: 0.92rem;
  color: var(--ll-muted);
}

.ll-home-profit-badge {
  display: inline-flex;
  margin-top: 0;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.56rem;
}

.ll-home-profit-positive {
  background: var(--ll-profit-positive);
  color: #121212;
}

.ll-home-profit-negative {
  background: var(--ll-profit-negative);
  color: #fff;
}

.ll-home-profit-neutral {
  background: var(--ll-profit-neutral);
  border: 1px solid rgba(224, 168, 86, 0.35);
  color: var(--ll-gold-dark);
}

.ll-home-ranking-action {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--ll-border);
  background: rgba(0, 0, 0, 0.03);
  color: var(--ll-muted);
  display: none;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

html.dark .ll-home-ranking-action {
  background: rgba(255, 255, 255, 0.05);
}

.ll-home-ranking-action svg {
  width: 1rem;
  height: 1rem;
}

.ll-home-ranking-row:hover .ll-home-ranking-action {
  background: var(--ll-gold);
  border-color: var(--ll-gold);
  color: #121212;
  transform: translateX(2px);
}

@media (max-width: 1024px) {
  .ll-home-bento-link {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ll-home-bento-content {
    padding: 2rem 1.35rem;
  }

  .ll-home-bento-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .ll-home-ranking-row-link {
    flex-direction: column;
    align-items: stretch;
  }

  .ll-home-ranking-media {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16/9;
  }

  .ll-home-ranking-side {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    min-width: 0;
  }

  .ll-home-ranking-side-price {
    align-items: flex-start;
  }

  .ll-home-ranking-action {
    display: none;
  }
}

@media (min-width: 640px) {
  .ll-home-ranking-row-link {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    padding: 1.3rem 1.4rem;
  }

  .ll-home-ranking-media {
    width: 10rem;
    min-width: 10rem;
    aspect-ratio: 1/1;
  }

  .ll-home-ranking-side {
    width: auto;
    justify-content: flex-end;
    border-top: 0;
    padding-top: 0;
    gap: 1rem;
  }

  .ll-home-ranking-side-price {
    align-items: flex-end;
    text-align: right;
  }
}

@media (min-width: 768px) {
  .ll-home-ranking-row-link {
    grid-template-columns: 8rem minmax(0, 1fr) minmax(190px, auto) 2.35rem;
    gap: 1.5rem;
    padding: 1.4rem 1.5rem;
  }

  .ll-home-ranking-media {
    width: 8rem;
    min-width: 8rem;
    height: 6rem;
    aspect-ratio: auto;
  }

  .ll-home-ranking-side {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .ll-home-ranking-action {
    display: inline-flex;
  }
}

/* ============================================================
   TABS — RANKINGS HOME
   ============================================================ */

.ll-ranking-tabs-wrap {
  /* wrapper del sistema de tabs */
}

/* Barra de navegación de tabs */
.ll-ranking-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--ll-border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ll-ranking-tabs-nav::-webkit-scrollbar {
  display: none;
}

.ll-ranking-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  padding: 0.9rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ll-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}

.ll-ranking-tab:hover {
  color: var(--ll-text);
}

.ll-ranking-tab.is-active {
  color: var(--ll-text);
  border-bottom-color: var(--ll-gold);
}

.ll-ranking-tab-label {
  font-family: var(--ff-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.ll-ranking-tab-badge {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ll-gold);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.ll-ranking-tab.is-active .ll-ranking-tab-badge {
  opacity: 1;
}

/* Paneles de contenido */
.ll-ranking-tabs-panels {
  padding-top: 0.5rem;
}

.ll-ranking-tab-panel {
  animation: llTabFade 0.22s ease;
}

@keyframes llTabFade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer del panel con link "Ver ranking completo" */
.ll-ranking-panel-footer {
  padding: 0.8rem 0 0.2rem;
  text-align: right;
}

.ll-ranking-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-gold-dark);
  text-decoration: none;
}

/* ============================================================
   ACTIVITY STRIP — TICKER
   ============================================================ */

.ll-activity-strip {
  background: #0e0e0e;
  overflow: hidden;
  height: 2.35rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(224, 168, 86, 0.12);
}

.ll-activity-strip-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: llTickerScroll 32s linear infinite;
  will-change: transform;
}

.ll-activity-strip-track:hover {
  animation-play-state: paused;
}

@keyframes llTickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ll-activity-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.75rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}

.ll-activity-item.is-gold {
  color: var(--ll-gold);
}

.ll-activity-item-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: rgba(224, 168, 86, 0.4);
  flex-shrink: 0;
}

.ll-activity-sep {
  padding: 0 0.25rem;
  color: rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
}

/* ============================================================
   CARRUSEL DE MARCAS
   ============================================================ */

.ll-brands-section {
  padding: 2.5rem 0;
  background: var(--ll-card);
  border-top: 1px solid var(--ll-border);
  border-bottom: 1px solid var(--ll-border);
}

.ll-brands-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.ll-brands-section-title {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.ll-brands-section-link {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-gold-dark);
  text-decoration: none;
  white-space: nowrap;
}

/* Mobile: carrusel horizontal con scroll */
.ll-brands-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
}

.ll-brands-track::-webkit-scrollbar {
  display: none;
}

/* Desktop: wrap centrado, sin scroll */
@media (min-width: 1024px) {
  .ll-brands-track {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

/* Mobile: muestra ~2.5 cards para señalar que hay más */
.ll-brand-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(120px, 36vw, 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.1rem 0.6rem 0.9rem;
  background: var(--ll-bg);
  border: 1px solid var(--ll-border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.ll-brand-card:hover {
  border-color: rgba(224, 168, 86, 0.45);
  background: rgba(224, 168, 86, 0.04);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .ll-brand-card {
    flex: 0 0 clamp(100px, 20vw, 140px);
  }
}

@media (min-width: 1024px) {
  .ll-brand-card {
    flex: 0 0 140px;
    scroll-snap-align: none;
  }
}

.ll-brand-logo-wrap {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ll-brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(0.65);
  transition: filter 0.22s;
}

.ll-brand-card:hover .ll-brand-logo-img {
  filter: grayscale(0) opacity(1);
}

.ll-brand-initials {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ll-muted);
  letter-spacing: -0.02em;
}

.ll-brand-name {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ll-text);
  text-align: center;
  line-height: 1.2;
}

.ll-brand-count {
  font-size: 0.58rem;
  color: var(--ll-muted);
  font-weight: 600;
}

/* ============================================================
   CARRUSEL BENTO — HOME
   ============================================================ */
.ll-home-carousel {
  position: relative;
  margin-bottom: 2rem;
}

.ll-home-carousel-track {
  position: relative;
}

.ll-home-carousel-slide {
  display: none;
  margin-bottom: 0;
}

.ll-home-carousel-slide.is-active {
  display: block;
  animation: llCarouselFade 0.4s ease;
}

@keyframes llCarouselFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Controles del carrusel */
.ll-home-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.9rem;
}

.ll-carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1.5px solid var(--ll-border);
  background: var(--ll-card);
  color: var(--ll-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0;
}

.ll-carousel-btn:hover {
  background: var(--ll-gold);
  border-color: var(--ll-gold);
  color: #121212;
}

.ll-carousel-btn svg {
  width: 0.9rem;
  height: 0.9rem;
}

.ll-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ll-carousel-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  border: none;
  background: rgba(224, 168, 86, 0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.22s;
}

.ll-carousel-dot.is-active {
  background: var(--ll-gold);
  transform: scale(1.5);
}

