/* ==========================================================================
   Ayurvedic Products Page Specific Styles (Filter Sidebar & Top Sort Bar)
   ========================================================================== */

/* Left Sidebar Filter Container */
.products-page-filter {
  background-color: var(--ayur-white-color);
  border: 1px solid rgba(4, 138, 5, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 42, 15, 0.05);
  padding: 26px;
  transition: all 300ms ease;
  position: relative;
}

/* Override parent section overflow (style.css hides it, which breaks position: sticky) */
.products-page-section {
  overflow: visible !important;
}

/* Reset AOS transforms after transition is complete so they don't break sticky calculations */
[data-aos].aos-animate {
  transform: none !important;
}

@media (min-width: 992px) {
  .products-page-filter {
    position: sticky;
    top: 100px !important; /* Sticks nicely below the sticky navbar */
    z-index: 10;
  }
}

@media (max-width: 991px) {
  .products-page-filter {
    position: static;
    margin-bottom: 40px;
  }
}

/* Header inside Filter */
.filter-header {
  margin-bottom: 24px;
}

.filter-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ayur-banheading-color);
  margin-bottom: 6px;
  font-family: "Archivo", sans-serif;
}

.filter-header p {
  font-size: 13.5px;
  color: var(--ayur-para-color);
  line-height: 1.5;
  margin: 0;
  font-family: "Inter", sans-serif;
}

/* Filter Groups */
.filter-group {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(4, 138, 5, 0.06);
  padding-bottom: 20px;
}

.filter-group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ayur-banheading-color);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  display: block;
  font-family: "Archivo", sans-serif;
}

/* Filter 1: Search Input */
.search-input-wrap {
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ayur-primary-color);
  font-size: 14px;
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  height: 46px !important;
  border-radius: 23px;
  border: 1px solid rgba(4, 138, 5, 0.12);
  padding-left: 44px;
  padding-right: 18px;
  font-size: 14px;
  color: var(--ayur-banheading-color);
  background-color: #FDFFFF;
  outline: none;
  transition: all 300ms ease;
}

.search-input-wrap input:focus {
  border-color: var(--ayur-primary-color);
  background-color: var(--ayur-white-color);
  box-shadow: 0 0 0 4px rgba(4, 138, 5, 0.08);
}

/* Filter 2: Price Range Slider */
.price-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px !important;
  background: transparent !important;
  background-color: transparent !important;
  outline: none;
  margin: 5px 0;
  padding: 0 !important;
  border: none !important;
}

.price-slider-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px !important;
  cursor: pointer;
  background: rgba(4, 138, 5, 0.15) !important;
  background-color: rgba(4, 138, 5, 0.15) !important;
  border-radius: 3px;
  border: none !important;
}

.price-slider-input::-moz-range-track {
  width: 100%;
  height: 6px !important;
  cursor: pointer;
  background: rgba(4, 138, 5, 0.15) !important;
  background-color: rgba(4, 138, 5, 0.15) !important;
  border-radius: 3px;
  border: none !important;
}

.price-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ayur-primary-color);
  border: 2px solid var(--ayur-white-color);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 42, 15, 0.2);
  transition: transform 200ms ease, background-color 200ms ease;
  margin-top: -6px !important; /* Center Webkit thumb vertically on 6px track */
}

.price-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.price-slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ayur-primary-color);
  border: 2px solid var(--ayur-white-color);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 42, 15, 0.2);
  transition: transform 200ms ease, background-color 200ms ease;
}

.price-slider-input::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.price-range-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ayur-primary-color);
  margin-top: 8px;
  font-family: "Inter", sans-serif;
}

.price-slider-limits {
  font-size: 12px;
  color: var(--ayur-para-color);
  font-family: "Inter", sans-serif;
}

/* Filter 3: Category Checklist */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.custom-checkbox-wrap {
  display: block;
  position: relative;
  padding-left: 28px;
  margin-bottom: 0;
  cursor: pointer;
  font-size: 14.5px;
  font-family: "Inter", sans-serif;
  color: var(--ayur-para-color);
  user-select: none;
  transition: color 200ms ease;
}

.custom-checkbox-wrap input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  height: 18px;
  width: 18px;
  background-color: var(--ayur-white-color);
  border: 1.5px solid rgba(4, 138, 5, 0.25);
  border-radius: 4px;
  transition: all 250ms ease;
}

.custom-checkbox-wrap:hover input~.checkmark {
  border-color: var(--ayur-primary-color);
}

.custom-checkbox-wrap input:checked~.checkmark {
  background-color: var(--ayur-primary-color);
  border-color: var(--ayur-primary-color);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox-wrap input:checked~.checkmark::after {
  display: block;
}

.custom-checkbox-wrap .checkmark::after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox-wrap input:checked~span {
  color: var(--ayur-banheading-color);
  font-weight: 600;
}

/* Filter Action Buttons */
.products-page-filter .btn-apply-filter {
  width: 100%;
  min-height: 45px;
  border-radius: 22px;
  background-color: var(--ayur-primary-color);
  border: 1px solid #f2efec;
  font-size: 16px;
  color: var(--ayur-white-color);
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
  display: block;
  padding: 9px 16px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 300ms linear;
  margin-bottom: 12px;
  box-shadow: none;
}

.products-page-filter .btn-apply-filter::after {
  position: absolute;
  content: '';
  display: block;
  top: 50%;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 0%;
  border-radius: 15px;
  background-color: var(--ayur-banheading-color);
  z-index: -1;
  transition: all 600ms ease;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.products-page-filter .btn-apply-filter:hover::after {
  height: 380%;
}

.products-page-filter .btn-apply-filter:hover {
  color: var(--ayur-white-color) !important;
  box-shadow: 0 10px 24px rgba(15, 42, 15, 0.14);
}

.products-page-filter .btn-reset-filter {
  width: 100%;
  min-height: 45px;
  border-radius: 22px;
  background-color: transparent;
  border: 1px solid rgba(4, 138, 5, 0.25);
  font-size: 16px;
  color: var(--ayur-primary-color);
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
  display: block;
  padding: 9px 16px;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 300ms ease;
}

.products-page-filter .btn-reset-filter:hover {
  background-color: rgba(4, 138, 5, 0.05);
  border-color: var(--ayur-primary-color);
  color: var(--ayur-primary-color);
}

/* ==========================================================================
   Product Listing Top Bar & Columns
   ========================================================================== */

.products-page-topbar {
  background-color: var(--ayur-white-color);
  border: 1px solid rgba(4, 138, 5, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 42, 15, 0.04);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.products-count {
  font-size: 14.5px;
  color: var(--ayur-para-color);
  font-family: "Inter", sans-serif;
}

.products-count span {
  font-weight: 700;
  color: var(--ayur-banheading-color);
  font-family: "Inter", sans-serif;
}

.products-sorting {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-sorting label {
  font-size: 14.5px;
  color: var(--ayur-para-color);
  font-family: "Inter", sans-serif;
  margin-bottom: 0;
  font-weight: 500;
}

.products-sorting select {
  height: 38px !important;
  border: 1px solid rgba(4, 138, 5, 0.15) !important;
  border-radius: 20px !important;
  padding: 0 34px 0 16px !important;
  font-size: 14px !important;
  color: var(--ayur-banheading-color) !important;
  background-color: #FDFFFF !important;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23048a05' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px !important;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.products-sorting select:focus {
  border-color: var(--ayur-primary-color) !important;
  background-color: var(--ayur-white-color) !important;
}

@media (max-width: 575px) {
  .products-page-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
  }

  .products-sorting {
    width: 100%;
    justify-content: space-between;
  }

  .products-sorting select {
    width: auto !important;
    flex-grow: 1;
    max-width: 180px;
  }
}