

/* Main Layout */
.All-product-container {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

/* Product Grid */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 75%;
  margin: 0 auto; /* Centers the grid horizontally */
  place-items: center; /* Centers content both horizontally and vertically in each cell */
  /* padding: 20px;  */
}



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

  .filters {
    width: 100%;
  }

  .products {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    /* margin-left: 50px; */

  }
}
@media (max-width: 480px) {
  .products {
    grid-template-columns: repeat(1, 1fr);
    /* margin-left: 50px; */
  }
}

/* General Styles */
.filters {
  background-color: #2d2d2d;
  color: #f5f5f5;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
  margin: 0 auto;
  width: 25%;
}

.filters h2 { 
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
  color: #860505;
}

.filters label {
  font-size: 1rem;
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
}

/* Price Range Slider */
.slider-container {
  margin-bottom: 1.5rem;
      width: 96%;
}

.slider-container input[type="range"] {
  /* -webkit-appearance: none; */
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #860505, #3f51b5);
  outline: none;
  transition: all 0.3s;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #860505;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  /* color: #860505; */
}

/* Collapsible Filters */
.collapse {
  margin-top: 1rem;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
  width: 100%;
}

.collapse h3 {
  cursor: pointer;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.collapse h3:hover {
  color: #860505;
}



/* Updated Collapse Content Grid */
.collapse-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns */
  /* gap: 1rem; */
  padding: 0.5rem;
  background-color: #444;
  border-radius: 8px;
  margin-top: 0.5rem;
  transition: max-height 0.3s ease;
}
/* Enhanced Checkbox Group */
.checkbox-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.checkbox-group:hover {
  background-color: rgba(134, 5, 5, 0.1);
}

.checkbox-group input[type="checkbox"] {
  /* Hide default checkbox */
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

/* Custom checkbox */
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  /* padding: 0.5rem 0.75rem; */
  border-radius: 4px;
  position: relative;
  user-select: none;
  white-space: nowrap;
}

/* Checkbox visual indicator */
.checkbox-group label::before {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #860505;
  border-radius: 4px;
  background-color: #444;
  transition: all 0.2s ease;
}

/* Checkmark (hidden by default) */
.checkbox-group label::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 0.4em;
  height: 0.8em;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0;
  transition: all 0.2s ease;
}

/* Checked state */
.checkbox-group input[type="checkbox"]:checked + label::before {
  background-color: #860505;
  border-color: #860505;
}

.checkbox-group input[type="checkbox"]:checked + label::after {
  opacity: 1;
}

/* Focus state */
.checkbox-group input[type="checkbox"]:focus-visible + label {
  outline: 2px solid #860505;
  outline-offset: 2px;
}

/* Hover effects */
.checkbox-group label:hover {
  color: #fff;
  background-color: rgba(134, 5, 5, 0.2);
}

.checkbox-group label:hover::before {
  border-color: #a30707;
}

/* Active/pressed state */
.checkbox-group input[type="checkbox"]:active + label {
  transform: scale(0.96);
}

/* Disabled state */
.checkbox-group input[type="checkbox"]:disabled + label {
  color: #888;
  cursor: not-allowed;
}

.checkbox-group input[type="checkbox"]:disabled + label::before {
  border-color: #666;
  background-color: #3a3a3a;
}

/* Ripple effect (optional) */
.checkbox-group label:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: translateY(-65%) rotate(45deg) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-65%) rotate(45deg) scale(2.5);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .checkbox-group {
    gap: 0.6rem;
  }
  
  .checkbox-group label {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
  
  .checkbox-group label::before {
    width: 1.1em;
    height: 1.1em;
  }
}

@media (max-width: 480px) {
  .checkbox-group label {
    white-space: normal;
    line-height: 1.4;
  }
}

/* Filter Buttons */
.apply-filters {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: #860505;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.apply-filters:hover {
  background-color: #860505;
  transform: translateY(-2px);
}

.apply-filters:active {
  transform: translateY(0);
}

/* Interactive Filter Layout */
.other-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.card {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  position: relative;
}

.imgBox {
  width: 100%;
  height: 300px; /* Adjust based on your image size */
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card:hover .imgBox {
  transform: rotateY(180deg);
}
.card:hover .front {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s ease;
}


.front, .back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.front img, .back img {
  max-width: 100%;
  max-height: 100%;
}

.back {
  transform: rotateY(180deg);
}
/* Responsive Design */
@media screen and (max-width: 768px) {
  .filters {
    width: 100%;
    padding: 1rem;
  }

  .filters h2 {
    font-size: 1.4rem;
  }

  .slider-container input[type="range"] {
    height: 6px;
  }

  .collapse h3 {
    font-size: 1rem;
  }

  .checkbox-group label {
    font-size: 0.9rem;
  }

  .apply-filters {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  .filters {
    width: 100%;
    padding: 0.8rem;
    border-radius: 0;
  }

  .filters h2 {
    font-size: 1.2rem;
  }

  .slider-values {
    font-size: 0.9rem;
  }

  .checkbox-group label {
    font-size: 0.8rem;
  }

  .apply-filters {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
  }
}

/* Base Styles */
details {
  border-radius: 8px;
  margin: 1rem 0;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

details[open] {
  /* padding: 1rem; */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

summary {
  cursor: pointer;
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  /* color: #333; */
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: #860505;
}

summary:hover {
  color: #fff;
}

summary::marker {
  content: "";
}

summary::before {
  content: "▶";
  font-size: 1rem;
  color: #333;
  margin-right: 0.5rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
  /* color: #860505; */
}

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

/* Responsive Styles */
@media screen and (max-width: 768px) {
  details {
    font-size: 0.9rem;
  }

  summary {
    padding: 0.8rem;
  }

  details > div {
    padding: 0.8rem;
  }
}


/* Enhanced Radio Button Group */
.radio-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.radio-group:hover {
  background-color: rgba(134, 5, 5, 0.1);
}

.radio-group input[type="radio"] {
  /* Hide default radio */
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

/* Custom radio */
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  position: relative;
  user-select: none;
  white-space: nowrap;
}

/* Radio visual indicator */
.radio-group label::before {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #860505;
  border-radius: 50%; /* Circular for radio */
  background-color: #444;
  transition: all 0.2s ease;
}

/* Inner dot (hidden by default) */
.radio-group label::after {
  content: "";
  position: absolute;
  left: .8rem;
  top: 50%;
  width:1.3em;
  height: 1.3em;
  background: #860505;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.2s ease;
}

/* Checked state */
.radio-group input[type="radio"]:checked + label::before {
  border-color: #860505;
}

.radio-group input[type="radio"]:checked + label::after {
  opacity: 1;
}

.radio-group input[type="radio"]:checked + label {
  color: #fff;
  background-color: rgba(134, 5, 5, 0.2);
}

/* Focus state */
.radio-group input[type="radio"]:focus-visible + label {
  outline: 2px solid #860505;
  outline-offset: 2px;
}

/* Hover effects */
.radio-group label:hover {
  color: #fff;
  background-color: rgba(134, 5, 5, 0.1);
}

.radio-group label:hover::before {
  border-color: #a30707;
}

/* Active/pressed state */
.radio-group input[type="radio"]:active + label {
  transform: scale(0.96);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .radio-group {
    gap: 0.6rem;
  }
  
  .radio-group label {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
  
  .radio-group label::before {
    width: 1.1em;
    height: 1.1em;
  }
  
  .radio-group label::after {
    left: 0.95rem;
    width: 0.5em;
    height: 0.5em;
  }
}

@media (max-width: 480px) {
  .radio-group label {
    white-space: normal;
    line-height: 1.4;
  }
}
#sort-order{
  grid-template-columns: repeat(1, 1fr);
}
