/* MOBILE CSS for CEG Store */



.main-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  margin: 13px 0 10px;
  font-variant: small-caps;
}

.producttitle {
  font-variant: small-caps;
}

.filters-wrapper {
  display: block;
  position: relative;
  margin: 1rem 0;
}

.filter-toggle {
  display: block;
  width: 100%;
  background-color: #0b5394;
  color: white;
  font-size: 1.1rem;
  padding: .5rem 1rem;
  border: none;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #ccc;
}

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

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

.filters {
  font-size: 13px;
}

.filter-group {
  margin-bottom: 10px;
}

.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;
}

.filter-options {
  display: none;
  padding: 10px;
  border: 1px solid #ddd;
  border-top: none;
  font-size: 110%;
  letter-spacing: 3%;
}

.filter-group.open .filter-options {
  display: block;
}

.filters label {
  margin-right: 15px;
}

.sort-container {
  font-size: 14px;
  color: #0b5394;
  margin: 0 0 1rem 0;
  padding: 0 1rem;
}

.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;
  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;
}

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

.custom-select option {
  background-color: #fff;
  color: #0b5394;
  padding: 10px;
}

.custom-select option:hover {
  background-color: #eef4fa;
  color: #000;
}

.products-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.product {
  border: 1px solid #ccc;
  padding: 10px;
  width: 45%;
  font-family: sans-serif;
  color: #0b5394;
  text-align: center;
  box-sizing: border-box;
}

.product img {
  width: 100%;
}

.product a {
  color: #0b5394;
  text-decoration: none;
}

.product a:visited {
  color: #0b5394;
}

.materials {
  font-size: 0.9em;
  color: #0b5394;
  margin-top: 4px;
}

#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 {
}


/* Style for the search bar container */
#search-input {
  width: 45%; /* Make the search input take full width */
  max-width: 400px; /* Optional: Limit the width */
  padding: 10px; /* 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: 10px 20px; /* Padding for the button */
  font-size: 15px; /* Font size of the button text */
  border: solid #0b5394; /* Remove border */
  border-radius: 5px; /* Rounded corners */
  cursor: pointer; /* Change the cursor to a pointer on hover */
  width: 20%; /* 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:lightslategrey;   
}


.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%);
}
