/* Shop Page Styles */

.shop-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  min-height: 80vh;
}

/* --- SIDEBAR --- */
.shop-sidebar {
  position: static;
  height: fit-content;
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.search-group {
  padding-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
}

.filter-group {
  padding-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group h3 {
  font-size: 1rem;
  color: #0f172a;
  margin: 0 0 1rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search Input */
.shop-search-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #f8fafc;
  color: var(--site-primary-color);
}

.shop-search-input:focus {
  background: white;
  border-color: #0ea5e9;
  outline: none;
}

/* Category List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s;
  color: #64748b;
  font-size: 0.95rem;
  text-decoration: none;
}

.category-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.category-item.active {
  background: #f0f9ff;
  color: #0ea5e9;
  font-weight: 600;
}

/* Category Parent Group */
.category-parent-group {
  display: flex;
  flex-direction: column;
}

.category-item.parent {
  font-weight: 600;
  color: #0f172a;
}

.category-item.parent .toggle-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.category-parent-group.expanded .category-item.parent .toggle-icon {
  transform: rotate(180deg);
}

/* Category Children */
.category-children {
  display: none;
  flex-direction: column;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid #e2e8f0;
  margin-top: 0.25rem;
  gap: 0.1rem;
}

.category-parent-group.expanded .category-children {
  display: flex;
}

.category-item.child {
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.5rem 0.8rem;
  color: #64748b;
}

.category-item.child:hover {
  color: #0ea5e9;
  background: #f8fafc;
}

.category-item.child.active {
  color: #0ea5e9;
  font-weight: 600;
  background: #f0f9ff;
}

/* --- MAIN CONTENT --- */
.shop-content {
  display: flex;
  flex-direction: column;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.shop-header h1 {
  font-size: 1.8rem;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-count {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 400;
}

.sort-selector select {
  padding: 0.6rem 2rem 0.6rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: white;
  font-size: 0.9rem;
  cursor: pointer;
  color: #334155;
}

.sort-selector select:focus {
  outline: none;
  border-color: #0ea5e9;
}

/* Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns */
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem;
  background: #f8fafc;
  border-radius: 16px;
  color: #64748b;
}

.no-results p {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.btn-reset {
  display: inline-block;
  margin-top: 1rem;
  background: #0f172a;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
  .shop-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .shop-sidebar {
    position: static;
  }

  .shop-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .shop-container {
    padding: 0 1rem;
  }

  .shop-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
}
