body {
  background: #f8f8f8;
}
/* ===== PAGE LAYOUT ===== */
.pl-page {
  display: flex;
  gap: 20px;
  padding: 20px;
  margin-top: 90px; /* push below header */
}

/* ===== SIDEBAR ===== */
.pl-sidebar {
  width: 220px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px;
  height: fit-content;
}

.pl-sidebar h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.filter-group label {
  display: block;
  font-size: 14px;
  margin: 6px 0;
}

/* ===== MAIN ===== */
.pl-main {
  flex: 1;
}

/* ===== BREADCRUMB ===== */
.pl-breadcrumb {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}

/* ===== TOPBAR ===== */
.pl-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.pl-title h2 {
  font-size: 20px;
}

.pl-title span {
  font-size: 14px;
  color: #777;
}

.pl-sort select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* ===== GRID ===== */
.pl-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 items desktop */
  gap: 20px;
}

/* ===== CARD ===== */
.pl-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.3s;
  cursor: pointer;
}

.pl-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* ===== IMAGE ===== */
.pl-img {
  position: relative;
  width: 100%;          /* FIXED */
  height: 310px;        /* keep height increase */
  overflow: hidden;
  border-radius: 16px;
}

.pl-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== BADGE ===== */
.pl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

/* ===== ACTION ICONS ===== */
.pl-actions {
  position: absolute;
  top: 10px;
  right: -50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.3s;
}

.pl-card:hover .pl-actions {
  right: 10px;
}

.pl-action-btn {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CART BUTTON ===== */
.pl-cart-btn {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 45px;
  background: #111;
  color: #fff;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.pl-card:hover .pl-cart-btn {
  bottom: 15px;
}

/* ===== CONTENT ===== */
.pl-content {
  padding: 10px;
}

.pl-name {
  font-size: 14px;
  height: 36px;
  overflow: hidden;
}

.pl-rating {
  font-size: 13px;
  color: #e53935;
}

.pl-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
}

.pl-price-values {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.pl-price-wishlist {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 1px solid #eee;
  border-radius: 50%;
  background: #fff;
  color: #555;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pl-price-wishlist:hover,
.pl-price-wishlist.active {
  color: #e53935;
  border-color: #ffd4dc;
}

@media (max-width: 1024px) {
  .pl-actions .wishlist-btn {
    display: none;
  }

  .pl-price-wishlist {
    display: inline-flex;
  }
}

.sale {
  font-weight: bold;
}

.mrp {
  text-decoration: line-through;
  color: #888;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

  .pl-page {
    flex-direction: column;
    padding: 10px;
  }

  .pl-sidebar {
    width: 100%;
    order: 2;
  }

  .pl-container {
    grid-template-columns: repeat(2, 1fr); /* 2 items mobile */
  }



  .pl-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pl-price {
    gap: 8px;
  }

  .pl-price-wishlist {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 16px;
  }

}


/* ===== FILTER CARD ===== */
.pl-sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* EACH FILTER BOX */
.filter-group {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #eee;
}

/* TITLE */
.filter-group h4 {
  font-size: 14px;
  margin-bottom: 8px;
}

/* SCROLL AREA */
.filter-options {
  max-height: 180px; /* ~6 items */
  overflow-y: auto;
  padding-right: 5px;
}

/* SCROLLBAR */
.filter-options::-webkit-scrollbar {
  width: 4px;
}
.filter-options::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

/* LABEL */
.filter-group label {
  display: block;
  font-size: 13px;
  margin: 6px 0;
  cursor: pointer;
}

/* PRICE */
#priceRange {
  width: 100%;
}

/* HIDE ON DESKTOP */
.mobile-filter-bar {
  display: none;
}

/* MOBILE */
@media (max-width: 768px) {

  .pl-sidebar {
    display: none; /* hide sidebar */
  }

   .mobile-filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    border-top: 1px solid #ddd;
    z-index: 999;
  }

    .mobile-filter-bar button {
    flex: 1;
    padding: 16px;            /* 🔥 increased height */
    font-size: 16px;          /* 🔥 bigger text */
    font-weight: 600;
    border: none;
    background: #fff;
  }
 .mobile-filter-bar button:first-child {
    border-right: 1px solid #ddd;
  }

 .pl-sort {
    display: none;
  }

}

.filter-modal {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 80%;
  background: #fff;
  transition: 0.3s;
  z-index: 1000;
  border-radius: 16px 16px 0 0;
}

.filter-modal.active {
  bottom: 0;
}

.filter-content {
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.apply-btn {
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 14px;
  background: #000;
  color: #fff;
  border: none;
  font-size: 16px;
}

.filter-content > div {
  flex: 1;
  overflow-y: auto;
}

/* SORT OPTIONS */
.sort-options {
  display: flex;
  flex-direction: column;   /* 🔥 force vertical */
  gap: 10px;
  margin-top: 10px;
}

/* EACH ITEM */
.sort-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  cursor: pointer;
}

/* RADIO BUTTON */
.sort-options input[type="radio"] {
  transform: scale(1.2);
}

/* SELECTED STYLE (OPTIONAL 🔥) */
.sort-options input[type="radio"]:checked + span {
  font-weight: 600;
}
.sort-options label:has(input:checked) {
  border-color: #000;
  background: #f9f9f9;
}

.pl-action-btn.wishlist-btn.active {
  color: red;
  transform: scale(1.2);
}

.pl-price-wishlist.active {
  color: red;
  transform: none;
}

.filter-arrow {
  display: none;
}

/* =========================
   MOBILE COLLAPSIBLE FILTER
========================= */

/* =========================
   MOBILE PREMIUM FILTER UX
========================= */
@media (max-width: 768px) {

  .filter-content h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
  }

  /* FILTER CARD */
  .filter-group {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    margin-bottom: 14px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  }

  /* HEADER */
  .filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    cursor: pointer;
  }

  .filter-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin: 0;
  }

  /* PREMIUM ARROW */
  .filter-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #111;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .filter-group.active .filter-arrow {
    transform: rotate(180deg);
    background: #111;
    color: #fff;
  }

  /* BODY */
  .filter-body {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid #f1f1f1;

    max-height: 250px;
    overflow-y: auto;
  }

  .filter-group.active .filter-body {
    display: block;
  }

  /* OPTIONS */
  .filter-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
  }

  /* LABEL */
  .filter-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
  }

  /* CHECKBOX */
  .filter-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #111;
  }

  /* RANGE */
  #priceRange {
    width: 100%;
    margin-top: 16px;
  }

  #priceValue {
    font-weight: 600;
  }

  /* SCROLL */
  .filter-body::-webkit-scrollbar {
    width: 4px;
  }

  .filter-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 20px;
  }

  /* APPLY BUTTON */
  .apply-btn {
    height: 54px;
    border-radius: 14px 14px 0 0;
    font-size: 18px;
    font-weight: 600;
    background: #111;
    margin-top: 10px;
  }

}

/* =========================
   DESKTOP FILTER
========================= */
@media (min-width: 769px) {

  .filter-body {
    display: block !important;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
  }

  /* NICE SCROLLBAR */
  .filter-body::-webkit-scrollbar {
    width: 5px;
  }

  .filter-body::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 20px;
  }

  .filter-arrow {
    display: none !important;
  }

}
