/* Custom styles for shop and category pages with sidebar filters */

/* Layout container with sidebar and main content */
.shop-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  /* Stack sidebar above content on smaller screens */
  .shop-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 1;
    margin-bottom: 20px;
  }
  .content {
    order: 2;
  }
}

/* Sidebar styling */
/*
 * Enhance the sidebar with card-like panels, collapsible sections and
 * subtle animations. Each filter group is now styled as its own
 * container with a header that can be clicked to expand or collapse
 * its content. A chevron icon rotates to indicate the open/closed
 * state. The content area is hidden by default and revealed when
 * the `.open` class is applied to the filter group. Latest products
 * are displayed in a compact list with images and price labels.
 */

/* Base sidebar container remains grid layout defined above */

.sidebar {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual filter groups */
.sidebar .filter-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Header of each filter group */
.sidebar .filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(135deg, #fdf7e3, #fff9d7);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar .filter-header i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

/* Rotate chevron when group is open */
.sidebar .filter-group.open .filter-header i {
  transform: rotate(-180deg);
}

/* Content container hidden by default */
.sidebar .filter-content {
  display: none;
  padding: 16px 18px;
}

.sidebar .filter-group.open .filter-content {
  display: block;
}

/* Lists within filter content */
.sidebar .filter-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .filter-content li {
  margin-bottom: 10px;
}

.sidebar .filter-content label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

/* Price input styles */
.sidebar .price-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar .price-inputs input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.sidebar .filter-buttons {
  display: flex;
  gap: 8px;
}

.sidebar .filter-buttons button {
  flex: 1;
}

/* Latest products list styles */
.sidebar .latest-products {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar .latest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar .latest-item:last-child {
  border-bottom: none;
}

.sidebar .latest-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sidebar .latest-info {
  flex: 1;
}

.sidebar .latest-info a {
  display: block;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}

.sidebar .latest-info span {
  font-size: 13px;
  color: var(--navy);
}

/* Sorting controls */
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.sort-wrap label {
  font-weight: bold;
}

.sort-wrap select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 160px;
}