/* Filter Bar */

.lw-filter-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
}

.lw-filter-bar .lw-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background-color: #827e2e;
    border: 0;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.lw-filter-btn:hover {
	background-color: #9e9a2c;
	transition: background 0.2s;
}

.lw-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #1a1a1a;
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
}

/* Overlay */

.lw-filter-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lw-filter-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

/* Modal */

.lw-filter-modal {
	background: #fff;
	border-radius: 16px;
	width: 90%;
	max-width: 780px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	transform: translateY(24px);
	transition: transform 0.25s ease;
	overflow: hidden;
}

.lw-filter-overlay.is-open .lw-filter-modal {
	transform: translateY(0);
}

/* Header */
.lw-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px 18px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.lw-filter-heading {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
}

.lw-filter-modal .lw-filter-close {
	background: #212107;
	border: none;
	cursor: pointer;
	color: #1a1a1a;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s;
	opacity: 0.6;
}

.lw-filter-modal .lw-filter-close:hover { opacity: 1; }
.lw-filter-modal .lw-filter-close svg path {
	stroke: #fff;
}

/* Body */
.lw-filter-body {
	overflow-y: auto;
	/* flex: 1; */
	padding: 14px 24px;
}

/* Group */
.lw-filter-group {
	padding: 16px 0 0 0;
	border-bottom: 0;
}

.lw-filter-group:last-child { border-bottom: none; }

.lw-filter-group-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.lw-filter-group-title {
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
}

.lw-filter-group-toggle {
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
	padding: 2px;
	display: flex;
	transition: transform 0.2s;
}
.lw-filter-group-toggle svg {
	width: 14px;
	height: 14px;
}

.lw-filter-group-toggle[aria-expanded="false"] svg {
	transform: rotate(-90deg);
}

.lw-filter-group-body {
	overflow: hidden;
	padding-bottom: 16px;
}

.lw-filter-group-body.is-collapsed {
	display: none;
}

/* Pills */
.lw-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.lw-filter-pills .lw-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border: 1px solid #e7e7e7;
	border-radius: 30px;
	background: #fff;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: #1a1a1a;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
	white-space: nowrap;
}

.lw-filter-pills .lw-pill:hover {
	border-color: #827e2e;
}

.lw-pill.is-active {
	background: #827e2e;
	border-color: #827e2e;
	color: #fff;
}

.lw-pill.lw-pill-hidden {
	display: none;
}

/* Color swatch inside pill */
.lw-pill-swatch {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid #dfdfdf;
	flex-shrink: 0;
}

/* Show more / less inside group */
.lw-pills-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-top: 12px;
	padding: 0;
}

.lw-pills-toggle .lw-less-text { display: none; }
.lw-pills-toggle[data-state="expanded"] .lw-more-text { display: none; }
.lw-pills-toggle[data-state="expanded"] .lw-less-text { display: inline; }

/* Footer */
.lw-filter-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}

.lw-filter-clear {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 0;
}

.lw-filter-apply {
	padding: 10px 26px;
	background: #827e24;
	color: #fff;
	border: none;
	border-radius: 30px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
}

.lw-filter-apply:hover {
	background: #9e9a2c;
	/* transform: translateY(-1px); */
}
.lw-filter-modal .accordion-header {
	margin-bottom: 0;
	line-height: normal;
}
.lw-filter-modal .accordion-item {
	background-color: #fff;
	border: 0;
    border-bottom: 1px solid #e9ebec;
	padding: 0;
	color: #1a1a1a;
}
.lw-filter-modal .accordion-button {
	background-color: transparent;
	color: #1a1a1a;
	padding: 1rem 0;
}
.lw-filter-modal .accordion-button:not(.collapsed) {
    color: #827e2e;
    background-color: transparent;
    box-shadow: none;
}
.lw-filter-modal .accordion-body {
    padding: 1rem 0;
}
.lw-filter-modal .accordion-button:focus {
	border-color: transparent;
	box-shadow: none;
}
.lw-filter-modal .accordion-button::after {
	width: 16px;
	height: 16px;
	background-size: 16px;
}
.lw-filter-group-header {
  padding: 16px 0;
}
/* Product grid loading state */

.lw-products-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s;
}

/* Hide Porto sidebar on shop/category pages  */

body.woocommerce .sidebar-wrapper,
body.woocommerce-page .sidebar-wrapper,
body.tax-product_cat .sidebar-wrapper {
	display: none !important;
}

body.woocommerce .content-wrapper,
body.woocommerce-page .content-wrapper,
body.tax-product_cat .content-wrapper {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}

.lw-design-cards {
	display: flex;
	gap: 15px;
	align-items: stretch;
}
.lw-filter-modal .lw-design-card {
	flex: 1;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 14px;
	text-align: left;
	cursor: pointer;
	background: #f7f7f7;
	transition: 0.3s;
}
.lw-design-card strong {
    display: block;
    font-size: 16px;
    line-height: 21px;
    color: #1a1a1a;
	margin-bottom: 8px;
}
.lw-design-card small {
	font-size: 14px;
	line-height: 21px;
	color: #777777;
}
.lw-design-card.is-active {
    border: 1px solid #827e2e;
    background: #ffffff;
    box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 4px 0px, rgba(0, 0, 0, 0.03) 0px 3px 3px 0px, rgba(0, 0, 0, 0.05) 0px 1px 8px 0px;
}
.lw-design-card:hover {
	border-color: #827e24;
}
/* Responsive */

@media (max-width: 600px) {
	.lw-filter-modal {
		width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		align-self: flex-end;
	}

	.lw-filter-overlay {
		align-items: flex-end;
	}

	.lw-filter-header,
	.lw-filter-footer {
		padding: 18px 20px;
	}

	.lw-filter-body {
		padding: 0 20px;
	}
}
