.product {
  background-color: var(--petfood-green-light);
}

.product:hover {
  background-color: var(--petfood-green);
}

.product-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

.old-price {
  text-decoration: line-through;
  color: #727272;
  padding-right: 10px;
}

.sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff4d4d;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
}

.container2 {
  display: flex;
  gap: 20px;
  margin: 0;
  padding-left: 0 !important;
  padding: 0 1.5rem;
}

.main-content {
  padding: 0;
}

/* Sidebar default */
.filter-sidebar {
  flex: 0 0 220px;
  background: var(--petfood-green-dark);
  color: white;
  padding: 15px;
  height: 100vh;
  position: sticky;
  border-top-right-radius: 30px !important;
  top: 1rem;
}

/* Toggle button (hidden on desktop) */
.filter-toggle {
  display: none;
  background: var(--petfood-green-dark);
  color: white;
  border: none;
  padding: 10px 10px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

@media (max-width:955px) {
  .product-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(67, 160, 71, .1);
    overflow: hidden;
    transition: transform var(--transition-duration), box-shadow var(--transition-duration);
    position: relative;
    min-width: 100%;
  }
}

@media (max-width: 815px) {

  /* Sidebar */
  .filter-toggle {
    display: block;
    margin-left: 10px;
    position: sticky;
    top: 10px;
  }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    /* hidden */
    width: 240px;
    height: 100vh;
    overflow-y: auto;
    border-radius: 0;
    transition: left 0.3s ease;
    z-index: 1000001;
    /* above overlay */
  }

  .filter-sidebar.active {
    left: 0;
  }

  /* Overlay (hidden by default) */
  .filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
  }

  .filter-overlay.active {
    display: block;
  }

  /* Close button inside sidebar (mobile only) */
  .filter-close {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
    cursor: pointer;
  }
}

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

.filter-group h4 {
  margin-bottom: 8px;
  font-size: 1.1em;
}

/* Custom rounded checkbox */
.filter-group input {
  width: 1.3em;
  height: 1.3em;
  background-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  border: 2px solid var(--petfood-green);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}

.filter-group input:checked {
  background-color: var(--petfood-green);
}

/* Label styling */
.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  margin-bottom: 6px;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Cards, etc. */
.product-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(67, 160, 71, .1);
  overflow: hidden;
  transition: transform var(--transition-duration), box-shadow var(--transition-duration);
  position: relative;
  max-height: 430px;
  max-width: 30vw;
}

.product-card button {
  margin-top: auto;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(67, 160, 71, .2);
}

.sale-badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background-color: #dc3545;
  color: #fff;
  padding: .25rem .5rem;
  border-radius: .75rem;
  font-size: .75rem;
  font-weight: 700;
}

.product-body {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.25rem;
  color: #000;
}

.product-price {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.original-price {
  text-decoration: line-through;
  color: #6c757d;
  margin-right: .5rem;
}

.sale-price {
  color: #dc3545;
  font-weight: 700;
}

.no-products {
  color: #6c757d;
  font-size: 1.2rem;
  margin: 3rem 0;
}

.product-image {
  width: 100%;
  height: 200px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-weight: 700;
  font-size: 1.2rem;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Pagination */
.pagination {
  position: sticky;
  top: 1rem;
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 20px;
  flex-direction: column;
  justify-content: flex-start;
  height: fit-content;
}

.pagination button {
  background: var(--petfood-green);
  color: white;
  border: 3px solid var(--petfood-green-dark);
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}


.pagination button:hover,
.pagination button.active {
  background: var(--petfood-green-dark);
}

@media (max-width: 445px) {
  .pagination {
    position: fixed;
    z-index: 9999999;
    left: 10px;
    top: 50vw;
    margin: 0;
  }
}