/* === GRID GERAL === */
.albums-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-areas:
    "sidebar info"
    "sidebar products";
  gap: 22px;
  max-width: 1320px;
  margin: 30px auto;
  padding: 0 18px;
}

.albums-grid .sidebar {
  grid-area: sidebar;
}

.albums-grid .info {
  grid-area: info;
}

.albums-grid .products {
  grid-area: products;
}

.albums-grid .info,
.albums-grid .products,
.albums-grid .sidebar {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.albums-grid .sidebar,
.albums-grid .products {
  padding: 18px;
}

.albums-grid .info {
  padding: 12px 18px 18px 18px;
}

/* === CONTEÚDO CENTRAL === */
.albums-info-content {
  max-width: 1100px;
  margin: 0 auto;
}

.albums-title {
  font-size: 26px;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 14px 0;
  line-height: 1.15;
}

/* === SEÇÕES (ARTISTAS + GÉNEROS) === */
.albums-section {
  margin-bottom: 12px;
}

.albums-section:last-child {
  margin-bottom: 0;
}

.albums-section h3 {
  font-size: 16px;
  margin: 0 0 12px 0;
  color: #333;
}

/* === GRELHAS DE ARTISTAS E GÉNEROS === */
.albums-grid .artist-grid,
.albums-grid .genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px 12px;
  margin-bottom: 0.5rem;
}

.albums-grid .artist-item,
.albums-grid .genre-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #222;
  transition: transform 0.15s ease;
  min-width: 84px;
}

.albums-grid .artist-item:hover,
.albums-grid .genre-item:hover {
  transform: translateY(-2px);
}

.albums-grid .artist-avatar,
.albums-grid .genre-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e6e6e6;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  box-shadow: none;
}

.albums-grid .artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.albums-grid .genre-avatar {
  background: linear-gradient(135deg, #dbeafe, #c7d2fe);
  border: 2px solid #e6e6e6;
}

.albums-grid .artist-name,
.albums-grid .genre-name {
  margin-top: 6px;
  font-size: 11.5px;
  max-width: 85px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: #222;
}

/* === LINKS "TODOS" === */
.all-link {
  margin-top: 8px;
  text-align: right;
}

.see-all {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a5f;
  text-decoration: none;
  transition: color 0.2s ease;
}

.see-all:hover {
  color: #2b4a77;
  text-decoration: underline;
}

/* === SIDEBAR (FILTROS) === */
.sidebar h3 {
  font-size: 15px;
  color: #1e3a5f;
  margin: 0 0 8px;
}

.albums-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.albums-filters label {
  font-weight: 600;
  margin-top: 10px;
}

.albums-filters select,
.albums-filters input[type="number"] {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
}

.albums-filters .price-range {
  display: flex;
  align-items: center;
  gap: 5px;
}

.albums-filters .button {
  margin-top: 12px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.albums-filters .button:hover {
  background: #2b4a77;
}

/* === SECÇÃO PRODUTOS === */
.products {
  margin-top: 0;
}

.section-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f1f1;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #1e3a5f;
}

.section-head p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #666;
}

/* === GRID DE PRODUTOS === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

/* === PAGINAÇÃO === */
.products-pagination {
  margin-top: 24px;
}

.products-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  justify-content: center;
  align-items: center;
}

.products-pagination a.page-numbers,
.products-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  color: #1e3a5f;
  background: #fff;
}

.products-pagination a.page-numbers:hover {
  background: #f5f5f5;
}

.products-pagination .current {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

.products-pagination .dots {
  border: none;
  background: transparent;
  min-width: auto;
  padding: 0 4px;
}

/* === ESTADOS === */
.muted,
.no-results {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* ======= BOT VER PRODUTOS ======= */
.products .section-head-copy p {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}

.products .section-head-copy p .see-all {
  margin-left: auto;
  white-space: nowrap;
}

/* === RESPONSIVO === */
@media (max-width: 1200px) {
  .albums-grid .artist-grid,
  .albums-grid .genre-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 992px) {
  .albums-grid .artist-grid,
  .albums-grid .genre-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 980px) {
  .albums-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "products"
      "sidebar";
  }

  .albums-grid .sidebar {
    order: 3;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .albums-grid .artist-grid,
  .albums-grid .genre-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .albums-grid .artist-grid,
  .albums-grid .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .albums-grid {
    padding: 0 14px;
  }

  .albums-grid .info,
  .albums-grid .products,
  .albums-grid .sidebar {
    padding: 14px;
  }

  .albums-grid .info {
    padding-top: 8px;
  }

  .section-head h2 {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .products .section-subhead {
    flex-direction: column;
    align-items: flex-start;
  }

  .products .section-subhead .see-all {
    margin-top: 4px;
  }
}

/* =========================
   MOBILE / TABLET FILTER DRAWER
========================= */

.albums-page {
  overflow-x: hidden;
}

body.filters-open {
  overflow: hidden;
}

.filters-toggle {
  display: none;
}

.filters-overlay {
  display: none;
}

@media (max-width: 980px) {
  .albums-page .albums-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "products";
    gap: 16px;
    padding: 0 14px;
  }

  .albums-page .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    overflow-y: auto;
    z-index: 1002;
    background: #fff;
    padding: 18px;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .albums-page .sidebar.active {
    transform: translateX(0);
  }

  .filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px 14px 0;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  }

  .filters-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    z-index: 1001;
    transition: opacity 0.25s ease;
  }

  .filters-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .albums-page .artist-grid,
  .albums-page .genre-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .albums-page .albums-grid {
    padding: 0 12px;
  }

  .albums-page .info,
  .albums-page .products {
    padding: 14px;
  }

  .albums-page .artist-grid,
  .albums-page .genre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .albums-page .albums-title {
    font-size: 22px;
  }
}


/* MOBILE — até 550px → 3 items */
@media (max-width: 550px) {
  .albums-page .artist-grid .artist-item:nth-child(n+4),
  .albums-page .genre-grid .genre-item:nth-child(n+4) {
    display: none;
  }

  .albums-page .artist-grid,
  .albums-page .genre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* TABLET — 551px até 980px → 5 items */
@media (min-width: 551px) and (max-width: 980px) {
  .albums-page .artist-grid .artist-item:nth-child(n+6),
  .albums-page .genre-grid .genre-item:nth-child(n+6) {
    display: none;
  }

  .albums-page .artist-grid,
  .albums-page .genre-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}