/* =========================================================================
 * DKLens — product carousel, styled to match the "Popular products" (.dkp)
 * card design. Applies only to Woodmart product ELEMENTS (Elementor widgets
 * / shortcodes), never to the catalog archive.
 * ========================================================================= */

.wd-products-element {
	--dkl-ink:    #111111;
	--dkl-dim:    #6b6b6b;
	--dkl-tile:   #f4f4f4;
	--dkl-orange: #FF5A00;
	--dkl-green:  #16A34A;
	--dkl-amber:  #D97706;
	--dkl-ease:   cubic-bezier(0.22, 1, 0.36, 1);

	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 60px;
	font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.wd-products-element *,
.wd-products-element *::before,
.wd-products-element *::after {
	box-sizing: border-box;
}

/* --- Track ------------------------------------------------------------- */
/* Woodmart's own sliders (related products, upsells) manage their own
   track widths — leave those alone or the slides collapse. */
.wd-products-element .wd-products:not(.wd-carousel):not(.owl-carousel) {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 16px;
	margin: 0;
	padding: 4px 2px 8px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.wd-products-element .wd-products::-webkit-scrollbar {
	display: none;
}

/* --- Card -------------------------------------------------------------- */
.wd-products-element .wd-products:not(.wd-carousel):not(.owl-carousel) .dklens-item {
	flex: 0 0 calc((100% - 64px) / 5);
	max-width: calc((100% - 64px) / 5);
	scroll-snap-align: start;
}

.wd-products-element .dklens-item {
	margin: 0 !important;
	padding: 0;
	display: flex;
	flex-direction: column;
	background: var(--dkl-tile);
	border: 0;
	border-radius: 12px;
	overflow: hidden;
	color: inherit;
	transition: transform 250ms var(--dkl-ease), box-shadow 250ms var(--dkl-ease);
}

.wd-products-element .dklens-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 26px -12px rgba(0,0,0,.22);
}

/* --- Media ------------------------------------------------------------- */
.wd-products-element .dklens-item__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	overflow: hidden;
}

.wd-products-element .dklens-item__thumb {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
	padding: 6% 6% 12%;
}

.wd-products-element .dklens-item__thumb img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 500ms var(--dkl-ease);
}

.wd-products-element .dklens-item:hover .dklens-item__thumb img {
	transform: scale(1.04);
}

/* Brand chip — same treatment as the "Check compatibility" flag */
.wd-products-element .dklens-item__brand {
	position: absolute;
	left: 9px;
	bottom: 9px;
	top: auto;
	z-index: 2;
	display: inline-block;
	padding: 5px 10px;
	border-radius: 6px;
	background: rgba(255,255,255,.94);
	color: #444;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	box-shadow: none;
}

/* --- Body -------------------------------------------------------------- */
.wd-products-element .dklens-item__main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 14px 16px 0;
}

.wd-products-element .dklens-item__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--dkl-ink);
	text-decoration: none;
	transition: color 200ms var(--dkl-ease);
}

.wd-products-element .dklens-item__title:hover {
	color: var(--dkl-orange);
}

.wd-products-element .dklens-item__oem {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--dkl-dim);
}

/* Archive-only detail — noise inside a compact card */
.wd-products-element .dklens-item__specs,
.wd-products-element .dklens-item__more,
.wd-products-element .dklens-item__id,
.wd-products-element .dklens-item__vat,
.wd-products-element .dklens-item__legal,
.wd-products-element .dklens-item__cart select {
	display: none !important;
}

.wd-products-element .dklens-item__tags:empty {
	display: none;
}

.wd-products-element .dklens-tag--best {
	display: inline-block;
	margin-top: 8px;
	background: var(--dkl-ink);
	color: #fff;
	border-radius: 4px;
	padding: 2px 7px;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* --- Buy row ----------------------------------------------------------- */
.wd-products-element .dklens-item__buy {
	margin-top: 12px;
	padding: 0 16px 17px;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 8px 10px;
}

.wd-products-element .dklens-item__price {
	grid-column: 1;
	font-size: 17px;
	font-weight: 900;
	letter-spacing: -.01em;
	color: var(--dkl-ink);
	line-height: 1.2;
}

.wd-products-element .dklens-item__price,
.wd-products-element .dklens-item__price span,
.wd-products-element .dklens-item__price bdi,
.wd-products-element .dklens-item__price .amount {
	color: var(--dkl-ink) !important;
}

.wd-products-element .dklens-item__price del,
.wd-products-element .dklens-item__price del bdi,
.wd-products-element .dklens-item__price del span {
	font-size: 12px;
	font-weight: 500;
	color: #aaa !important;
	margin-right: 5px;
}

.wd-products-element .dklens-item__price ins {
	text-decoration: none;
}

.wd-products-element .dklens-item__stock {
	grid-column: 1;
	grid-row: 2;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--dkl-dim);
}

.wd-products-element .dklens-item__stock::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dkl-green);
	flex: 0 0 auto;
}

.wd-products-element .dklens-item__stock.is-out::before {
	background: var(--dkl-amber);
}

.wd-products-element .dklens-item__cart {
	grid-column: 2;
	grid-row: 1 / span 2;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	align-self: center;
}

.wd-products-element .dklens-item__buy .dklens-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	min-width: 34px;
	min-height: 34px;
	max-width: 34px;
	max-height: 34px;
	aspect-ratio: 1 / 1;
	box-sizing: border-box;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--dkl-orange);
	color: #fff;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	transition: filter 200ms var(--dkl-ease), transform 200ms var(--dkl-ease);
}

.wd-products-element .dklens-item__buy .dklens-btn::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M2 3h3l2.6 12.3a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.2L21 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M2 3h3l2.6 12.3a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.2L21 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wd-products-element .dklens-item:hover .dklens-btn {
	filter: brightness(1.08);
}

.wd-products-element .dklens-item__buy .dklens-btn:hover {
	transform: scale(1.08);
}

.wd-products-element .dklens-item__buy .dklens-btn--ghost {
	background: #fff;
	border: 1px solid #ddd;
	color: var(--dkl-ink);
}

/* --- Tabbed product grid (4 columns x 2 rows) --------------------------- */
.dkl-tabs{width:100%;max-width:1400px;margin:0 auto;padding:56px 60px 0;font-family:'Inter',ui-sans-serif,system-ui,-apple-system,sans-serif;}
.dkl-tabs__head{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:28px;}
.dkl-tabs__titles .dkl-sechead__title{margin:0 !important;}
.dkl-tabs__pills{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;}
.dkl-pill{appearance:none;border:1px solid #e2e2e2;background:#fff;color:#444;border-radius:999px;padding:9px 20px;font-size:13.5px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color .2s ease,color .2s ease,background .2s ease;}
.dkl-pill:hover{border-color:#ffc9ac;color:#FF5A00;}
.dkl-pill.is-active{background:#FF5A00;border-color:#FF5A00;color:#fff;}
.dkl-tabpanel{display:none;}
.dkl-tabpanel.is-active{display:block;animation:dklTabFade .28s cubic-bezier(.22,.61,.36,1) both;}
@keyframes dklTabFade{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
.wd-products-element.dkl-grid-el{max-width:none;padding:0;}
.wd-products-element.dkl-grid-el .wd-products{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;padding:0;overflow:visible;}
.wd-products-element.dkl-grid-el .dklens-item{flex:none;max-width:none;}
.dkl-tabs__foot{display:flex;justify-content:center;margin-top:30px;}
.dkl-tabs__all{font-size:13.5px;font-weight:600;color:#6b6b6b;text-decoration:none;transition:color .2s ease;}
.dkl-tabs__all:hover{color:#FF5A00;}
@media (max-width:1024px){.wd-products-element.dkl-grid-el .wd-products{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:782px){.dkl-tabs__head{flex-direction:column;align-items:flex-start;gap:18px;}.dkl-tabs__pills{justify-content:flex-start;}}
@media (max-width:600px){.dkl-tabs{padding:40px 16px 0;}.wd-products-element.dkl-grid-el .wd-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}.dkl-pill{padding:8px 15px;font-size:12.5px;}}

/* --- Stacked category rows --------------------------------------------- */
.dkl-prow {
	width: 100%;
	margin-top: 56px;
}

@media (max-width: 600px) {
	.dkl-prow {
		margin-top: 40px;
	}
}

/* --- Section header (eyebrow + title + view all) ------------------------ */
.dkl-sechead {
	width: 100%;
	align-self: stretch;
	flex: 1 1 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 60px;
	font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
	color: #111;
	text-align: left;
}

.dkl-sechead__eyebrow {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	margin-bottom: 12px;
}

.dkl-sechead__rule {
	display: block;
	width: 28px;
	height: 1px;
	background: #FF5A00;
}

.dkl-sechead__label {
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.dkl-sechead__row {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
	text-align: left;
}

.dkl-sechead__title {
	margin: 0 !important;
	font-size: clamp(24px, 3vw, 32px) !important;
	font-weight: 900 !important;
	letter-spacing: -.02em;
	line-height: 1.05 !important;
	color: #111 !important;
	text-transform: uppercase;
}

.dkl-sechead__all {
	font-size: 13px;
	font-weight: 600;
	color: #6b6b6b;
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s ease;
}

.dkl-sechead__all:hover {
	color: #111;
}

/* --- Arrows ------------------------------------------------------------ */
.dkl-carousel-nav {
	position: absolute;
	top: 34%;
	z-index: 5;
	width: 34px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity .2s ease;
}

.dkl-carousel-nav[hidden] {
	display: none !important;
}

.dkl-carousel-nav:hover {
	background: none;
	box-shadow: none;
	opacity: .6;
}

.dkl-carousel-nav--prev {
	left: 12px;
}

.dkl-carousel-nav--next {
	right: 12px;
}

.dkl-carousel-nav::before {
	content: "";
	width: 22px;
	height: 22px;
	background: #111;
	-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18 9 12l6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18 9 12l6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: background .2s ease;
}

.dkl-carousel-nav:hover::before {
	background: #111;
}

.dkl-carousel-nav--next::before {
	transform: rotate(180deg);
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1200px) {
	.wd-products-element .dklens-item {
		flex-basis: calc((100% - 48px) / 4);
		max-width: calc((100% - 48px) / 4);
	}
}

@media (max-width: 900px) {
	.wd-products-element .dklens-item {
		flex-basis: calc((100% - 32px) / 3);
		max-width: calc((100% - 32px) / 3);
	}
}

@media (max-width: 600px) {
	.dkl-sechead {
		padding: 0 16px;
	}
	.dkl-sechead__all {
		display: none;
	}
	.wd-products-element {
		padding-left: 16px;
		padding-right: 16px;
	}
	.wd-products-element .wd-products {
		gap: 10px;
	}
	.wd-products-element .wd-products:not(.wd-carousel):not(.owl-carousel) .dklens-item {
		flex-basis: calc((100% - 10px) / 2);
		max-width: calc((100% - 10px) / 2);
	}
	.dkl-carousel-nav {
		display: none;
	}
}

/* --- Tablet gutters (601–900px) ---------------------------------------- */
@media (max-width: 900px) and (min-width: 601px) {
	.wd-products-element,
	.dkl-sechead {
		padding-left: 24px;
		padding-right: 24px;
	}
	.dkl-tabs {
		padding-left: 24px;
		padding-right: 24px;
	}
}

/* --- Small phones (<=480px) -------------------------------------------- */
@media (max-width: 480px) {
	.wd-products-element,
	.dkl-sechead {
		padding-left: 14px;
		padding-right: 14px;
	}
	.dkl-tabs {
		padding: 32px 14px 0;
	}

	/* Section headings */
	.dkl-sechead__title {
		font-size: 20px !important;
	}
	.dkl-sechead__eyebrow {
		margin-bottom: 8px;
	}
	.dkl-sechead__label {
		font-size: 9px;
		letter-spacing: .18em;
	}
	.dkl-sechead__row {
		margin-bottom: 18px;
	}

	/* Pills scroll sideways instead of wrapping into three rows */
	.dkl-tabs__pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-ms-overflow-style: none;
		margin: 0 -14px;
		padding: 2px 14px;
	}
	.dkl-tabs__pills::-webkit-scrollbar {
		display: none;
	}
	.dkl-pill {
		padding: 7px 13px;
		font-size: 12px;
	}

	/* Card body */
	.wd-products-element .dklens-item__main {
		padding: 11px 11px 0;
	}
	.wd-products-element .dklens-item__title {
		font-size: 12.5px;
	}
	.wd-products-element .dklens-item__oem {
		font-size: 11px;
	}
	.wd-products-element .dklens-item__brand {
		left: 6px;
		bottom: 6px;
		padding: 4px 7px;
		font-size: 9px;
	}

	/* Buy row — price was colliding with the cart button at this width */
	.wd-products-element .dklens-item__buy {
		margin-top: 10px;
		padding: 0 11px 12px;
		gap: 6px 8px;
	}
	.wd-products-element .dklens-item__price {
		font-size: 15px;
	}
	.wd-products-element .dklens-item__price del {
		font-size: 11px;
		margin-right: 4px;
	}
	.wd-products-element .dklens-item__stock {
		font-size: 11px;
	}
	.wd-products-element .dklens-item__buy .dklens-btn {
		flex: 0 0 30px;
		width: 30px;
		height: 30px;
		min-width: 30px;
		min-height: 30px;
		max-width: 30px;
		max-height: 30px;
	}
	.wd-products-element .dklens-item__buy .dklens-btn::before {
		width: 14px;
		height: 14px;
	}

	/* Vertical rhythm */
	.dkl-prow {
		margin-top: 32px;
	}
	.dkl-tabs__foot {
		margin-top: 22px;
	}
}

/* --- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.wd-products-element .dklens-item,
	.wd-products-element .dklens-item__thumb img,
	.wd-products-element .dklens-item__buy .dklens-btn {
		transition: none;
	}
	.wd-products-element .dklens-item:hover,
	.wd-products-element .dklens-item:hover .dklens-item__thumb img {
		transform: none;
	}
}
