/* Marcas explorer — no modifica estilos globales del tema */

.po-brands-page-wrap {
  padding-bottom: 2rem;
}

.po-brands-page-header .po-section__title {
  margin-bottom: 0.75rem;
}

.po-brands-page-intro {
  margin-bottom: 1.5rem;
}

.po-brands-hub {
  position: relative;
}

/* Mosaico inicial (escritorio) */
.po-brands-hub--mosaic .po-brands-hub__mosaic-intro {
  text-align: center;
  margin-bottom: 1rem;
}

.po-brands-hub--mosaic .po-brands-hub__hint {
  margin: 0;
  color: #5c4a32;
  font-size: 0.95rem;
}

.po-brands-hub--mosaic .po-brands-hub__rail {
  max-width: 1000px;
  margin: 0 auto;
}

.po-brands-hub--mosaic .po-brands-hub__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.65rem;
}

.po-brands-hub--mosaic .po-brand-tile {
  min-height: 3.1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--po-border, #e2d8c8);
  background: linear-gradient(180deg, #fffdf8 0%, #f5efe3 100%);
  color: #2b2114;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.po-brands-hub--mosaic .po-brand-tile:hover {
  border-color: var(--po-brand, #c79a4f);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.po-brands-hub--mosaic .po-brands-hub__reset {
  display: none;
}

.po-brands-hub--mosaic .po-brands-hub__panel {
  display: none;
}

/* Modo ruleta + productos */
.po-brands-hub.is-browse {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.po-brands-hub.is-browse .po-brands-hub__mosaic-intro {
  display: none;
}

.po-brands-hub.is-browse .po-brands-hub__rail {
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--po-border, #e2d8c8);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.po-brands-hub.is-browse .po-brands-hub__reset {
  display: block;
  width: 100%;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  border-radius: 8px;
  border: 1px dashed var(--po-brand, #c79a4f);
  background: transparent;
  color: #6b5428;
  cursor: pointer;
}

.po-brands-hub.is-browse .po-brands-hub__reset:hover {
  background: rgba(199, 154, 79, 0.12);
}

.po-brands-hub.is-browse .po-brands-hub__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 7rem);
  padding-right: 0.2rem;
  scroll-behavior: smooth;
}

.po-brands-hub.is-browse .po-brand-tile {
  flex: 0 0 auto;
  width: 100%;
  min-height: 2.4rem;
  padding: 0.5rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #2b2114;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.po-brands-hub.is-browse .po-brand-tile:hover,
.po-brands-hub.is-browse .po-brand-tile.is-active {
  border-color: var(--po-brand, #c79a4f);
  background: rgba(199, 154, 79, 0.14);
}

.po-brands-hub.is-browse .po-brands-hub__panel {
  display: block;
  min-width: 0;
}

.po-brands-hub__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.po-brands-hub__panel-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-family: Georgia, "Times New Roman", serif;
  color: #2b2114;
}

.po-brands-hub__archive {
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.po-brands-hub__products-wrap .po-products {
  margin: 0;
}

.po-brands-hub__empty {
  margin: 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--po-border, #e2d8c8);
  border-radius: var(--po-radius, 10px);
}

.po-brands-hub__loading {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #6b5428;
}

/* Móvil: ruleta estrecha (texto / botones delgados) */
@media (max-width: 720px) {
  .po-brands-hub.is-browse {
    grid-template-columns: minmax(4.2rem, 5.5rem) minmax(0, 1fr);
    gap: 0.55rem;
  }

  .po-brands-hub.is-browse .po-brands-hub__rail {
    padding: 0.35rem 0.25rem;
    max-height: calc(100vh - 1.5rem);
  }

  .po-brands-hub.is-browse .po-brands-hub__list {
    max-height: calc(100vh - 5.5rem);
    gap: 0.2rem;
  }

  .po-brands-hub.is-browse .po-brand-tile {
    min-height: 0;
    padding: 0.18rem 0.2rem;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .po-brands-hub.is-browse .po-brands-hub__reset {
    font-size: 0.58rem;
    padding: 0.2rem 0.15rem;
    line-height: 1.1;
    word-break: break-word;
    hyphens: auto;
  }

  .po-brands-hub--mosaic .po-brands-hub__list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.45rem;
  }

  .po-brands-hub--mosaic .po-brand-tile {
    min-height: 2.6rem;
    font-size: 0.78rem;
    padding: 0.45rem 0.35rem;
  }

  .po-brands-hub__archive {
    width: 100%;
    text-align: center;
  }
}
