/* ==========================================================================
   Woo Marble Showcase — Front-end styles
   All layouts use flexbox and are fully responsive (mobile / tablet / desktop).

   ISOLATION NOTES:
   - No universal (*) selector and no bare/generic class names anywhere in
     this file. Every rule is scoped under one of three unique root classes
     (.wms-showcase-sections, .wms-showcase-grid, .wms-showcase-bestsellers)
     or the shared .wms-showcase-price block, all using the wms-showcase-
     prefix. This prefix cannot match Elementor (elementor-/e-*), WordPress
     core blocks (wp-block-/wp-*), or typical theme class names, so this
     stylesheet cannot leak onto — or be accidentally targeted by — any
     other section on the page.
   - box-sizing: border-box is applied ONLY to elements inside our own root
     wrappers (never globally with *), so nothing outside these shortcodes
     is touched.
   ========================================================================== */

.wms-showcase-sections,
.wms-showcase-sections *,
.wms-showcase-grid,
.wms-showcase-grid *,
.wms-showcase-bestsellers,
.wms-showcase-bestsellers * {
	box-sizing: border-box;
}

/* ---------- 1) Category Sections (list-style, image #1) ---------- */

.wms-showcase-sections {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	margin: 30px 0;
}

.wms-showcase-sections__block {
	flex: 1 1 280px;
	min-width: 0;
}

.wms-showcase-sections__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px;
	color: #1a1a1a;
}

.wms-showcase-sections__list {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.wms-showcase-sections__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	text-decoration: none;
	color: inherit;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.wms-showcase-sections__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wms-showcase-sections__thumb {
	flex: 0 0 66px;
	width: 66px;
	height: 66px;
	border-radius: 8px;
	overflow: hidden;
	background: #f4f4f4;
}

.wms-showcase-sections__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wms-showcase-sections__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.wms-showcase-sections__name {
	font-size: 15px;
	font-weight: 500;
	color: #1a1a1a;
}

.wms-showcase-sections__view-all {
	display: inline-block;
	margin-top: 18px;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
}

.wms-showcase-sections__view-all:hover {
	text-decoration: underline;
}

.wms-showcase-sections__item--empty {
	opacity: 0.85;
}

.wms-showcase-sections__empty-note {
	font-size: 12.5px;
	color: #9a9a9a;
	font-style: italic;
}

/* ---------- Shared price block (used by Sections + Best Sellers) ---------- */

.wms-showcase-price__row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
}

.wms-showcase-price__active {
	font-size: 17px;
	font-weight: 700;
	color: #c65b2e;
}

.wms-showcase-price__regular {
	font-size: 14px;
	color: #9a9a9a;
	text-decoration: line-through;
}

.wms-showcase-price__per-sqft {
	font-size: 12.5px;
	color: #8a8a8a;
}

/* ---------- 2) Category Hero Grid (image #2) ----------
   Fully self-contained namespace: every selector below is scoped under
   .wms-showcase-grid, and layout-critical rules use !important. This
   guarantees exactly 5-in-a-row on desktop and stops the plugin's CSS
   from leaking onto — or being overridden by — other Elementor
   widgets/sections that happen to sit on the same page.
   -------------------------------------------------------------- */

.wms-showcase-grid {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: 20px;
	width: 100%;
	margin: 30px 0;
}

.wms-showcase-grid .wms-showcase-grid__item {
	position: relative !important;
	display: block !important;
	flex: 1 1 20% !important; /* always 5 cards per row on desktop */
	width: 20% !important;
	max-width: 20% !important;
	min-width: 0 !important;
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none !important;
}

.wms-showcase-grid .wms-showcase-grid__media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden; /* clips the zoomed thumbnail */
	border-radius: inherit;
}

.wms-showcase-grid .wms-showcase-grid__bg {
	position: absolute;
	inset: 0;
	display: block;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: scale(1);
	transition: transform 0.45s ease;
	will-change: transform;
}

.wms-showcase-grid .wms-showcase-grid__item:focus-visible .wms-showcase-grid__bg {
	transform: scale(1.15);
}

@media (hover: hover) {
	.wms-showcase-grid .wms-showcase-grid__item:hover .wms-showcase-grid__bg {
		transform: scale(1.15); /* thumbnail zoom on hover — pointer devices only */
	}
}

.wms-showcase-grid .wms-showcase-grid__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
	z-index: 1;
}

.wms-showcase-grid .wms-showcase-grid__title {
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.wms-showcase-grid .wms-showcase-grid__meta {
	font-size: 13px;
	color: #e5e5e5;
	margin-top: 4px;
}

/* ---------- 3) Best Sellers Carousel (image #3) ---------- */

.wms-showcase-bestsellers {
	margin: 40px 0;
}

.wms-showcase-bestsellers__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.wms-showcase-bestsellers__title {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	color: #1a1a1a;
}

.wms-showcase-bestsellers__subtitle {
	font-size: 14px;
	color: #7a7a7a;
	margin: 4px 0 0;
}

.wms-showcase-bestsellers__nav {
	display: flex;
	flex-shrink: 0;
}

.wms-showcase-bestsellers__nav button {
	width: 36px;
	height: 36px;
	border-radius: 0;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 15px;
	margin-left: 8px;
	flex-shrink: 0;
}

.wms-showcase-bestsellers__nav button:hover {
	background: #f5f5f5;
}

.wms-showcase-bestsellers__track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 6px;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
}

.wms-showcase-bestsellers__track::-webkit-scrollbar {
	display: none;
}

.wms-showcase-bestsellers__card {
	flex: 0 0 260px;
	max-width: 260px;
	text-decoration: none;
	color: inherit;
	scroll-snap-align: start;
	-webkit-tap-highlight-color: transparent;
}

.wms-showcase-bestsellers__thumb {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 8px;
	overflow: hidden;
	background: #f4f4f4;
	margin-bottom: 12px;
}

.wms-showcase-bestsellers__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wms-showcase-bestsellers__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wms-showcase-bestsellers__name {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.wms-showcase-bestsellers__dims {
	font-size: 13px;
	color: #8a8a8a;
	margin-bottom: 2px;
}

/* ==========================================================================
   Responsive breakpoints
   Mobile-first tuning: every step below only tightens spacing/sizing,
   nothing changes the desktop (>1100px) experience above.
   ========================================================================== */

/* Small desktop / large tablet landscape — ease the 5-per-row grid down to 4
   before it gets cramped, instead of jumping straight to 3 at 900px. */
@media (max-width: 1100px) {
	.wms-showcase-grid .wms-showcase-grid__item {
		flex: 1 1 calc((100% - 60px) / 4) !important; /* 4 per row */
		width: calc((100% - 60px) / 4) !important;
		max-width: calc((100% - 60px) / 4) !important;
	}
}

/* Tablet */
@media (max-width: 900px) {
	.wms-showcase-sections {
		gap: 32px;
	}

	.wms-showcase-sections__title {
		font-size: 20px;
	}

	.wms-showcase-grid {
		gap: 14px;
		flex-wrap: wrap !important;
	}

	.wms-showcase-grid .wms-showcase-grid__item {
		flex: 1 1 calc((100% - 28px) / 3) !important; /* 3 per row */
		width: calc((100% - 28px) / 3) !important;
		max-width: calc((100% - 28px) / 3) !important;
	}

	.wms-showcase-bestsellers__title {
		font-size: 23px;
	}

	.wms-showcase-bestsellers__card {
		flex-basis: 220px;
		max-width: 220px;
	}

	.wms-showcase-bestsellers__nav button {
		width: 40px;
		height: 40px;
	}
}

/* Tablet portrait / phablet — sections read better as two even columns
   here rather than relying on the flex-wrap minimum width to decide. */
@media (max-width: 768px) {
	.wms-showcase-sections {
		gap: 26px 20px;
	}

	.wms-showcase-sections__block {
		flex: 1 1 calc(50% - 10px);
	}

	.wms-showcase-grid {
		gap: 12px;
	}

	.wms-showcase-bestsellers__track {
		gap: 14px;
		margin: 0 -4px;
		padding: 2px 4px 10px;
	}
}

/* Large phones */
@media (max-width: 600px) {
	.wms-showcase-sections {
		flex-direction: column;
		gap: 28px;
		margin: 24px 0;
	}

	.wms-showcase-sections__block {
		flex-basis: 100%;
	}

	.wms-showcase-sections__list {
		gap: 18px;
	}

	.wms-showcase-sections__item {
		gap: 14px;
		padding-bottom: 16px;
	}

	.wms-showcase-grid {
		gap: 10px;
	}

	.wms-showcase-grid .wms-showcase-grid__item {
		flex: 1 1 calc(50% - 5px) !important; /* 2 per row */
		width: calc(50% - 5px) !important;
		max-width: calc(50% - 5px) !important;
		min-width: 0 !important;
		border-radius: 8px;
	}

	.wms-showcase-grid .wms-showcase-grid__overlay {
		padding: 12px;
	}

	.wms-showcase-grid .wms-showcase-grid__title {
		font-size: 14.5px;
	}

	.wms-showcase-grid .wms-showcase-grid__meta {
		font-size: 11.5px;
		margin-top: 2px;
	}

	.wms-showcase-bestsellers__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		margin-bottom: 14px;
	}

	.wms-showcase-bestsellers__title {
		font-size: 20px;
	}

	.wms-showcase-bestsellers__subtitle {
		font-size: 13px;
	}

	.wms-showcase-bestsellers__nav {
		align-self: flex-end;
	}

	.wms-showcase-bestsellers__nav button {
		width: 44px; /* comfortable touch target */
		height: 44px;
		font-size: 16px;
	}

	.wms-showcase-bestsellers__card {
		flex-basis: 200px;
		max-width: 200px;
	}

	.wms-showcase-bestsellers__name {
		font-size: 15px;
	}
}

/* Small phones */
@media (max-width: 480px) {
	.wms-showcase-sections__block {
		flex-basis: 100%;
	}

	.wms-showcase-sections__thumb {
		flex-basis: 60px;
		width: 60px;
		height: 60px;
	}

	.wms-showcase-sections__name {
		font-size: 14px;
	}

	.wms-showcase-price__active {
		font-size: 15px;
	}

	.wms-showcase-grid .wms-showcase-grid__item {
		border-radius: 6px;
	}

	.wms-showcase-bestsellers__card {
		flex-basis: 78vw; /* one clear card per swipe on narrow screens */
		max-width: 280px;
	}
}

/* Extra small phones */
@media (max-width: 400px) {
	.wms-showcase-grid .wms-showcase-grid__item {
		flex: 1 1 100% !important; /* 1 per row */
		width: 100% !important;
		max-width: 100% !important;
		aspect-ratio: 16 / 10;
	}

	.wms-showcase-sections__thumb {
		flex-basis: 56px;
		width: 56px;
		height: 56px;
	}

	.wms-showcase-bestsellers__card {
		flex-basis: 82vw;
		max-width: 300px;
	}
}
