/* =========================
   ICON
========================= */

.accordion-icon {
	display: none;
	transition: transform 0.3s ease;
}

/* Desktop always open */
.sidebar-accordion-body {
	display: block;
}

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

.clear-filters--mobile {
	display: none;
}

/* =========================
   MOBILE ONLY BEHAVIOR
========================= */
.mobile-sidebar {
	display: none;
}
@media (max-width: 900px) {
	.shop-sidebar{
		display: none;
	}
	.mobile-sidebar {
		display: block;
	}
	/* ── Open button ── */
  .filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid #d0d0cc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s;
    margin: 0;
  }
  .filter-trigger:hover { background: #f0f0ec; }
  .filter-trigger.has-active {
    background: #2d7a4f;
    color: #fff;
    border-color: #2d7a4f;
  }
  .filter-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }

  /* ── Overlay ── */
  .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    pointer-events: none;
    transition: background 0.25s;
    display: flex;
  }
  .drawer-overlay.open {
    background: rgba(0, 0, 0, 0.45);
    pointer-events: all;
  }

  /* ── Drawer ── */
  .drawer {
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
  }
  .drawer-overlay.open .drawer { transform: translateX(0); }

  /* ── Drawer header ── */
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 0.5px solid #e0e0da;
    flex-shrink: 0;
  }
  .drawer-head-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
  .drawer-head-right { display: flex; align-items: center; gap: 12px; }
  .btn-clear {
    font-size: 12px;
    font-weight: 500;
    color: #2d7a4f;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  .btn-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0ec;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .btn-close svg { width: 14px; height: 14px; color: #555; }

  /* ── Scrollable list area ── */
  .drawer-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Section ── */
  .section-divider { height: 0.5px; background: #e0e0da; margin: 0 16px; }

  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    cursor: pointer;
    user-select: none;
  }
  .section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #888;
  }
  .section-meta { display: flex; align-items: center; gap: 7px; }
  .section-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #2d7a4f;
    border-radius: 10px;
    padding: 1px 6px;
    display: none;
  }
  .section-chevron {
    width: 14px;
    height: 14px;
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
  }
  .section-chevron.rotated { transform: rotate(180deg); }

  /* ── Filter items ── */
  .item-list {
    padding: 0 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
  }
  .filter-item:hover { background: #f5f5f0; }
  .filter-item.checked { background: #e6f2ec; }
  .filter-item-name {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 400;
  }
  .filter-item.checked .filter-item-name { color: #1a5c35; font-weight: 500; }
  .checkbox {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 1.5px solid #c8c8c4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.12s;
  }
  .filter-item.checked .checkbox { background: #2d7a4f; border-color: #2d7a4f; }
  .checkbox svg { width: 10px; height: 10px; color: #fff; display: none; }
  .filter-item.checked .checkbox svg { display: block; }

  /* ── Footer ── */
  .drawer-footer {
    padding: 10px 16px 14px;
    border-top: 2px solid #e0e0da;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .footer-summary {
    font-size: 12px;
    color: #888;
    flex: 1;
    line-height: 1.4;
  }
  .footer-summary strong { color: #1a1a1a; }
  .btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #2d7a4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
  }
  .btn-apply:hover { background: #24633f; }
  .btn-apply svg { width: 13px; height: 13px; }
}
@media (max-width: 768px) {
	.sidebar-sec-title {
		position: sticky;
		top: 0;
		z-index: 10;
		        display: flex;
        justify-content: space-between;
        align-items: center;
	}

/* prevent overlap stacking */
.sidebar-section + .sidebar-section .sidebar-sec-title {
	top: 0;
}

	.accordion-icon {
		display: flex;
	}

	.sidebar-accordion-toggle {
		cursor: pointer;
	}

	/* accordion closed by default */
	.sidebar-accordion-body {
		display: none;
	}

	.sidebar-section.is-open .sidebar-accordion-body {
		display: block;
	}

	.sidebar-section.is-open .accordion-icon {
		transform: rotate(180deg);
	}

	/* =========================
	   MOBILE SCROLL INSIDE BODY
	========================= */

	.sidebar-accordion-body {
		max-height: 45vh;   /* important */
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding-right: 5px;
	}

	/* clear buttons */
	.clear-filters--sidebar {
		display: none;
	}

	.clear-filters--mobile {
		display: block;
		width: 100%;
	}
}