/**
 * Brand Showcase Pro frontend styles.
 * Clean editorial layout: soft neutral surfaces, black type, pill filters.
 */

.bsp-showcase {
	--bsp-fg: #111111;
	--bsp-muted: #8a8a8a;
	--bsp-line: #e9e9e9;
	--bsp-control-border: #d6d6d6;
	--bsp-surface: #f4f4f4;
	--bsp-surface-2: #ededed;
	--bsp-card: #f6f6f6;
	--bsp-bg: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--bsp-fg);
	position: relative;
}

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

/* When a section background colour is set, frame the content with padding. */
.bsp-showcase.bsp-has-bg {
	padding: 32px clamp(16px, 4vw, 40px);
	border-radius: 10px;
}

/* Background image covers the whole section, colour above acts as fallback. */
.bsp-showcase.bsp-has-bg-image {
	background-position: center;
}

.bsp-showcase.bsp-bg-cover {
	background-size: cover;
	background-repeat: no-repeat;
}

.bsp-showcase.bsp-bg-contain {
	background-size: contain;
	background-repeat: no-repeat;
}

.bsp-showcase.bsp-bg-tile {
	background-size: auto;
	background-repeat: repeat;
	background-position: top left;
}

.bsp-showcase.bsp-bg-fixed {
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

/* ---------- Filter bar (pill style) ---------- */
.bsp-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 0 0 6px;
}

.bsp-filter--search {
	position: relative;
	flex: 1 1 320px;
	min-width: 220px;
}

.bsp-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bsp-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 2;
}

/* High specificity plus important so themes cannot collapse the icon padding. */
.bsp-showcase .bsp-filter--search .bsp-search {
	box-sizing: border-box !important;
	width: 100%;
	max-width: 100%;
	height: 46px;
	margin: 0 !important;
	padding: 0 18px 0 46px !important;
	border: 1px solid var(--bsp-control-border) !important;
	border-radius: 12px;
	font-size: 14px;
	line-height: 46px;
	background: var(--bsp-surface);
	color: var(--bsp-fg);
	transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bsp-search::placeholder {
	color: var(--bsp-muted);
}

.bsp-search:focus {
	outline: none;
	background: var(--bsp-surface-2);
	border-color: var(--bsp-fg) !important;
}

/* Gender pills */
.bsp-filter--gender {
	display: inline-flex;
	gap: 8px;
}

.bsp-gender {
	appearance: none;
	border: 1px solid var(--bsp-control-border);
	background: var(--bsp-surface);
	padding: 11px 21px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	color: var(--bsp-muted);
	border-radius: 12px;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.bsp-gender:hover {
	color: var(--bsp-fg);
	border-color: var(--bsp-fg);
}

.bsp-gender.is-active {
	background: var(--bsp-fg);
	color: #fff;
	border-color: var(--bsp-fg);
}

.bsp-filter--special {
	display: flex;
	gap: 8px;
}

.bsp-special {
	appearance: none;
	border: 1px solid var(--bsp-control-border);
	background: var(--bsp-surface);
	padding: 11px 21px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	color: var(--bsp-muted);
	border-radius: 12px;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.bsp-special:hover {
	color: var(--bsp-fg);
	border-color: var(--bsp-fg);
}

.bsp-special.is-active {
	background: var(--bsp-fg);
	color: #fff;
	border-color: var(--bsp-fg);
}

/* Dropdowns styled as pills */
.bsp-showcase .bsp-category,
.bsp-showcase .bsp-brand-filter {
	appearance: none;
	box-sizing: border-box !important;
	max-width: 100%;
	margin: 0 !important;
	padding: 11px 40px 11px 18px;
	border: 1px solid var(--bsp-control-border);
	background: var(--bsp-surface)
		url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' fill='none' stroke-width='1.4'/%3E%3C/svg%3E")
		no-repeat right 16px center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bsp-fg);
	cursor: pointer;
	border-radius: 12px;
	transition: border-color 0.2s ease;
}

.bsp-category:focus,
.bsp-brand-filter:focus {
	outline: none;
	border-color: var(--bsp-fg);
}

/* Product count line */
.bsp-count {
	margin: 14px 0 28px;
	font-size: 13px;
	color: var(--bsp-muted);
	letter-spacing: 0.02em;
}

.bsp-count__num {
	color: var(--bsp-fg);
	font-weight: 600;
}

.bsp-count__label {
	margin-left: 4px;
}

/* ---------- Brand section ---------- */
.bsp-brand-section {
	margin: 0 0 64px;
}

.bsp-brand-section__head {
	margin-bottom: 26px;
}

.bsp-brand-section__logo img {
	width: auto;
	display: block;
}

.bsp-brand-section__name {
	font-size: 34px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--bsp-fg);
}

/* ---------- Grid ---------- */
.bsp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}

/* ---------- Product card ---------- */
.bsp-card {
	background: transparent;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.bsp-card__media {
	position: relative;
	overflow: hidden;
	background: var(--bsp-card);
	aspect-ratio: 4 / 5;
	border-radius: 6px;
}

.bsp-card__link {
	display: block;
	width: 100%;
	height: 100%;
}

.bsp-showcase .bsp-card__img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	transition: transform 0.55s ease;
}

/* Contain fit: show the whole product on a clean light background. */
.bsp-fit-contain .bsp-card__media {
	background: #ffffff;
}

.bsp-fit-contain .bsp-card__img {
	object-fit: contain;
	padding: 0;
}

/* Sale badge (only rendered when enabled in settings). */
.bsp-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	background: #c0392b;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 3px;
	line-height: 1;
}

.bsp-card:hover .bsp-card__img {
	transform: scale(1.04);
}

.bsp-card__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--bsp-surface-2);
}

/* Plus add button centered at the bottom of the image */
.bsp-card__add {
	position: absolute;
	left: 50%;
	bottom: 12px;
	transform: translateX(-50%);
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--bsp-fg);
	border-radius: 0;
	text-decoration: none;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	z-index: 2;
}

.bsp-card__add:hover {
	background: var(--bsp-fg);
	color: #fff;
	transform: translateX(-50%) translateY(-1px);
}

.bsp-card__add.loading {
	opacity: 0.6;
	pointer-events: none;
}

.bsp-card__add.added {
	background: var(--bsp-fg);
	color: #fff;
}

.bsp-card__add-icon {
	font-size: 22px;
	line-height: 1;
	font-weight: 300;
}

/* Hide the default WooCommerce "View cart" link that follows ajax add */
.bsp-card__media .added_to_cart {
	display: none !important;
}

.bsp-card__body {
	padding: 14px 2px 0;
}

.bsp-card__cat {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--bsp-muted);
	margin-bottom: 5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bsp-card__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.bsp-card__title {
	display: block;
	flex: 1;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--bsp-fg);
	text-decoration: none;
	line-height: 1.4;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bsp-card__title:hover {
	text-decoration: underline;
}

/* Prices always black. The sale (new) price stays solid, the old price is struck through. */
.bsp-card__price {
	flex-shrink: 0;
	white-space: nowrap;
	margin: 0;
}

.bsp-card__price,
.bsp-card__price .woocommerce-Price-amount,
.bsp-card__price ins,
.bsp-card__price ins .woocommerce-Price-amount {
	color: var(--bsp-fg) !important;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.bsp-card__price ins {
	font-weight: 600;
}

.bsp-card__price del,
.bsp-card__price del .woocommerce-Price-amount {
	color: var(--bsp-muted) !important;
	font-weight: 400;
	margin-right: 8px;
	text-decoration: line-through !important;
}

/* ---------- Carousel ---------- */
.bsp-carousel-wrap {
	position: relative;
}

.bsp-carousel {
	position: relative;
}

.bsp-carousel__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 22px;
}

.bsp-nav {
	appearance: none;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--bsp-line);
	border-radius: 8px;
	color: var(--bsp-fg);
	cursor: pointer;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
	transition: background 0.2s ease, border-color 0.2s ease;
}

.bsp-nav:hover {
	background: var(--bsp-surface);
	border-color: var(--bsp-fg);
}

/* Chevron as a text glyph: most robust, no theme rule can strip it. */
.bsp-nav::before {
	display: block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 22px;
	line-height: 1;
	font-weight: 400;
	color: #111111;
}

.bsp-nav--prev::before {
	content: "\2039";
}

.bsp-nav--next::before {
	content: "\203A";
}

.bsp-nav.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

/* ---------- States ---------- */
.bsp-empty {
	padding: 48px 0;
	text-align: center;
	color: var(--bsp-muted);
	font-size: 14px;
}

.bsp-results {
	transition: opacity 0.25s ease;
}

.bsp-results.is-loading {
	opacity: 0.4;
}

.bsp-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 160px;
	background: rgba(255, 255, 255, 0.65);
	z-index: 5;
}

.bsp-loader[hidden] {
	display: none !important;
}

.bsp-spinner {
	width: 34px;
	height: 34px;
	border: 2px solid var(--bsp-line);
	border-top-color: var(--bsp-fg);
	border-radius: 50%;
	animation: bsp-spin 0.7s linear infinite;
}

@keyframes bsp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Load More ---------- */
.bsp-loadmore-wrap {
	display: flex;
	justify-content: center;
	margin-top: 8px;
}

.bsp-loadmore-wrap:empty {
	display: none;
}

.bsp-loadmore {
	appearance: none;
	border: 1px solid var(--bsp-fg);
	background: #fff;
	color: var(--bsp-fg);
	padding: 14px 40px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease;
}

.bsp-loadmore:hover {
	background: var(--bsp-fg);
	color: #fff;
}

.bsp-loadmore.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

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

/* Large tablet */
@media (max-width: 1024px) {
	.bsp-grid {
		grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
		gap: 18px;
	}
}

/* 750: stack the filter bar and drop to two columns */
@media (max-width: 750px) {
	.bsp-filters {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	/* Reset the flex grow so the search does not stretch tall in a column layout. */
	.bsp-filter,
	.bsp-filter--search {
		width: 100%;
		flex: 0 0 auto;
		min-width: 0;
	}

	.bsp-filter--gender {
		display: flex;
	}

	.bsp-gender {
		flex: 1;
		text-align: center;
		padding: 12px 8px;
	}

	.bsp-category,
	.bsp-brand-filter {
		width: 100%;
	}

	.bsp-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 16px;
	}

	.bsp-brand-section {
		margin-bottom: 46px;
	}

	/* Carousel keeps its bottom arrows and allows swipe on touch screens. */
	.bsp-carousel {
		padding: 0;
	}
}

/* 650 */
@media (max-width: 650px) {
	.bsp-brand-section__name {
		font-size: 26px;
	}

	.bsp-count {
		margin: 12px 0 20px;
	}
}

/* 450 */
@media (max-width: 450px) {
	.bsp-grid {
		gap: 12px;
	}

	.bsp-card__title,
	.bsp-card__price,
	.bsp-card__price * {
		font-size: 13px;
	}

	.bsp-card__add {
		width: 32px;
		height: 32px;
		bottom: 8px;
	}

	.bsp-card__add-icon {
		font-size: 19px;
	}

	.bsp-brand-section__name {
		font-size: 22px;
	}
}

/* 375 */
@media (max-width: 375px) {
	.bsp-grid {
		gap: 10px;
	}

	.bsp-gender {
		padding: 11px 4px;
		font-size: 11px;
	}

	.bsp-card__title,
	.bsp-card__price,
	.bsp-card__price * {
		font-size: 12px;
	}

	.bsp-brand-section__name {
		font-size: 20px;
	}
}

/* 320 */
@media (max-width: 320px) {
	.bsp-grid {
		gap: 8px;
	}

	.bsp-category,
	.bsp-brand-filter {
		font-size: 11px;
		padding: 11px 34px 11px 14px;
	}

	.bsp-showcase .bsp-filter--search .bsp-search {
		font-size: 13px;
	}
}
