/* =========================================
   COLLECTIONS PAGE STYLES
========================================= */

.collection-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 70px 20px var(--gap-section-sm) 20px; /* 50px topbar + 20px gap */
}

/* --- Header Section --- */
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--gap-element-lg);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 15px;
}

.collection-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.collection-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-select {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  cursor: pointer;
  outline: none;
}

.btn-filter-mobile {
  display: none; /* Hidden on desktop */
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 15px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
}

/* --- Content Layout --- */
.collection-content {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

/* --- Sidebar Filters --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-close-btn {
  display: none;
}

.collection-sidebar {
  position: sticky;
  top: 100px; /* Below topbar */
}

.filter-group {
  margin-bottom: 30px;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #444;
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-label:hover {
  color: #000;
}

.filter-label input[type="checkbox"] {
  accent-color: #000;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.product-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: #999;
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
  .collection-container {
    padding: 70px 0 var(--gap-section-sm) 0; /* Keep top padding, remove horizontal for edge-to-edge */
  }

  .collection-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .collection-header {
    flex-direction: row; /* Keep filter and sort inline */
    align-items: center;
    padding: 0 20px 15px 20px; /* Add padding back to header since container lost it */
  }

  .collection-controls {
    width: 100%;
    justify-content: space-between;
  }

  .btn-filter-mobile {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  /* Off-canvas Sidebar */
  .collection-sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden to the left */
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    padding: 60px 20px 30px; /* Extra top padding for close button */
    overflow-y: auto;
    transition: left 0.3s ease;
    border: none;
    margin: 0;
  }

  .collection-sidebar.active {
    left: 0; /* Slide in */
  }

  .sidebar-close-btn {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
  }
}
