/* Modern Filter Page Styles */
:root {
  --primary-color: #ff2727;
  --primary-hover: #e02020;
  --text-color: #333;
  --light-text: #666;
  --border-color: #e0e0e0;
  --light-border: #f0f0f0;
  --background-color: #fff;
  --background-gray: #fff;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: all 0.2s ease;
  --overlay-color: rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-color);
  background-color: #fff;
  line-height: 1.5;
}

body.filter-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Shop Container */
.shop-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
}

/* Page Header */
.shop-header {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.search-heading {
  font-size: 25px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--text-color);
  width: 100%;
}

.search-count {
  font-size: 16px;
  color: var(--light-text);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: none;
  margin: 0;
  padding: 0;
}

.filter-toggle, 
.filter-toggle-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
}

.filter-toggle:hover,
.filter-toggle-mobile:hover {
  background-color: var(--background-gray);
}

.filter-toggle svg,
.filter-toggle-mobile svg {
  width: 16px;
  height: 16px;
}

.filter-toggle-mobile {
  display: none;
}

/* Shop Content */
.shop-content {
  display: flex;
  gap: 30px;
}

/* Filter Sidebar */
.filter-sidebar {
  width: 250px;
  flex-shrink: 0;
  background-color: var(--background-color);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.filter-sidebar.hidden {
  width: 0;
  overflow: hidden;
  margin-right: -30px;
}

.filter-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}

/* Filter Groups */
.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--light-border);
  padding-bottom: 15px;
}

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

.filter-group-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 10px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.filter-group-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.filter-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.filter-toggle-icon::before,
.filter-toggle-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-color);
  transition: var(--transition);
}

.filter-toggle-icon::before {
  top: 7px;
  left: 0;
  width: 100%;
  height: 2px;
}

.filter-toggle-icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 100%;
}

.filter-group-header[aria-expanded="false"] .filter-toggle-icon::after {
  transform: rotate(90deg);
}

.filter-options {
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

.filter-group:not(.active) .filter-options {
  max-height: 0;
  overflow: hidden;
}

/* Filter Options */
.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  position: relative;
}

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

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  margin-right: 12px;
  position: relative;
}

.filter-option input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4.5px;
  width: 4px;
  height: 10px;
  border: solid var(--primary-color);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-option input[type="checkbox"]:checked + .checkbox-custom {
  border-color: var(--primary-color);
  background-color: var(--background-color);
}

.option-label {
  font-size: 14px;
  color: var(--text-color);
}

/* Mobile Filter Controls */
.mobile-filter-controls {
  display: none;
  padding: 15px;
  border-top: 1px solid var(--border-color);
  background-color: var(--background-color);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.filter-btn {
  padding: 12px 0;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  width: 48%;
  text-align: center;
  transition: var(--transition);
}

.cancel-btn {
  background-color: var(--background-gray);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.apply-btn {
  background-color: var(--primary-color);
  color: white;
}

.apply-btn:hover {
  background-color: var(--primary-hover);
}

/* Product Grid */
.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Product Card */
.product-card {
  position: relative;
  background: #fff;
  box-shadow: none;
  border-radius: 0;
}

.product-card:hover {
  transform: none;
  box-shadow: none;
}

.product-link {
  text-decoration: none;
  color: inherit;
}

.product-image {
  position: relative;
  aspect-ratio: 1/1;
  background: #f5f5f5;
  overflow: hidden;
  border-radius: var(--bb10, 10px);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
}

.product-image.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      90deg,
      #f0f0f0 0px,
      #f8f8f8 40px,
      #f0f0f0 80px
  );
  background-size: 936px;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  to { transform: translateX(468px); }
}

.product-info {
  padding: 12px 0;
}

.product-brand {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
  font-weight: 400;
}

.product-name {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
}

.product-price {
  font-weight: 600;
  font-size: 1rem;
}

/* Empty State */
.empty-state {
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: var(--background-color);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state-content {
  max-width: 400px;
  padding: 40px 20px;
}

.empty-state-icon {
  margin: 0 auto 20px;
  width: 60px;
  height: 60px;
  color: var(--light-text);
}

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}

.empty-state p {
  color: var(--light-text);
  margin-bottom: 25px;
}

.browse-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition);
}

.browse-button:hover {
  background-color: var(--primary-hover);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .products-container {
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
  }
}

@media (max-width: 768px) {
  .shop-container {
      padding: 15px;
  }
  
  .shop-header {
      margin-bottom: 15px;
  }
  
  .search-heading {
      font-size: 18px;
      margin-bottom: 8px;
      width: 100%;
  }
  
  .search-count {
      display: inline-block;
      font-size: 14px;
  }
  
  .filter-controls {
      position: static;
      display: flex;
      align-items: center;
  }
  
  .filter-toggle {
      display: none;
  }
  
  .filter-toggle-mobile {
      display: flex;
      padding: 6px 12px;
      font-size: 13px;
  }
  
  .shop-content {
      display: block;
  }
  
  /* Mobile Filter */
  .filter-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1000;
      transform: translateY(100%);
      box-shadow: none;
      border-radius: 0;
      transition: transform 0.3s ease;
      display: flex;
      flex-direction: column;
  }
  
  .filter-sidebar.visible {
      transform: translateY(0);
  }
  
  .filter-scroll {
      flex: 1;
      padding: 20px 15px 80px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
  }
  
  .mobile-filter-controls {
      display: flex;
      justify-content: space-between;
      padding: 15px;
  }
  
  body.filter-open::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: var(--overlay-color);
      z-index: 999;
  }
  
  .products-container {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 0;
  }
  
  .product-image {
      border-radius: 8px;
  }
  
  .product-info {
      padding: 8px 0;
  }
  
  .product-brand {
      font-size: 12px;
  }
  
  .product-name {
      font-size: 14px;
      margin-bottom: 4px;
  }
  
  .product-price {
      font-size: 14px;
  }
}

@media (max-width: 480px) {
  .shop-container {
      padding: 10px;
  }
  
  .products-container {
      gap: 8px;
  }
  
  .filter-controls {
      padding: 0;
  }
}
  
  