/**
 * Module: Products Main Section.
 * Loaded only when a `products_main_section` layout is present.
 * Dark image/colour background (set inline from ACF; falls back to dark-blue).
 * Card styles here are specific to products; JS in the matching module JS.
 */
.products-main {
	background-color: var(--fuchs-dark-blue, #0F1F41);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
}

/* Heading */
.products-main .products-head {
	margin-bottom: 2rem;
}
.products-main .products-title {
	color: #fff;
}
.products-main .products-desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--fuchs-fs-lead, 20px);
	font-weight: var(--fuchs-fw-regular, 400);
}

/* ---- Filter bar ---- */
.products-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
	margin-bottom: 2.5rem;
}
.products-filter .products-search {
	position: relative;
	flex: 1 1 220px;
}
.products-filter .products-search .bi-search {
	position: absolute;
	top: 50%;
	left: 0.9rem;
	transform: translateY(-50%);
	color: var(--fuchs-500, #918F8F);
	pointer-events: none;
}
.products-filter .products-search input,
.products-filter .products-filter-field select {
	width: 100%;
	min-height: 46px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	font-family: var(--fuchs-font);
	font-size: 1rem;
	background-color: #fff;
	color: var(--fuchs-text, #231F20);
}
.products-filter .products-search input {
	padding: 0.6rem 0.9rem 0.6rem 2.4rem;
}
.products-filter .products-filter-field {
	flex: 0 1 170px;
}
.products-filter .products-filter-field select {
	padding: 0.6rem 2rem 0.6rem 0.9rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23656263'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8rem center;
	background-size: 14px;
	appearance: none;
	-webkit-appearance: none;
}
.products-filter input:focus,
.products-filter select:focus {
	outline: 0;
	border-color: var(--fuchs-primary-300, #71A0CB);
	box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}
.products-filter .products-search-btn {
	min-height: 46px;
	padding: 0.6rem 1.8rem;
	border: 0;
	border-radius: 8px;
	background-color: var(--fuchs-primary, #1260A9);
	color: #fff;
	font-weight: var(--fuchs-fw-semibold, 600);
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.15s ease-in-out;
}
.products-filter .products-search-btn:hover,
.products-filter .products-search-btn:focus {
	background-color: #0F5391;
}

/* ---- Product cards ---- */
.product-card {
	height: 100%;
}
.product-card-toggle {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background-color: #fff;
	border-radius: 14px;
	overflow: hidden;
	text-align: left;
	cursor: pointer;
	transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}
.product-card.has-variants .product-card-toggle:hover {
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
	transform: translateY(-3px);
}
.product-card-toggle:disabled {
	cursor: default;
}
.product-card-label {
	position: absolute;
	margin: 0.9rem;
	padding: 0.25rem 0.8rem;
	border-radius: 6px;
	background-color: var(--fuchs-primary-100, #D0DFEE);
	color: var(--fuchs-primary, #1260A9);
	font-size: 0.78rem;
	font-weight: var(--fuchs-fw-semibold, 600);
	z-index: 2;
}
.product-card-media {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	background-color: #fff;
}
.product-card-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 1.5rem 1rem 0.5rem;
}
.product-card-media-ph {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--fuchs-primary-100, #D0DFEE), var(--fuchs-teal-100, #CFE9E9));
}
.product-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.25rem 1.25rem;
}
.product-card-name {
	font-size: 1.1rem;
	font-weight: var(--fuchs-fw-semibold, 600);
	color: var(--fuchs-text, #231F20);
}
.product-card-arrow {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background-color: var(--fuchs-primary, #1260A9);
	color: #fff;
	transition: transform 0.2s ease-in-out;
}
.product-card.is-open .product-card-arrow {
	transform: rotate(180deg);
}

/* ---- Expanded variation panel (full width, below the row) ---- */
.product-detail {
	scroll-margin-top: 100px;
}
.product-detail-inner {
	background-color: #fff;
	color: var(--fuchs-text, #231F20);
	border-radius: 14px;
	padding: 2rem;
}
.variant-row {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--fuchs-100, #E9E9E9);
}
.variant-row:first-child {
	padding-top: 0;
}
.variant-row:last-of-type {
	border-bottom: 0;
}
.variant-media .variant-slider {
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--fuchs-bg-light, #E9E9E9);
}
.variant-media .carousel-item {
	position: relative;
}
.variant-media .carousel-item img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	padding: 1rem;
	background-color: #fff;
}
.variant-media .variant-code {
	position: absolute;
	left: 0.6rem;
	bottom: 0.6rem;
	padding: 0.15rem 0.6rem;
	border-radius: 6px;
	background-color: var(--fuchs-primary, #1260A9);
	color: #fff;
	font-size: 0.75rem;
	font-weight: var(--fuchs-fw-semibold, 600);
}
.variant-media .carousel-indicators {
	margin-bottom: 0.5rem;
}
.variant-media .carousel-indicators [data-bs-target] {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 0;
	background-color: rgba(15, 31, 65, 0.35);
	opacity: 1;
}
.variant-media .carousel-indicators .active {
	background-color: var(--fuchs-primary, #1260A9);
}
.variant-title {
	font-size: 1.15rem;
	font-weight: var(--fuchs-fw-semibold, 600);
	margin-bottom: 0.75rem;
}
.variant-desc,
.variant-features {
	color: var(--fuchs-700, #656263);
	font-size: 0.95rem;
	line-height: 1.6;
}
.variant-features {
	margin-top: 0.75rem;
}
.variant-features ul,
.variant-desc ul {
	padding-left: 1.15rem;
	margin-bottom: 0;
}
.product-detail-actions {
	margin-top: 1.5rem;
	text-align: center;
}
.product-detail-actions .btn i {
	margin-right: 0.4rem;
}

/* ---- Footer: showing + pagination (on the dark section) ---- */
.products-footer {
	margin-top: 2.5rem;
}
.products-showing {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.95rem;
}
.products-showing .products-showing-current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 0.35rem;
	margin: 0 0.15rem;
	border-radius: 50%;
	background-color: #fff;
	color: var(--fuchs-dark-blue, #0F1F41);
	font-weight: var(--fuchs-fw-semibold, 600);
	font-size: 0.85rem;
}
.products-pagination .page-item .page-link {
	min-width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0.2rem;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background-color: transparent;
	color: #fff;
}
.products-pagination .page-item.active .page-link,
.products-pagination .page-item .page-link:hover {
	background-color: #fff;
	border-color: #fff;
	color: var(--fuchs-dark-blue, #0F1F41);
}
.products-empty {
	padding: 2rem 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.05rem;
}

@media (max-width: 575.98px) {
	.product-detail-inner {
		padding: 1.25rem;
	}
}
