:root {
  --primary-blue: #140a9a;
  --dark-blue: #1d4ed8;
  --light-blue: #eff6ff; /* blue-50 */
  --medium-blue: #bfdbfe; /* blue-200 */
  --text-blue: #1e40af; /* blue-800 */
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --white: #ffffff;
  --border-color: #e5e7eb;
}

body {
  font-family: sans-serif;
  margin: 0;
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.containerp {
  display: flex;    margin: 10px 0
 
}

.sidebar {
  width: 256px; /* 64 * 4px = 256px */
  padding: 24px; /* 6 * 4px = 24px */
  border-right: 1px solid var(--border-color);
  background-color: var(--white);
  flex-shrink: 0;height:100%
}

.filter-section {
  margin-bottom: 16px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.filter-content {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Custom Checkbox Styling */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 25px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 18px; /* text-sm */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

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

.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.clear-all-btn {
  background: none;
  border: none;
  color: var(--primary-blue);
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  border-radius: 4px;
}

.clear-all-btn:hover {
  background-color: var(--light-blue);
  color: var(--dark-blue);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Mobile Filter Button */
.mobile-filter-controls {
  padding: 16px;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  display: none; /* Hidden by default, shown on mobile */
}

.filter-results-btn {
  width: 100%;
  padding: 10px 16px;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  color: var(--gray-700);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s, border-color 0.2s;
}

.filter-results-btn:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-500);
}

.filter-results-btn svg {
  width: 20px;
  height: 20px;
}

/* Sidebar Header for Mobile */
.sidebar-header {
  display: none; /* Hidden by default, shown on mobile */
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 32px; /* text-xl */
  font-weight: 700;
}

.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--gray-500);
  padding: 0;
  line-height: 1;
}

.sidebar-close-btn:hover {
  color: var(--gray-700);
}

.active-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--white);
  flex-wrap: wrap; /* Allow wrapping for smaller screens */
  gap: 10px; /* Space between items when wrapping */
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-info span {
  font-size: 18px;
}

.filter-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  display: flex;
  align-items: center;
  background-color: var(--light-blue);
  color: var(--text-blue);
  font-size: 18px;
  padding: 4px 12px;
  border-radius: 9999px; /* full rounded */
}

.filter-tag .remove-tag-btn {
  background: none;
  border: none;
  color: var(--text-blue);
  margin-left: 4px;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-tag .remove-tag-btn:hover {
  background-color: var(--medium-blue);
}

.unit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-toggle label {
  font-size: 18px;
}

/* Custom Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 38px; /* Adjusted width for better appearance */
  height: 22px; /* Adjusted height */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: 0.4s;
  border-radius: 22px; /* Half of height for roundness */
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; /* Adjusted size */
  width: 18px; /* Adjusted size */
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-blue);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-blue);
}

input:checked + .slider:before {
  -webkit-transform: translateX(16px); /* Adjusted translation */
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

.product-grid {
 padding: 24px 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
  gap: 24px;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 180px; /* Fixed height for images */
  object-fit: cover;
}

.card-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 20px; /* text-lg */
  font-weight: 700;
  margin: 0;
}

.card-description {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.product-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 14px;
}

.product-details div:nth-child(odd) {
  color: var(--gray-500);
}

.product-details div:nth-child(even) {
  text-align: right;
  font-weight: 500;
}

.card-footer {
  padding: 16px;
  padding-top: 0;
}

.view-details-btn {
  width: 100%;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.view-details-btn:hover {
  background-color: var(--dark-blue);
}

.hidden {
  display: none !important;
}

/* Basic Accordion-like behavior for filter sections */
.filter-section .filter-content.hidden {
  display: none;
}
.filter-section .filter-header .toggle-icon.collapsed::before {
  content: "+";
}
.filter-section .filter-header .toggle-icon:not(.collapsed)::before {
  content: "-";
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .container {
    display: block; /* Stack elements vertically */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -350px; /* Hide sidebar off-screen */
    height: 100%;
    overflow-y: auto;
    z-index: 100;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* Add shadow for overlay effect */
  }

  .sidebar.sidebar-open {
    left: 0; /* Slide in */
  }

  .sidebar-header {
    display: flex; /* Show sidebar header on mobile */
  }

  .filter-section .filter-header {
    border-bottom: none; /* Remove border for cleaner look in mobile sidebar */
  }

  .mobile-filter-controls {
    display: block; /* Show filter button on mobile */
  }

  .main-content {
    padding-top: 0; /* Remove top padding if filter controls are there */
  }

  .active-filters-bar {
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }

  .filter-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%; /* Take full width */
  }

  .filter-tags-container {
    width: 100%;
  }

  .unit-toggle {
    width: 100%;
    justify-content: flex-end; /* Align to right */
  }

  .product-grid {
    grid-template-columns: 1fr; /* Single column for products on mobile */
    padding: 16px;
    gap: 16px;
  }

  .product-card img {
    height: 200px; /* Adjust image height for mobile */
  }
}
button {
     
    width:auto;
    
}