/* Container: fixed 2 columns and 2 rows grid */
#item-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 20px;
  max-width: 600px;  /* Adjust width as needed */
  margin: 0 auto;
  overflow: hidden; /* Prevent showing overflow */
}

/* Each product card */
.item {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  position: relative;
  margin: 15px;
  height: 200px;
}

.item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
}

/* Product image */
.product-image {
  max-width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}


.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center; /* or 'flex-start' if you want left alignment */
  height: 50px; /* optional: set a height to control spacing */
}




.filter-toggle {
  display: none;
}
.filter-toggle.open {
  display: block;
}


.filter{
  margin: 10px;
}
.product-name {
  font-size: 15px;

  color: #333;
  margin-bottom: 6px;
}

.price-container {
  font-size: 1rem;
  color: #333;
  font-weight: 600;
}

/* Discount ribbon */
.discount-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #352e2e;
  color: white;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  user-select: none;
}

/* Horizontal divider */
.product-divider {
  display: none; /* Hide divider because grid spacing is enough */
}

/* Responsive - keep 2x2 grid on smaller screens */
@media (max-width: 480px) {
  #item-list {
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 15px;
  }

  .product-image {
    max-width: 140px;
    height: 140px;
  }
}


/* Search Bar */
.search-bar {
  width: 100%;
  max-width: 350px;
  margin: 30px auto 20px;
  text-align: center;
}

.search-input {
  width: 90%;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1.5px solid #5B455E;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.3s ease;
}


.search-input:focus {
  border-color: #341539;
  outline: none;
}

  
  .button-icon {
    width: 20px; /* Adjust as needed */
    height: 20px; /* Adjust as needed */
  }

.show-more-btn {
    display: inline-flex; /* Align text and icon horizontally */
    align-items: center;  /* Vertically center the icon and text */
    justify-content: center; /* Horizontally center the content */
    margin: 50px auto;
    padding: 12px 24px;
    background-color: transparent;
    color: #161616;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s;
    font-weight: 600;

}
/* Sort By Button */
.filter-toggle-btn {
  margin-top: 90px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 300px;
  height: 50px;

  background: #5B455E;
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;

  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(183, 141, 101, 0.3);

  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 6px;
}


.filter-toggle-btn img {
  filter: invert(1); /* Inverts black to white */
}



.filter-toggle-btn:hover {
    background: linear-gradient(45deg, #b087f1, #7f89e0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 141, 101, 0.4);
}
/* Filter Sidebar styled exactly like your sidebar */
.filter-sidebar {
  height: 100%;
  width: 0;               /* hidden initially */
  position: fixed;
  z-index: 2000;
  top: 0;
  right: 0;               /* open from right side */
  background-color: #fff;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);  /* shadow from left */
  color: #5B455E;
  font-family: Arial, Helvetica, sans-serif;
}

/* When open, set width to desired size */
.filter-sidebar.open {
  width: 350px;
}

/* Links inside filter sidebar */
.filter-sidebar a, /* if you want to add links */
.filter-sidebar label {
  padding: 15px 25px;
  font-size: 16px;
  color: #5B455E;
  display: block;
  transition: 0.3s;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  text-decoration: none; /* for links */
  user-select: none;   /* prevent text selection */
}

.filter-sidebar a:hover,
.filter-sidebar label:hover {
  color: #b78d65;
  background-color: #fafafa;
}

.close-filter-btn {
  position: absolute;
  top: 15px;
  left: 25px;       /* moved from right: 25px to left: 25px */
  font-size: 28px;
  cursor: pointer;
  height: 20px;
  width: 20px;
  background: transparent;
  border: none;
  color: #5B455E;
}
.close-filter-btn:hover {
  color: #b78d65;
}

.filterh{
  margin: 10  px;
}


.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filter-group.open .filter-content {
  max-height: 500px; /* big enough to show all content */
}

.toggle-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Optional: rotate arrow when open */
.filter-group.open .toggle-header::after {
  content: "▲";
  margin-left: 8px;
}
.toggle-header::after {
  content: "▼";
  margin-left: 8px;
}

/* Product card */
.item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  height: 320px; /* Fixed height ensures consistent layout */
  margin: 15px;
}

.item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Product image */
.product-image {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  opacity: 0;
  transform: scale(0.95);
  animation: fadeInProduct 0.8s ease-out forwards;
}

@keyframes fadeInProduct {
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Product info */
.product-info {
  text-align: center;
  flex-grow: 1; /* Push the button to the bottom */
  width: 100%;
}

/* Add to Cart Button (with icon) */
.add-to-cart-btn {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  background-color: transparent;
  color: transparent;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 5;
}


.add-to-cart-btn .basket-icon {
  width: 20px;
  height: 20px;
  margin-left: 55px;
}

/* Responsive Image */
@media (max-width: 480px) {
  .product-image {
    height: 140px;
  }
  .item {
    height: 350px;
  }
}

.filter-sidebar-title{
  margin: 10px;
  margin-bottom: 25px;
}


.price-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.size-badge {
  font-size: 0.8rem;
  color: #666;
}

.decant-note {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

.original-price {
  text-decoration: line-through;
  color: #999;
}

.discounted-price {
  color: #d32f2f;
  font-weight: bold;
}



.brand-scroll {
  max-height: 180px;  /* adjust height */
  overflow-y: auto;
  padding-right: 6px; /* space for scrollbar */
  border: 1px solid #fff;
  border-radius: 4px;
}

/* Optional: nicer scrollbar */
.brand-scroll::-webkit-scrollbar {
  width: 6px;
}
.brand-scroll::-webkit-scrollbar-thumb {
  background: #fff;
  border-radius: 3px;
}




.no-products-message {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #5B455E; /* theme color */
    font-family: Arial, Helvetica, sans-serif;
}

.no-products-message img {
    width: 60px;
    height: 60px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.no-products-message h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.no-products-message p {
    font-size: 14px;
    opacity: 0.8;
}
