/* Product Filter Styles - Updated to match theme */
.product-layout-container {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.filter-sidebar {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 60px;
  font-family: SVN-Gilroy, sans-serif;
}

.filter-section {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.filter-section:nth-child(2) {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 15px;
}

.filter-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--color-black, #333);
  font-family: "Averta-Semibold";
}

.filter-header i {
  transition: transform 0.3s ease;
  color: var(--color-gray, #666);
  font-size: 12px;
}

.filter-section.collapsed .filter-header i {
  transform: rotate(180deg);
}

.filter-section.collapsed .filter-content {
  display: none;
}

.filter-content {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checkbox Styles */
.filter-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  position: relative;
  padding-left: 28px;
}

.filter-checkbox:last-child {
  margin-bottom: 0;
}

.filter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.filter-checkbox:hover input ~ .checkmark {
  border-color: #007bff;
}

.filter-checkbox input:checked ~ .checkmark {
  background-color: var(--background-static);
  border-color: var(--background-static);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* Price Range Styles */
.price-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  font-family: SVN-Gilroy, sans-serif;
}

.price-input:focus {
  outline: none;
  border-color: var(--color-red, #ec2d3f);
}

.price-separator {
  color: #666;
  font-weight: 500;
}

/* Size Grid Styles */
.size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.size-option {
  cursor: pointer;
}

.size-option input[type="checkbox"] {
  display: none;
}

.size-label {
  display: block;
  padding: 8px 4px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

.size-option:hover .size-label {
  border-color: var(--color-red, #ec2d3f);
}

.size-option input:checked + .size-label {
  background-color: var(--color-red, #ec2d3f);
  color: white;
  border-color: var(--color-red, #ec2d3f);
}

/* Color Grid Styles */
.color-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.color-option:hover {
  background-color: #f8f9fa;
}

.color-option input[type="checkbox"] {
  display: none;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  border: 1px solid #ddd;
  position: relative;
}

.color-option input:checked + .color-swatch:after {
  content: "âœ“";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.color-name {
  font-size: 14px;
  color: #333;
}

/* Filter Actions */
.filter-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.clear-filters-btn {
  width: 100%;
  padding: 10px 15px;
  background: var(--background-static);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: SVN-Gilroy, sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
}

.clear-filters-btn:hover {
  background: #f4c00b;
  color: white;
}

/* Products Grid */
.products-grid {
  flex: 1;
  min-width: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .product-layout-container {
    flex-direction: column;
    gap: 20px;
  }

  .filter-sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }

  .size-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 576px) {
  .filter-sidebar {
    padding: 15px;
  }

  .size-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .price-range {
    flex-direction: column;
    gap: 8px;
  }

  .price-separator {
    display: none;
  }
}

/* Filter Toggle for Mobile */
.filter-toggle {
  display: none;
  width: 100%;
  padding: 12px 20px;
  background: var(--background-static);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .filter-toggle {
    display: block;
  }

  .filter-sidebar {
    display: none;
  }

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

/* Loading states */
.filter-loading {
  opacity: 0.6;
  pointer-events: none;
}

.filter-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-radius: 50%;
  border-top: 2px solid var(--color-red, #ec2d3f);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
