/* WD Product Showcase – everything is scoped under .wdps so WoodMart/Elementor styles can't leak in. */

.wdps {
	--wdps-accent: #ff6a00;
	--wdps-accent-soft: #fde5d4;
	--wdps-card-bg: #fff4ec;
	--wdps-card-border: #ffd8bd;
	--wdps-text: #222;
	--wdps-muted: #6b6b6b;
	--wdps-side-bg: #f6f6f6;
	--wdps-border: #e4e4e4;
	--wdps-side-w: 230px;

	position: relative;
	background: #fff;
	color: var(--wdps-text);
	border: 1px solid var(--wdps-border);
	line-height: 1.4;
}

.wdps *,
.wdps *::before,
.wdps *::after { box-sizing: border-box; }

/* ---- WoodMart / theme resets ---- */
.wdps button,
.wdps input,
.wdps select {
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	min-height: 0;
	font-family: inherit;
}
.wdps ul { list-style: none; margin: 0; padding: 0; }
.wdps li { margin: 0; }
.wdps a { text-decoration: none; box-shadow: none; }
.wdps h1, .wdps h2, .wdps h3, .wdps h4 { text-transform: none; }
.wdps [hidden] { display: none !important; }

/* ---- Layout ---- */
.wdps__layout {
	display: grid;
	grid-template-columns: var(--wdps-side-w) minmax(0, 1fr);
	grid-template-areas:
		"title bar"
		"side  main";
}
.wdps--no-side .wdps__layout {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "title" "bar" "main";
}
.wdps--no-side .wdps__titlebox:empty,
.wdps--no-side .wdps__bar:empty { display: none; }

/* ---- Title ---- */
.wdps__titlebox {
	grid-area: title;
	display: flex;
	align-items: center;
	padding: 0 20px;
	min-height: 64px;
	border-bottom: 1px solid var(--wdps-border);
	border-right: 1px solid var(--wdps-border);
}
.wdps--no-side .wdps__titlebox { border-right: 0; }
.wdps__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--wdps-text);
	line-height: 1.2;
}

/* ---- Filter bar ---- */
.wdps__bar {
	grid-area: bar;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	min-height: 64px;
	border-bottom: 1px solid var(--wdps-border);
	position: relative;
}
.wdps__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}
.wdps__chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0 6px 0 0;
	background: var(--wdps-accent-soft);
	color: var(--wdps-text);
	font-size: 12px;
	border-radius: 2px;
	border: 1px solid transparent;
}
.wdps__chip button {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	line-height: 1;
	cursor: pointer;
}
.wdps__chip-label { padding: 7px 4px 7px 12px !important; font-size: 12px; }
.wdps__chip-x {
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	font-size: 15px;
	border-radius: 50%;
	opacity: .55;
}
.wdps__chip-x:hover { background: rgba(0, 0, 0, .1); opacity: 1; }
.wdps__chip.is-active { background: var(--wdps-accent); color: #fff; }
.wdps__chip.is-active .wdps__chip-x { opacity: 1; }
.wdps__chip.is-active .wdps__chip-x:hover { background: rgba(255, 255, 255, .25); }

.wdps__filter { position: relative; margin-left: auto; flex: none; }
.wdps__filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #fff;
	color: var(--wdps-text);
	border: 1px solid var(--wdps-accent);
	border-radius: 2px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
}
.wdps__filter-btn svg { color: var(--wdps-accent); }
.wdps__filter-btn:hover,
.wdps__filter-btn[aria-expanded="true"] { background: var(--wdps-accent-soft); }

.wdps__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 50;
	width: 320px;
	max-width: calc(100vw - 32px);
	max-height: 70vh;
	overflow: auto;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--wdps-border);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}
.wdps__group { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.wdps__group-title {
	display: block;
	padding: 0;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wdps-text);
}
.wdps__panel select,
.wdps__price-row input {
	width: 100%;
	height: 38px;
	padding: 0 10px;
	background: #fff;
	color: var(--wdps-text);
	border: 1px solid var(--wdps-border);
	border-radius: 2px;
	font-size: 14px;
}
.wdps__panel select:focus,
.wdps__price-row input:focus { outline: 2px solid var(--wdps-accent); outline-offset: -1px; border-color: transparent; }
.wdps__checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.wdps__check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin: 0; }
.wdps__check input { accent-color: var(--wdps-accent); width: 15px; height: 15px; margin: 0; }
.wdps__price-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.wdps__panel-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--wdps-border);
}
.wdps__clear {
	padding: 6px 0;
	background: none;
	border: 0;
	color: var(--wdps-muted);
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}
.wdps__apply {
	padding: 10px 18px;
	background: var(--wdps-accent);
	color: #fff;
	border: 1px solid var(--wdps-accent);
	border-radius: 2px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}
.wdps__apply:hover { filter: brightness(.92); }

/* ---- Sidebar ---- */
.wdps__side {
	grid-area: side;
	background: var(--wdps-side-bg);
	border-right: 1px solid var(--wdps-border);
}
.wdps__cat { border-bottom: 1px solid var(--wdps-border); }
.wdps__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 16px;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: var(--wdps-text);
	font-size: 14px;
	font-weight: 500;
	text-align: left;
	line-height: 1.35;
	cursor: pointer;
}
.wdps__chev { flex: none; margin-left: 8px; transition: transform .2s ease; }
.wdps__cat.is-open .wdps__chev { transform: rotate(180deg); }
.wdps__cat-head:hover,
.wdps__cat-head.is-active { color: var(--wdps-accent); }

.wdps__subcats { display: none; padding: 0 8px 12px; }
.wdps__cat.is-open > .wdps__subcats { display: block; }
.wdps__subcats li { border-bottom: 1px solid var(--wdps-border); }
.wdps__subcats li:last-child { border-bottom: 0; }
.wdps__subcats a {
	display: block;
	padding: 9px 10px;
	color: var(--wdps-text);
	font-size: 13px;
	border-radius: 2px;
}
.wdps__subcats a:hover { color: var(--wdps-accent); }
.wdps__subcats a.is-active { background: var(--wdps-accent-soft); color: var(--wdps-accent); }

/* ---- Main / grid ---- */
.wdps__main { grid-area: main; min-width: 0; padding: 16px; }
.wdps__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px 16px;
	transition: opacity .2s ease;
}
.wdps.is-loading .wdps__grid { opacity: .45; pointer-events: none; }
.wdps__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 48px 16px;
	text-align: center;
	color: var(--wdps-muted);
}

/* ---- Card ---- */
.wdps-card {
	background: var(--wdps-card-bg);
	border: 1px solid var(--wdps-card-border);
	border-radius: 2px;
	overflow: hidden;
	min-width: 0;
}
.wdps-card__link { display: block; color: inherit; }
.wdps-card__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	background: #ececec;
	overflow: hidden;
}
.wdps-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 1 !important;
	transition: transform .35s ease;
}
.wdps-card__link:hover .wdps-card__media img { transform: scale(1.03); }
.wdps-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 7px;
	background: var(--wdps-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}
.wdps-card__body { padding: 14px 12px 16px; }
.wdps-card__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--wdps-text);
}
.wdps-card__price {
	color: var(--wdps-accent);
	font-size: 13px;
	font-weight: 600;
}
.wdps-card__price .amount,
.wdps-card__price .woocommerce-Price-amount,
.wdps-card__price .woocommerce-Price-currencySymbol { color: inherit; font-weight: inherit; }

/* ---- Bottom button ---- */
.wdps__more-wrap { padding: 32px 0 14px; text-align: center; }
.wdps__more {
	display: inline-block;
	padding: 14px 38px;
	background: transparent;
	color: var(--wdps-accent);
	border: 1px solid var(--wdps-accent);
	border-radius: 2px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.wdps__more:hover,
.wdps__more:focus-visible { background: var(--wdps-accent); color: #fff; }

/* ---- Focus + motion ---- */
.wdps a:focus-visible,
.wdps button:focus-visible { outline: 2px solid var(--wdps-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.wdps * { transition: none !important; }
}

/* ---- Mobile: sidebar stacks above the grid ---- */
@media (max-width: 767px) {
	.wdps__layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "title" "bar" "side" "main";
	}
	.wdps__titlebox { border-right: 0; min-height: 52px; }
	.wdps__side { border-right: 0; border-bottom: 1px solid var(--wdps-border); }
	.wdps__bar { flex-wrap: wrap; min-height: 56px; }
	.wdps__main { padding: 12px; }
	.wdps__panel { right: auto; left: 0; }
	.wdps-card__body { padding: 10px 10px 12px; }
	.wdps-card__title { font-size: 14px; }
}
