/* === PAGE PRODUTOS === */
.products-page {
  margin: 0;
}

.filters-toggle {
  display: none;
}

/* === GRID GERAL === */
.products-page .albums-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  max-width: 1320px;
  margin: 30px auto;
  padding: 0 18px;
  align-items: start;
}

.products-page .sidebar,
.products-page .products {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.products-page .sidebar {
  position: sticky;
  top: 20px;
}

/* === TÍTULO SIDEBAR === */
.products-page .sidebar h3 {
  font-size: 15px;
  color: #1e3a5f;
  margin: 0 0 10px;
}

/* === FILTRO REUTILIZÁVEL === */
.products-page .albums-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.products-page .albums-filters label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-top: 8px;
}

.products-page .albums-filters select,
.products-page .albums-filters input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #222;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.products-page .albums-filters select:focus,
.products-page .albums-filters input[type="number"]:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.products-page .albums-filters .price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.products-page .albums-filters .price-range input {
  flex: 1;
  min-width: 0;
}

.products-page .albums-filters .price-range span {
  font-size: 14px;
  color: #666;
  padding: 0 2px;
}

.products-page .albums-filters .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: #1e3a5f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.products-page .albums-filters .button:hover {
  background: #2b4a77;
}

.products-page .albums-filters .button:active {
  transform: translateY(1px);
}

/* === ÁREA DE PRODUTOS === */
.products-page .products {
  margin-top: 0;
  min-width: 0;
}

.products-page .products--full {
  width: 100%;
}

.products-page .section-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f1f1;
}

.products-page .section-head h1,
.products-page .section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #1e3a5f;
}

.products-page .section-head p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #666;
}

/* === CONTAINER DOS RESULTADOS === */
.products-page #albums-container {
  min-height: 120px;
}

/* === GRID DE PRODUTOS === */
.products-page .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

/* === ESTADOS === */
.products-page .muted,
.products-page .no-results {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* === PAGINAÇÃO === */
.products-page .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  justify-content: center;   
  align-items: center;  
}

.products-page .page-numbers a,
.products-page .page-numbers span {
  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-page .page-numbers a:hover {
  background: #f5f5f5;
}

.products-page .page-numbers .current {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

/* === RESPONSIVO === */
@media (max-width: 980px) {
  .products-page .albums-grid {
    grid-template-columns: 1fr;
  }

  .products-page .sidebar,
  .products-page .products {
    width: 100%;
  }
    
    
  .products-page .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .products-page .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .products-page .albums-grid {
    padding: 0 14px;
  }

  .products-page .sidebar,
  .products-page .products {
    padding: 14px;
  }

  .products-page .section-head h1,
  .products-page .section-head h2 {
    font-size: 20px;
  }

  .products-page .albums-filters .price-range {
    grid-template-columns: 1fr;
  }

  .products-page .albums-filters .price-range span {
    display: none;
  }

  .products-page .albums-filters .button {
    width: 100%;
  }
}


/* =========================
   FILTER DRAWER MOBILE
========================= */




  /* botão 
  .filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 18px;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
  }

}
*/
/* =========================
   MOBILE FIXES - PRODUTOS
========================= */

.products-page {
  overflow-x: hidden;
}

.products-page .albums-grid,
.products-page .products,
.products-page #albums-container,
.products-page .products-grid {
  min-width: 0;
}

.products-page .products-grid > * {
  min-width: 0;
}

@media (max-width: 980px) {

  .products-page .albums-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 14px;
  }

  .filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px 14px 0;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
  }

.products-page .sidebar {
  position: fixed;
  top: 12px;
  left: -100%;
  width: min(65vw, 220px);
  max-width: 220px;

  height: auto; /* 👈 IMPORTANTE */
  max-height: calc(100vh - 24px); /* 👈 limite */

  z-index: 2000;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  transition: left 0.3s ease;
  padding: 16px 14px;
  border-radius: 12px 12px 12px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

  .products-page .sidebar.active {
    left: 0;
  }

  .filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
  }

  .filters-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .products-page .products {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }

  .products-page .albums-filters,
  .products-page .albums-filters * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .products-page .albums-filters select,
  .products-page .albums-filters input[type="number"] {
    width: 100%;
    max-width: 100%;
  }

  .products-page .albums-filters .price-range {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .products-page .albums-filters .price-range span {
    display: none;
  }

  .products-page .albums-filters .button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .products-page .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 390px) {
  .products-page .products {
    padding: 12px;
  }

  .products-page .section-head h1 {
    font-size: 20px;
  }
}

@media (max-width: 320px) {
  .products-page .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .filters-toggle {
    margin: 14px 12px 0;
  }

  .products-page .albums-grid {
    padding: 0 12px;
  }
}

/* =========================
   FILTER DRAWER SIZE TUNING
========================= */

@media (max-width: 390px) and (min-width: 321px) {
  .products-page .sidebar {
    width: min(65vw, 220px);
    max-width: 220px;
    padding: 16px 14px;
  }

  .products-page .albums-filters label {
    font-size: 13px;
    margin-top: 6px;
  }

  .products-page .albums-filters select,
  .products-page .albums-filters input[type="number"] {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .products-page .albums-filters .button {
    min-height: 40px;
    font-size: 13px;
  }
}

@media (max-width: 320px) {
  .products-page .sidebar {
    width: min(65vw, 200px);
    max-width: 200px;
    padding: 14px 12px;
  }

  .products-page .albums-filters label {
    font-size: 12px;
    margin-top: 6px;
  }

  .products-page .albums-filters select,
  .products-page .albums-filters input[type="number"] {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .products-page .albums-filters .button {
    min-height: 38px;
    font-size: 12px;
  }
}

/* =========================
   FIX OVERFLOW - PRODUTOS
========================= */

.products-page,
.products-page * {
  box-sizing: border-box;
}

.products-page {
  overflow-x: clip;
}

.products-page .albums-grid,
.products-page .products,
.products-page #albums-container,
.products-page .products-grid {
  min-width: 0;
  max-width: 100%;
}

.products-page .products {
  width: auto;
  max-width: 100%;
}

.products-page .products-grid > * {
  min-width: 0;
  max-width: 100%;
}

.products-page .product-card,
.products-page .product-thumb-wrap,
.products-page .product-card .thumb,
.products-page .product-card img {
  max-width: 100%;
}

@media (max-width: 980px) {
  .products-page .albums-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .products-page .products {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .products-page .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 390px) {
  .products-page .albums-grid {
    padding: 0 12px;
  }

  .products-page .products {
    padding: 12px;
  }

  .products-page .products-grid {
    gap: 12px;
  }
}

@media (max-width: 320px) {
  .products-page .albums-grid {
    padding: 0 10px;
  }

  .products-page .products {
    padding: 10px;
  }

  .products-page .products-grid {
    gap: 10px;
  }
}
