/*CSS File for CEG Store Filters*/

.main-layout {
      display: flex;
      gap: 20px;
    }
.storetext {
	font-size:x-large;
	text-align:center;
	color:#036;
	text-transform: uppercase;
	letter-spacing: .1em;
	display: inline-block;
	width:100%;
	padding-bottom:1%;
}

h1,h2,h3,h4,h5,h6{
	font-family:"Segoe UI",Arial,sans-serif;
	font-weight:400;
	margin:10px 0;
	font-variant: small-caps;
}
.producttitle {
	font-variant: small-caps; 
}

/* Desktop: show filters always */
.desktop-only .filters-container {
  display: block;
}

.filters-wrapper {
	display: none;
}

/* Toggle button is hidden by default (shown only on mobile) */
.filter-toggle {
  display: none;
  margin: 1rem;
  width: 100%;
  background-color: #0b5394;
  color: white;
  font-size: 1.1rem;
  font-family: "Segoe UI", sans-serif;
  padding: .5rem 1rem;
  border: none;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #ccc;
}

.filter-options {
  display: none;
}

/* Expand only when .open is present */
.filter-group.open .filter-options {
  display: block;
}

/* MOBILE VIEW */
@media screen and (max-width: 768px) {
  .filter-toggle {
    display: block;
  }

.filters-wrapper {
	display:block;
  position: relative;
}	
.filters-wrapper.active {
      display: block;
    }
	  .filters-wrapper .filters-container {
    display: none;
  }
.filters-container {
    display: none;
    background: #f9f9f9;
    padding: 1rem;
    border-top: 1px solid #ccc;
    width: 100%;
    margin: 0;
  }

.filters-wrapper.active .filters-container {
    display: block;
  }

	
.filter-group h3 {
    background: #eee;
    padding: 10px;
    margin: 0;
    cursor: pointer;
    color: #0b5394;
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
	  position: relative;
  padding-right: 1.5rem;
  }
	

  .products-container {
    justify-content: center;
  }

  .product {
    width: 45%;
    margin: 10px 5px;
  }
}

.product:hover { transform:translateY(-4px); box-shadow:0 6px 15px rgba(0,0,0,.1); transition:.2s }

.store-content {
	text-align: left;
}
    .filters-container {
      width: 225px;
      flex-shrink: 0;
	  margin-left: 1%;
	  text-align: left;
    }
    .product a {
      color: #0b5394;
    }
    .product a:visited {
      color: #0b5394;
    }
    .filters {
      font-size: 13px;
    }
    .filter-group {
      margin-bottom: 10px;
    }
    .filters label {
      margin-right: 15px;
    }
    .product {
      border: 1px solid #ccc;
      padding: 10px;
      margin: 6px;
      width: 220px;
      font-family: sans-serif;
      color: #0b5394;
      text-align: center;
    }
    .product img {
      width: 100%;
    }
    .products-container {
      display: flex;
      flex-wrap: wrap;
      flex-grow: 1;
    }
    .materials {
      font-size: 0.9em;
      color: #0b5394;
      margin-top: 10px;
    }
    .filter-group h3 {
      cursor: pointer;
      margin: 0;
      padding: 8px;
      background: #eee;
      font-size: 1rem;
      color: #0b5394;
    }

    .filter-options {
      padding: 10px;
      border: 1px solid #ddd;
      border-top: none;
      display: none;
    }
    .filter-group.open .filter-options {
      display: block;
    }

    .filters-container h2 {
      cursor: pointer;
      background: #ddd;
      padding: 10px;
      font-size: 1.2em;
      margin: 0 0 10px 0;
      color: #0b5394;
    }
    .filter-section {
      display: none;
      border: 1px solid #ccc;
      padding: 10px;
      background: #f9f9f9;
    }
    .filters-container.open #filter-section {
      display: block;
	  margin-left: 2%;
    }
	.sort-container {
  font-size: 14px;
  color: #0b5394;
  margin-left:2%;
  padding:0 5px;
		
}
.sort-container select {  font-size: 14px;
  background-color: white;
	border: 1px solid #0b5394;
	border-radius: 6px;
	color: #0b5394;
	  }
	  
.custom-select {
  background-color: #f9f9f9;
  color: #0b5394;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
  appearance: none; /* Removes default arrow styling (browser-specific) */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%230b5394' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px; /* Makes space for the custom arrow */
}

.custom-select:hover,
.custom-select:focus {
  border-color: #0b5394;
  background-color: #eef4fa;
}

.custom-select option {
  background-color: #fff;       /* Light background */
  color: #0b5394;               /* Deep blue text */
  padding: 10px;
}

.custom-select option:hover {
  background-color: #eef4fa;    /* Highlight on hover (only works in Firefox) */
  color: #000;
}

#loading-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #333;
  text-align: center;
  display: none;
}

#loading-message .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
}

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

/* The container for the search bar and button */
.search-container {
	text-align: center;
}


/* Style for the search bar container */
#search-input {
  width: 40%; /* Make the search input take full width */
  padding: 5px; /* Padding inside the input box */
  font-size: 16px; /* Font size of the text inside the input */
  border: 2px solid #ccc; /* Light border around the input */
  border-radius: 5px; /* Rounded corners for the input */
  box-sizing: border-box; /* Make sure padding is included in width */
  margin-bottom: 10px; /* Space between the input and the button */
}

/* Style for the search button */
#search-btn {
  background-color: #0b5394; /* Background color (blue) */
  color: white; /* White text */
  padding: 5px 20px; /* Padding for the button */
  font-size: 16px; /* Font size of the button text */
  border: solid 1px #0b5394; /* Remove border */
  border-radius: 5px; /* Rounded corners */
  cursor: pointer; /* Change the cursor to a pointer on hover */
  width: 100px; /* Make the button take full width */
  transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

/* Hover effect for the search button */
#search-btn:hover {
  background-color: white; /* Darker blue on hover */
	color: #0b5394;
	font-weight: 600;
	border:solid 1px #0b5394;
	border-color: #0b5394;
}

/* For small screens or mobile view: adjust the layout */
@media (max-width: 768px) {
  #search-input {
    font-size: 14px; /* Slightly smaller text on mobile */
    padding: 8px; /* Smaller padding on mobile */
  }

  #search-btn {
    font-size: 14px; /* Smaller text for the button */
    padding: 8px 16px; /* Adjust padding for mobile */
  }
}

#search-input::placeholder {
  color: #aaa; /* Lighter text for the placeholder */
  font-style: italic; /* Optional: italic style */
}


/* chip bar container */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

/* hide when JS adds .hidden */
.active-filters.hidden { display: none; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #555;
}

.clear-btn {
  margin-top: 1rem;
  background: #0b5394;
  color: #fff;
  border: none;
  padding: .5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
}

.clear-btn:hover { background: #374151; }

/* checkbox color */
.filter-options input[type='checkbox']{
  accent-color:#0b5394;   
}
.filter-options input[type='checkbox']:hover{
  accent-color:powderblue;   
}


.sold-tag {
  display: inline-block;
  background: #ccc;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
}
.product.sold img {
  opacity: 0.4;
  filter: grayscale(60%);
}

.avail-toggle 
{ margin-right: 18px; color: #0b5394; cursor: pointer; }

.empty-state 
{ text-align: center; padding: 30px 16px; max-width: 520px; margin: 0 auto; }