/* ===========================
   PRODUCTS PAGE STYLES
   =========================== */

#explore-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* HEADER */
.explore-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 20px 0;
  border-bottom: 2px solid var(--accent);
}

.explore-header h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--herotext);
}

#filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  transition: all 0.2s ease;
}

/* FILTER OVERLAY */
#filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

#filter-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* FILTER PANEL */
#filter-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 350px;
  height: 100vh;
  background-color: var(--background);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  /* Changed to hidden because we'll scroll the body */
  display: flex;
  flex-direction: column;
}

#filter-panel.active {
  transform: translateX(0);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background-color: var(--herobackground);
  color: var(--herotext);
}

.filter-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--herotext);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.close-btn:hover {
  opacity: 0.7;
}

.close-btn .material-symbols-rounded {
  font-size: 32px;
}

/* FILTER SECTIONS */
.filter-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  /* Scroll only the body */
  flex: 1;
}

.filter-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--herotext);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* FILTER CHIPS */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 8px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(166, 105, 48, 0.2);
}

/* GSM INPUTS */
.gsm-slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gsm-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gsm-inputs input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  text-align: center;
  font-family: var(--font);
  transition: border-color 0.3s ease;
}

.gsm-inputs input:focus {
  outline: none;
  border-color: var(--accent);
}

.gsm-inputs span {
  color: var(--text-secondary);
  font-weight: 600;
}

/* FILTER ACTIONS (Sticky Bottom) */
.filter-actions {
  display: flex;
  gap: 12px;
  padding: 24px;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.btn-apply,
.btn-clear {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
}

.btn-apply {
  background-color: var(--primary-light);
  color: var(--primary);
}

.btn-apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(21, 6, 2, 0.3);
}

.btn-clear {
  background-color: var(--herobackground);
  color: var(--herotext);
}

.btn-clear:hover {
  background-color: #ffe8b5;
  transform: translateY(-2px);
}

/* PRODUCTS GRID */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px 28px;
  width: 100%;
}

.product_card_ppg {
  background: var(--surface);
  position: relative;
  padding: 4px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.product_card_ppg:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product_card_ppg img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background-color: var(--surface-dark);
}

.card_buttons_ppg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  font-size: 0.9rem;
  flex: 1;
}

.card_buttons_ppg p {
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.card_buttons_ppg span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--surface-dark);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
}

.card_buttons_ppg span:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: rotate(90deg);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 60px;
  margin-bottom: 40px;
  padding: 0;
}

.page-btn,
.page-nav-btn {
  padding: 8px 14px;
  border: 1px solid transparent;
  background-color: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(.active),
.page-nav-btn:hover:not(:disabled) {
  background-color: var(--primary-light);
  color: #fff;
}

.page-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background-color: transparent;
  color: var(--text-light);
}

.page-nav-btn .material-symbols-rounded {
  font-size: 20px;
}

/* NO RESULTS MESSAGE */
.explore-grid p {
  padding: 0px 10px;
  grid-column: 1 / -1;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .explore-grid {
    gap: 15px 24px;
  }
}

@media (max-width: 768px) {
  #explore-page {
    padding: 15px;
  }

  .explore-header {
    margin-bottom: 25px;
  }

  .explore-header h2 {
    font-size: 1.8rem;
  }

  #filter-panel {
    width: 400px;
  }

  .explore-grid {
    gap: 12px 20px;
  }
}

@media (max-width: 480px) {
  #explore-page {
    padding: 12px;
  }

  .explore-header {
    margin-bottom: 20px;
    gap: 15px;
  }

  .explore-header h2 {
    font-size: 1.4rem;
  }

  #filter-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  #filter-panel {
    width: 100%;
  }

  .explore-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
  }

  .pagination {
    gap: 4px;
  }

  .page-btn {
    padding: 5px 8px;
    font-size: 0.85rem;
    min-width: 32px;
  }
}