/* Layout */
*, *::before, *::after {
    margin: 0;
  }
.product-list-page {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: #f9f9f9;
    font-family: 'Narnoor', sans-serif;
  }
  .products {
    flex: 1;
    background-color: white;
    border-radius: 10px;
  }
  .products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8em;
  }
  
  /* Filters */
  .filters {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
  }
  .filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .filter__icon {
    width: 20px;
    height: 15px;
  }
  .filters__clear {
    font-family: 'Narnoor', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-grey-dark);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition), color var(--transition);
  }
  .filters__clear:hover {
    background: var(--color-grey-light);
    color: var(--color-black);
  }
  .filters__title {
    font-family: 'Narnoor', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
  }
  .filters__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 12px 0;
  }
  .filters__subheading {
    font-family: 'Narnoor', sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin: 8px 0;
  }
  
  /* Details/Summary for collapsible */
  .filter-group {
    font-family: 'Narnoor', sans-serif;
    margin-bottom: 12px;
  }
  .filter-group summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding-right: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
  }
  .filter-group.prize-range {
    display: flex;
    align-items: center;
    gap: 6px; /* small gap between min, "to", and max */
  }
  
  .filter-group.prize-range select {
    padding: 6px 28px 6px 10px; /* compact padding */
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  
    /* Custom arrow icon (inline SVG) */
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  }
  
  .filter-group.prize-range span {
    font-size: 14px;
    color: #555;
  }
  .filter-group summary::-webkit-details-marker {
    display: none;
  }
  .filter-group summary::after {
    content: '▾';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s;
    font-size: 1rem;
    color: #888;
  }
  .filter-group[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
  }
  .filter-group__item {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .filter-group__item label {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Prize range */
  .prize-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Narnoor', sans-serif;
    margin-bottom: 12px;
  }
  .prize-range select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
  }
  .prize-range span {
    font-size: 14px;
    color: #444;
  }
  
  /* Rating Us */
  .rating-us{
    display: flex;
    flex-direction: column;
  }

  .rating-us .star {
    font-size: 1.1rem;
    display: inline-block;
  }
  
  /* solid gold fill */
  .rating-us .star.filled {
    color: gold;
    -webkit-text-stroke: 0;
    color: gold;
  }
  
  /* hollow star: transparent fill + gold border */
  .rating-us .star.outlined {
    color: transparent;
    -webkit-text-stroke: 1px gold;
    color: gold;
  }

  /* Product Card */
  .product-list-card {
    position: relative;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .product-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05);
  }
  .product-card__image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
  }
  .product-card__info {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .product-card__name {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
  }
  .product-card__desc {
    font-size: 14px;
    color: #888;
    margin: 0;
  }
  .product-card__row {
    display: flex;
    align-items: center;
    padding: 5px;
  }
  .product-card__details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }
  .product-card__price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
  }
  .product-card__price {
    font-size: 18px;
    font-weight: 600;
    color: black;
  }
  .product-card__old-price {
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
  }
  .product-card__percent {
    display: block;
    font-size: 14px;
    font-weight: 200;
    color: #2ebb77;
  }
  .product-card-mob__percent{
    display: none;
  }
  .btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    aspect-ratio: 1/1;
    align-self: stretch;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    padding: 1.5rem;
    transition: background 0.2s;
  }
  .btn-cart__icon {
    width: 20px;
    height: 20px;
    filter: invert(30%);
    transition: filter 0.2s;
  }
  .btn-cart:hover {
    background: #2ebb77;
  }
  .btn-cart:hover .btn-cart__icon {
    filter: invert(100%);
  }

  .btn-cart-added {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    aspect-ratio: 1/1;
    align-self: stretch;
    background: #2ebb77;
    border: none;
    border-radius: 50%;
    padding: 1.5rem;
    transition: background 0.2s;
  }
  .btn-cart-added__icon {
    width: 20px;
    height: 20px;
    filter: invert(100%);
    transition: filter 0.2s;
  }

  .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
  }
  
  .product-link:hover {
    text-decoration: none;
    color: inherit;
  }
  
  .filters__apply {
    display: block;
    width: 100%;
    padding: 12px 0;
    margin-top: 16px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-family: 'Narnoor', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition);
  }
  
  .filters__apply:hover {
    background: var(--color-grey-dark);
  }

  .filters-button {
    display: none;
  }

  .mobile-filter-sort{
    display: none;
  }

  .rating-us > label {
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
    margin-bottom: 8px;
  }
  .rating-us > label input[type="checkbox"] {
    margin: 0;
    padding: 0;
  }
  .rating-us > label .star {
    line-height: 1;
    vertical-align: middle;
  }
  .product-hidden {
    display: none !important;
    visibility: hidden !important;
  }








@media (max-width: 1023px) {
    /* Hide sidebar */
    .filters {
      display: none;
    }
    .filters__apply {
      display: none;
    }

    .product-list-page {
      padding: 1em;
      min-height: 80vh;
    }
    .products {
      padding: 0;
    }

    .products__grid {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 25px 8px !important;
      padding: 8px !important;
      margin-bottom: 10vh;
    }
    .product-card__details {
      gap: 0;
    }
    .product-card__name {
      font-size: 0.85em;
    }
    .product-card__desc {
      font-size: 0.7em;
    }
    .product-card__price {
      font-size: 14px;
    }
    .product-card__old-price {
      font-size: 12px;
    }

    .product-card__percent{
      font-size: 12px;
    }
    .product-card-mob__percent {
      display: block;
    }
    .product-image-wrapper {
      position: relative;
    }
    .product-image-wrapper .price-percent.image-overlay {
      display: block;
      position: absolute;
      bottom: 8px;
      left: 8px;
      background: rgba(0, 0, 0, 0.5);
      color: #fff;
      padding: 2px 6px;
      font-size: 0.75rem;
      font-weight: 600;
      border-radius: 4px;
      white-space: nowrap;
    }
    .product-prices .price-percent {
      display: none;
    }
  
    /* Show the Filter button fixed at bottom */
    .filters-button {
      display: block;
      position: fixed;
      bottom: 0; left: 0;
      width: 100%;
      padding: 1rem;
      background: black;
      color: #fff;
      font-size: 1.1rem;
      font-weight: 600;
      border: none;
      text-align: center;
      cursor: pointer;
      z-index: 1002;
    }
  
    /* Drawer container: off-canvas bottom */
    .filters-drawer {
      position: fixed;
      bottom: -100%;
      left: 0;
      width: 100%;
      height: 100%;
      background: #fff;
      overflow-y: auto;
      transition: bottom 0.3s ease;
      z-index: 1001;
      box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    }
    .filters-drawer.open {
      bottom: 0;
    }
  
    /* Show the filters inside drawer */
    .filters-drawer .filters {
      display: block;
      padding: 1.5rem;
      height: auto;
    }
  
    /* Close button inside drawer */
    .filters-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      z-index: 1002;
    }
    .mobile-filter-sort {
      display: flex;
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background: #fff;
      box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
      z-index: 1002;
    }
    .mobile-filter-sort button {
      flex: 1;
      padding: 1rem;
      background: #fff;
      border: 1px solid #ddd;
      font-family: 'Narnoor', sans-serif;
      font-size: 1rem;
      cursor: pointer;
    }
    .mobile-filter-sort .btn-filter { border-right: none; }
   
    /* 2) Sort‑drawer sits off‑canvas like filters */
    .sort-drawer {
      position: fixed;
      bottom: -100%;
      left: 0;
      width: 100%;
      height: 100%;
      background: #fff;
      overflow-y: auto;
      transition: bottom 0.3s ease;
      z-index: 1001;
    }
    .sort-drawer.open {
      bottom: 0;
    }
    .filters-drawer { bottom: -100%; }
    .filters-drawer.open {
      bottom: 5%;
      height: 86vh;
      overflow-y: scroll;
    }
    .mobile-filter-sort button {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 1rem;
      background: #fff;
      border: 1px solid #ddd;
      font-family: 'Narnoor', sans-serif;
      font-size: 1rem;
      color: black;
      cursor: pointer;
    }
    .mobile-filter-sort .btn-filter { border-right: none; }
    .mobile-filter-sort .btn-icon {
      width: 20px;
      height: 20px;
    }
  }
