/* ===== FILTER BOTTOM ===== */

.dmart-filter-bottom{
display:flex;
gap:12px;
padding:14px;
background:#fff;
border-top:1px solid #eee;
}

/* ===== COMMON ===== */

.dmart-clear,
.dmart-apply{
flex:1;
height:40px;
border-radius:7px;
display:flex;
align-items:center;
justify-content:center;
font-size:13px;
font-weight:500;
letter-spacing:.5px;
cursor:pointer;
user-select:none;
transition:.25s ease;
}

/* ===== CLEAR ===== */

.dmart-clear{
background:#ff7b00;
color:#fff;
border:1px solid #fff;
}

.dmart-clear:hover{
background:#fff;
color:#ff7b00;
border:1px solid #ff7b00;
}

/* ===== APPLY ===== */

.dmart-apply{
background:#22993f;
color:#fff;
border:1px solid #fff;
}

.dmart-apply:hover{
transform:translateY(-1px);
opacity:.95;
	background:#fff;
color:#22993f;
border:1px solid #22993f;
}





/* Style for the current category name */
.dmart-current-category {
    display: inline-block; /* so it stays on same line or you can use block if you want below */
    font-size: 14px;
    font-weight: 500;
    color: #22993f; /* example: blue */
    margin-left: 2px; /* spacing from Filter & Sort */
}

.dmart-filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 600;
}
.dmart-category-label {
  font-size: 16px;
  color: #888;
}


/* Overlay / Modal */
.dmart-filter-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.dmart-filter-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #f9faf9; /* soft grey-green */
  width: 95%;
  max-width: 920px;
  max-height: 84vh; /* limit height instead of fixed height */
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* make content scrollable if too tall */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.25s ease;
  z-index: 9999; /* ensure above everything */
  padding-bottom: 10px; /* prevent content cut at bottom */
}

/* Optional overlay behind the drawer */
.dmart-filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  backdrop-filter: blur(2px);
}

/* Animation */
@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}




/* Top bar */
.dmart-filter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid #dcecdc;
  background: linear-gradient(288deg, #38b057, #fff);
  color: #fefefe;
}
.dmart-filter-top h3 { margin: 0; font-size: 18px; font-weight: 700; }
.dmart-filter-close {
  font-size: 26px;
  background: none;
  border: none;
  color: #fefefe;
  cursor: pointer;
  transition: color 0.3s ease;
}
.dmart-filter-close:hover { color: #ffc107; }

/* Main area */
.dmart-filter-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left tabs */
.dmart-filter-left {
  width: 28%;
  background: #e8f5e9;
  border-right: 2px solid #c8e6c9;
  overflow-y: auto;
}
.dmart-filter-tabs { list-style: none; padding: 0; margin: 0; }
.dmart-filter-tabs li {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #dcedc8;
  color: black;
  font-weight: 500;
  transition: background 0.3s;
}
.dmart-filter-tabs li.active {
  background: #22993f;
  color: white;
  font-weight: 700;
}

/* Right panels */
.dmart-filter-right {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f1f8e9;
}
.dmart-filter-panel { display: none; }
.dmart-filter-panel.active { display: block; }

.dmart-search { 
width: 100%; padding: 8px 10px; border: 1px solid #a5d6a7; border-radius: 8px; margin-bottom: 12px; outline: none; background: #fdfefb;
}
.dmart-search:focus { border-color: #2e7d32; box-shadow: 0 0 6px rgba(46,125,50,0.3); }
/* Option list */
.dmart-options-list { list-style: none; padding: 0; margin: 0; }
.dmart-options-list li {
  padding: 8px 6px;
  border-bottom: 1px solid #e0f2f1;
  background: #f7fff6;
  border-radius: 6px;
	color:black;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}
.dmart-options-list li:hover {
  background: #dcedc8;
  transform: scale(1.01);
}
.dmart-options-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #2e7d32;
  font-weight: 500;
}

/* Bottom buttons */
.dmart-filter-bottom {
  padding: 12px;
  border-top: 1px solid #c8e6c9;
  display: flex;
  gap: 12px;
  background: linear-gradient(285deg, #38b057, #fff);
}


/* Loading state */
.products.dmart-loading {
  opacity: 0.35;
  position: relative;
}
.products.dmart-loading::after {
  content: "Loading...";
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: #f9faf9;
  padding: 8px 14px;
  border: 2px solid #2e7d32;
  border-radius: 6px;
  color: #2e7d32;
  font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .dmart-filter-drawer {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  .dmart-filter-left { width: 34%; }
  .dmart-filter-tabs li { font-size: 14px; }
  .dmart-filter-right { padding: 10px; }
}
.dmart-sort-wrapper {
  position: relative;
  display: inline-block;
	background-color:;
  width: 100%;
}

.dmart-sort select {
  width: 100%;
  padding: 8px 30px 8px 12px;
  border: 2px solid #2e7d32;
  border-radius: 2px;
  appearance: none;
  background-color: #ff7b00;
  color: #2e7d32;
  cursor: pointer;
}

.dmart-sort-icon {
  position: absolute;
  right: 10px;
	background-color:#2e7d32;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
