/* Smartphone & Tablet */
@media screen and (min-width: 0px) and (max-width: 992px) {

  .filters {
    overflow-y: auto;
  }
  
  .lista_filtro {
    margin-bottom: 1rem;
  }
  
  .lista_filtro h6 {
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
  
  .lista_filtro_item {
    display: inline-block;
    background-color: #f5f5f5; /* Light grey background */
    padding: 0.25rem 0.5rem;
    font-size: .8rem;
    margin: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  
  #count-button {
    background-color: #BED031;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }


.carousel-control-next {
  width: 55%;
}


.product-discount {
  position: absolute;
  z-index: 111;
  top: 1rem;
  left: 1rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #343a40;
  padding: .4rem .8rem;
  background-color: #BED031;
  border-radius: .25rem;
  width: auto;
}

.product-discount-solo-omline-label {
  position: absolute;
  z-index: 111;
  top: 1rem;
  left: 1rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFF;
  padding: .4rem .8rem;
  background-color: #7B2CBF;
  border-radius: .25rem;
  width: auto;
}


.product-discount-solo-online {
  position: absolute;
  z-index: 111;
  top: 3.6rem;
  left: 1rem;
  color: #7B2CBF; 
  font-size: .7rem;
  font-weight: 600;
}

.product-details {
  padding: 1rem 0rem;

}

.product-price {
  display: inline-block;
  width: 100%;
  vertical-align: text-top;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0rem .5rem;
}

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

.product-genere{
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 28px;
  width: 28px;
  position:relative;
}

.product-breve-desc {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0px 5px;
  font-size: 1rem;
  vertical-align: text-top;
}

.product {
  margin-bottom: 20px;
  margin-top: 20px;
  position: relative;
  border-bottom: 1rem solid #F0F0F0;
}

.product-title {
  /* display: flex;
  align-items: center; */
  width: 100%;
  text-align: left;
  padding: 0px 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
}

.product-heart {
  position:absolute;
  top:4rem;
  right:1rem;
  background-image: url('../img/icon/heart.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart:hover {
background-image: url('../img/icon/heart_outline.png');
}

.product-heart-fill {
  position:absolute;
  top:4rem;
  right:1rem;
  background-image: url('../img/icon/heart-fill.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart-remove {
  position:absolute;
  top:4rem;
  right:1rem;
  background-image: url('../img/icon/minus-heart2.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart-remove:hover {
background-image: url('../img/icon/heart_outline.png');
}

.product-brand {
  position:absolute;
  bottom:1rem;
  left:1rem;
}

.product-disponibile {
  position:absolute;
  bottom:1rem;
  right:1rem;
  font-size: .8rem;
  padding: .5rem;
}

.product-image {
  width: 100%;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
  padding: 3rem;
  height: 50vh;
}


.image-list {
  width: 35vw;
  height: 35vw;
  min-width: 35vw;
  min-height: 35vw;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.title-list {
  text-align: left;
  padding: 0px 5px;
  font-size: 1rem;
  font-weight: 700;
  position: relative;
  line-height: 125%;
}

.breve-desc-list {
  text-align: left;
  padding: 5px 0px;
  font-size: .8rem;
  font-weight: 400;
  line-height: 100%;
}

.buy-list {
  min-width: 50px;
  text-align: center;
  background-color: #BED031;
  height: 35vw;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.discount-list {
  position: absolute;
  z-index: 111;
  top: .2rem;
  left: .2rem;
  font-weight: 700;
  font-size: .8rem;
  color: #343a40;
  padding: .1rem .3rem;
  background-color: rgba(190,208,49, 0.6);
  border-radius: .25rem;
}

.heart-list {
  position:absolute;
  top:.2rem;
  left: calc(35vw - 24px);
}


.price-list {
  position: absolute;
  width: calc(35vw );
  z-index: 111;
  bottom: 0rem;
  left: 0rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #343a40;
  text-align: center;
  padding: .1rem .2rem 0rem .2rem;
  background-color: rgba(255,255,255, 0.6);
}

.price-label-list {
  font-size: 1rem;
  font-weight: 400;
  text-decoration: line-through;
}



#radioboxes input[type=radio]{
    display: none;
}

label {
  margin:0px;
}

.orderby_container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}

.title {
  padding: 2rem 1rem 0rem 1rem;
  display: flex;
  align-items: center;
}

.html_desc {
font-size:1.2rem;
padding:1rem 2rem;
text-align:center;
}

.filtro {
  padding: .3rem;
  font-size: .8rem;
  text-align: center;
  width: 29vw;
  margin: .3rem .2rem;
  background-color: #FFF;
}

.filtro-select {
  background-color: #BED031;
  font-weight: 700;
}

.divisorio_riga {
margin: 0rem 0rem .8rem 0rem!important;
border-bottom: 1px solid #666!important;
}

.divisorio_testo {
color: #343a40!important;
background-color: #999!important;
padding: 2px 10px!important;
border-radius: 1rem;
}

.gruppo-filtri {
  width: 100%;
  max-width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  padding: .5rem;
  background-color: #F0F0F0;
}

.filter_main {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-color: #F0F0F0;
}

.elenco-filtri {
  padding-top: .4rem;
  padding-bottom: .4rem;
}

.separazione {
width: 100%;
border-bottom: 1rem solid #F0F0F0;
}

.row {
  margin: 0rem;
}

.col-lg-9 {
  padding: 0px!important;
}

.scroll-to-top{
  height: 40px;
  min-height: 40px;
  min-width: 50px;
  width: 50px;
  border-radius: 20px;
  border: 2px solid #BED031;
  background-color: #FFF;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url('../img/icon/up-arrow.png');
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  padding: .3rem;
  background-origin: content-box;
  z-index: 999;
  cursor: pointer;
}

.promo-container {
  flex-direction: column;
  align-items: flex-start;
}

.promo-left {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 1rem;
  text-align: center;
}

.promo-middle, .promo-right {
  width: 100%;
  justify-content: flex-start;
  text-align: center;
}

.promo_mobile_second_line {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 1rem;
  margin-top: .5rem;
}

/* Add min-height to main container when no search results */
.mobile-view .search-container:only-child {
  min-height: calc(100vh - 50px); /* Adjust based on header and footer height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc((100vh - 50px) / 4); /* Position at 1/3 of available height */
}

.mobile-view .search-container:only-child form {
  margin-top: 0; /* Remove auto margin */
}

.mobile-view .search-container:only-child .search-result-label {
  margin-bottom: auto;
}

}



/* Laptop & PCs */
@media screen and (min-width: 993px) {

  .search-container {
    position: relative;
    width: 100%;
    margin: 1rem auto;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .search-container form {
    width: 100%;
    position: relative;
  }

  .search-input {
    width: 100%;
    padding: 12px 40px 12px 10px;
    font-size: 20px;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #333;
    background: #fff;
  }

  .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .search-icon img {
    width: 25px;
    height: 25px;
  }

  .search-result-label {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    color: #333;
    width: 100%;
  }

  .promo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1rem 3rem 1rem;
    gap: 1rem;
    width: 100%;
  }

  .promo-left {
    width: 100%;
    max-width: 650px;
  }

  .promo-middle {
    width: 100%;
    max-width: 650px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }

  /* Make filter and order buttons fixed width and equal */
  #filterButton, .dropdown .btn {
    width: 300px;
    min-width: 300px;
    flex: 0 0 300px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: #333;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
  }

  #filterButton:hover, .dropdown .btn:hover {
    background-color: #f8f9fa;
  }

  /* Remove the old flex layout */
  .promo_mobile_second_line {
    display: none;
  }

  /* Ensure the dropdown menu appears correctly */
  .dropdown-menu {
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
  }

  .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
  }

  .dropdown-menu .dropdown-item.active {
    background-color: #BED031;
    color: white;
  }

  .dropdown-menu .dropdown-item.active:hover {
    background-color: #a8b82a;
  }

  /* Ensure dropdown button content is properly aligned */
  .dropdown .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .dropdown .btn img {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    opacity: 0.7;
  }

  .dropdown .btn strong {
    flex-shrink: 0;
    margin-right: 0.25rem;
    font-weight: 600;
  }

  /* Ensure filter button content is properly aligned */
  #filterButton {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  #filterButton img {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    opacity: 0.7;
  }

  /* Mobile order buttons */
  .btn-km-light-green strong,
  .btn-km-light strong {
    font-weight: 600;
    margin-right: 0.25rem;
  }

  @media (max-width: 767px) {
    .btn-km-light-green,
    .btn-km-light {
      font-size: 0.85rem;
      padding: 0.4rem 0.75rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .filters {
    max-height: 85vh;
    overflow-y: auto;
  }
  
  .lista_filtro {
    margin-bottom: 1rem;
  }
  
  .lista_filtro h6 {
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
  
  .lista_filtro_item {
    display: inline-block;
    background-color: #f5f5f5; /* Light grey background */
    padding: 0.25rem 0.5rem;
    font-size: .8rem;
    margin: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  
  #count-button {
    background-color: #BED031;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .carousel-control-next {
    width: 55%;
  }

  .row {
    margin: .5rem;
  }
  .product-list {
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: normal;
  text-align: left;
  padding: 1rem;
  }

.product {
  display: inline-block;
  position: relative;
  width: 32%;
  margin-right: 1%;
  margin-bottom: 5vw;
  margin-top: 1vw;
  text-align: left;
  border: 1px solid #F0F0F0;
  padding: .5rem;
}

.product-discount {
  position: absolute;
  z-index: 111;
  top: 1rem;
  left: 0rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #343a40;
  padding: .4rem .8rem;
  background-color: #BED031;
  border-radius: .25rem;
  width: auto;
}

.product-discount-solo-omline-label {
  position: absolute;
  z-index: 111;
  top: 1rem;
  left: 0rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFF;
  padding: .4rem .8rem;
  background-color: #7B2CBF;
  border-radius: .25rem;
  width: auto;
}

.product-discount-solo-online {
  position: absolute;
  z-index: 111;
  top: 3.6rem;
  left: 2px;
  color: #7B2CBF; 
  font-size: .7rem;
  font-weight: 600;
}

.product-title {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0px 5px;
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
  min-height: 3.5rem;
  }

.product-image {
  width: 100%;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-origin: content-box;
  padding: 1rem;
  height: 30vh;
  display: block;
}

.product-heart {
  position:absolute;
  top:4rem;
  right:.5rem;
  background-image: url('../img/icon/heart.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart:hover {
background-image: url('../img/icon/heart_outline.png');
}

.product-heart-fill {
  position:absolute;
  top:4rem;
  right:.5rem;
  background-image: url('../img/icon/heart-fill.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart-remove {
  position:absolute;
  top:4rem;
  right:1rem;
  background-image: url('../img/icon/minus-heart2.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
}

.product-heart-remove:hover {
background-image: url('../img/icon/heart_outline.png');
}

.product-brand {
  position:absolute;
  bottom:0rem;
  left:0rem;
}

.product-disponibile {
  position:absolute;
  bottom:0rem;
  right:0rem;
  font-size: .8rem;
  padding: .5rem;
}

.product-price {
  display: inline-block;
  vertical-align: text-top;
  text-align: center;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.product-genere{
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 28px;
  width: 28px;
  position:relative;
}

.product-breve-desc {
  display: inline-block;
  text-align: left;
  font-size: .9rem;
  vertical-align: text-top;
}

.product-details {
  padding: 1rem 0rem;
}

/* .gruppo-filtri {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
} */

/* .elenco-filtri {
  width: 25%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
} */

/* .filtro {
  padding: .5rem .5rem .5rem 30px;
  font-size: .8rem;
  text-align: left;
  background-image: url('../img/icon/not-checked_sm.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto;
} */

/* .filtro-select {
  padding: .5rem .5rem .5rem 30px;
  background-image: url('../img/icon/checked_sm.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto;
  font-size: .8rem;
  text-align: left;
  font-weight: bold;
} */

.gruppo-filtri {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.elenco-filtri {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.filtro {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: .1rem .4rem;
  font-size: .9rem;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  background-origin: content-box;
  width: 150px;
  height: 50px;
  background-color: #FFF;
  margin: .4rem;
}

.filtro-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .1rem .4rem;
  font-size: .9rem;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  background-origin: content-box;
  width: 150px;
  height: 50px;
  background-color: #FFF;
  margin: .4rem;
}

.elenco-filtri-2 {
  width: 80%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.filtro-2 {
  border-left: 1px solid #F0F0F0;
  padding: 3px 18px 3px 6px;
  font-size: .8rem;
  text-align: left;
}

hr{
  border-color: #666!important;
}

.filtro-select {
  padding: .5rem;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  background-color: #BED031;
  font-weight: bold;
}

.filter_main {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  padding: 1rem 2rem;
  background-color: #F0F0F0;
}

.title {
  padding:2rem 3rem 0rem 3rem;
  display:flex;
  align-items: center;
  justify-content: space-between;
}

.html_desc {
font-size:1.2rem;
padding:2rem 6rem;
text-align:center;
border: 1px solid #CCC;
border-radius:.25rem;
}


  #radioboxes input[type=radio]{
      display: none;
  }

  label {
    margin:0px;
  }

.scroll-to-top{
  height: 50px;
  min-height: 50px;
  min-width: 50px;
  width: 50px;
  border-radius: 25px;
  border: 2px solid #BED031;
  background-color: #FFF;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url('../img/icon/up-arrow.png');
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: .3rem;
  background-origin: content-box;
  z-index: 999;
  cursor: pointer;
}

/* Filter button styles to match order button */
#filterButton {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #333;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  white-space: nowrap;
}

#filterButton:hover {
  background-color: #f8f9fa;
}

#filterButton img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Mobile filter button styles */
@media (max-width: 767px) {
  #radioboxes .btn-km-green {
    background-color: #BED031;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  #radioboxes .btn-km-green:hover {
    background-color: #a8b82a;
  }

  #radioboxes .btn-km-green img {
    width: 16px;
    height: 16px;
    opacity: 1;
  }
}

/* Add min-height to main container when no search results */
.desktop-view .search-container:only-child {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc((100vh - 200px) / 4); /* Position at 1/3 of available height */
}

.desktop-view .search-container:only-child form {
  margin-top: 0; /* Remove auto margin */
}

.desktop-view .search-container:only-child .search-result-label {
  margin-bottom: auto;
}

}

/* Mobile Filter Modal Styles */
@media (max-width: 767px) {
  .modal-fullscreen {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  .modal-fullscreen .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 60px; /* Space for footer */
  }

  .filters-mobile {
    padding: 0;
  }

  .filters-mobile .lista_filtro {
    margin-bottom: 20px;
  }

  .filters-mobile h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
  }

  .filter-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
  }

  .lista_filtro_item {
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    background-color: #f5f5f5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    color: #333; /* Ensure text is black by default */
  }

  .lista_filtro_item:hover {
    background-color: #e9e9e9;
  }

  .lista_filtro_item.selected,
  .lista_filtro_item[style*="background-color: #BED031"] {
    background-color: #BED031;
    color: white;
    border-color: #BED031;
  }

  .taglia-type-header {
    grid-column: 1 / -1;
    font-weight: 600;
    color: #666;
    margin-top: 10px;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
  }

  .modal-footer {
    border-top: 1px solid #eee;
    padding: 15px;
  }

  .modal-footer .btn {
    margin: 5px 0;
    padding: 12px;
    font-size: 1rem;
  }

  .modal-header {
    border-bottom: 1px solid #eee;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .modal-header .modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    flex-grow: 1;
  }

  .modal-header .btn-outline-secondary {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
  }

  .modal-header .btn-outline-secondary:hover {
    background-color: #BED031;
    color: white;
  }

  .modal-footer .btn-km-green {
    background-color: #BED031;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease;
  }

  .modal-footer .btn-km-green:hover {
    background-color: #a8b82a;
  }

  .modal-footer .btn-km-green:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }

  .modal-header .close {
    font-size: 1.5rem;
    padding: 0;
    margin: 0;
  }

  /* Filter button styles */
  #radioboxes .btn-km-green {
    background-color: #BED031;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    justify-content: center;
  }

  #radioboxes .btn-km-green:hover {
    background-color: #a8b82a;
  }

  #radioboxes .btn-km-green img {
    margin-right: 8px;
  }
}

/* Desktop Filter Modal Styles */
@media (min-width: 768px) {
  #filterModal .modal-dialog {
    position: fixed;
    margin: 0;
    width: 35%;
    height: 100vh;
    max-width: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
  }

  #filterModal .modal-content {
    height: 100%;
    border-radius: 0;
    border-left: none;
    border-right: 1px solid #dee2e6;
  }

  #filterModal.show .modal-dialog {
    transform: translateX(0);
  }

  #filterModal .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
  }

  #filterModal .modal-body {
    padding: 1rem;
    overflow-y: auto;
    height: calc(100% - 130px); /* Adjust based on header and footer height */
  }

  #filterModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
  }

  /* Adjust filter items for the new layout */
  #filterModal .lista_filtro {
    margin-bottom: 1.5rem;
  }

  #filterModal .lista_filtro_item {
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333; /* Ensure text is black by default */
  }

  #filterModal .lista_filtro_item:hover {
    background-color: #e9e9e9;
  }

  #filterModal .lista_filtro_item.selected {
    background-color: #BED031;
    color: white;
  }

  /* Style for no filters message */
  #filterModal .no-filters-available {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
  }

  /* Ensure modal backdrop covers only the modal area */
  #filterModal + .modal-backdrop {
    width: 35%;
  }
}

/* Mobile styles */
@media screen and (max-width: 992px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
    width: 100%;
    padding: 0;
  }

  /* Search container mobile */
  .mobile-view .search-container {
    width: 100%;
    padding: 2rem 0rem 1rem 0rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mobile-view .search-container form {
    width: 100%;
    position: relative;
  }

  .mobile-view .search-input {
    width: 100%;
    padding: 12px 40px 12px 10px;
    font-size: 18px;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #333;
    background: #fff;
    text-align: center;
  }

  .mobile-view .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .mobile-view .search-icon img {
    width: 20px;
    height: 20px;
  }

  .mobile-view .search-result-label {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    color: #333;
    width: 100%;
  }

  /* Filter and Order buttons container mobile */
  .mobile-view .promo-middle {
    width: 100%;
    display: flex;
    gap: 0;
    padding: 0rem 0rem 1rem 0rem;
    margin-top: 0.5rem;
  }

  /* Filter button mobile */
  .mobile-view #filterButtonMobile {
    width: 50%;
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #333;
    background-color: white;
    border-right: none;
    border-radius: 0;
    margin: 0;
  }

  /* Order dropdown mobile */
  .mobile-view .dropdown {
    width: 50%;
    flex: 0 0 50%;
  }

  .mobile-view .dropdown .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #333;
    background-color: white;
    border-radius: 0;
    margin: 0;
  }

  /* Dropdown menu mobile */
  .mobile-view .dropdown-menu {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    border: 1px solid #dee2e6;
    border-top: none;
  }

  .mobile-view .dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.85rem !important;
    white-space: normal;
    line-height: 1.2;
  }

  .mobile-view .dropdown-menu .dropdown-item.active {
    background-color: #BED031;
    color: white;
  }

  .mobile-view .dropdown-menu .dropdown-item:hover:not(.active) {
    background-color: #f8f9fa;
  }

  /* Remove old mobile styles */
  .mobile-view #radioboxes {
    display: none;
  }

  .mobile-view .orderby_container {
    display: none;
  }

  #count-button-mobile {
    background-color: #BED031;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
  }

  #count-button-mobile:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }

  #count-button-mobile:hover:not(:disabled) {
    background-color: #a8b82a;
  }

  /* Modal footer mobile */
  .modal-footer {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
  }

  .modal-footer .btn-secondary {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .modal-footer .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Desktop styles remain unchanged */
@media screen and (min-width: 993px) {
  .mobile-view {
    display: none;
  }

  .desktop-view {
    display: block;
  }

}

/* Add styles for the empty state */
.search-container:only-child {
  position: relative;
}

.search-container:only-child::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #eee;
}

/* Ensure the footer stays at the bottom */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}
