/* Panasonic Cooker Filter - Frontend Styles */

/* Container */
.panasonic-cooker-filter-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.filter-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

.filter-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #000;
}

.filter-header p {
  font-size: 16px;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* Layout */
.filter-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 2rem;
  align-items: flex-start;
}

/* Sidebar */
.filter-sidebar {
  flex: 0 0 320px;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 8rem;
  max-height: calc(90vh - 8rem);
  overflow-y: auto;
}

/* Filter Sections */
.filter-section {
  /* margin-bottom: 20px; */
  border-bottom: 1px solid #ddd;
  /* padding-bottom: 15px; */
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h3 {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
  color: #000;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin: 10px 0;
  cursor: pointer;
  color: #333;
  font-weight: bold;
}

.filter-title:hover {
  color: #000;
}

.chevron-icon {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.filter-section.active .chevron-icon {
  transform: rotate(180deg);
}

.filter-options {
  display: none;
  padding-left: 5px;
  /* max-height: 250px; */
  /* overflow-y: auto; */
}

.filter-section.active .filter-options {
  display: block;
}

/* Checkbox Styles */
.filter-checkbox {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
}

.filter-checkbox:hover {
  color: #000;
}

.filter-checkbox input {
  margin-right: 8px;
}

/* Disabled Filter Options */
.filter-checkbox.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.filter-checkbox.disabled input {
  cursor: not-allowed;
  pointer-events: none;
}

/* Results Area */
.filter-results {
  flex: 1;
  overflow-y: auto;
  min-height: 70vh;
}

/* Products Grid */
.cooker-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Product Item */
.cooker-item {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.cooker-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cooker-image, .cooker-placeholder {
  width: 100%;
  height: 200px;
  object-fit: contain;
  /* background-color: #f5f5f5; */
}

.cooker-image-wrap {
  padding: 15px;
  text-align: center;
  /* background-color: #f9f9f9; */
  flex: 0 0 auto;
}

.cooker-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.cooker-details {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cooker-title {
  font-size: 16px;
  margin-bottom: 4px;
  color: #111;
  font-weight: bold;
  line-height: 1.3;
}

.cooker-color {
  font-size: 14px;
  margin-bottom: 12px;
  color: #666;
  /* font-style: italic; */
}

.cooker-price {
  font-size: 18px;
  font-weight: bold;
  color: #222;
  margin-top: auto;
  margin-bottom: 0;
  /* padding-top: 8px; */
  /* border-top: 1px solid #eee; */
}

/* Clear All Button */
.clear-all-btn {
  background-color: transparent;
  border: 1px solid #333;
  color: #333;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}

.clear-all-btn:hover {
  background-color: #333;
  color: #fff;
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: #666;
  background-color: #f9f9f9;
  border-radius: 5px;
}

/* Loading State */
.filter-loading {
  position: relative;
  min-height: 300px;
}

.filter-loading::after {
  content: "Loading...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #003da5;
  font-size: 18px;
}

/* Loading state for results */
#cooker-results.loading {
  opacity: 0.6;
  position: relative;
}

#cooker-results.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .filter-layout {
    flex-direction: column;
  }
  
  .filter-sidebar {
    flex: 0 0 100%;
  }
}
