/**
 * Frontend styles for omoweb Related Products & CTA.
 *
 * Keep these styles light. Theme authors can override the CSS variables or
 * target the BEM classes directly.
 */

.omoweb-related-products,
.omoweb-content-cta {
	--omoweb-rpcta-border-color: #e5e7eb;
	--omoweb-rpcta-muted-color: #64748b;
	--omoweb-rpcta-surface-color: #ffffff;
	--omoweb-rpcta-soft-color: #f8fafc;
	--omoweb-rpcta-primary-color: #1d4ed8;
	--omoweb-rpcta-primary-soft: #93c5fd;
	--omoweb-rpcta-primary-contrast: #ffffff;
	--omoweb-rpcta-accent-color: #b45309;
	--omoweb-rpcta-danger-color: #b91c1c;
	--omoweb-rpcta-text-color: #111827;
	--omoweb-rpcta-radius: 8px;
	--omoweb-rpcta-gap: 16px;
	box-sizing: border-box;
	color: inherit;
}

.omoweb-related-products *,
.omoweb-related-products *::before,
.omoweb-related-products *::after,
.omoweb-content-cta *,
.omoweb-content-cta *::before,
.omoweb-content-cta *::after {
	box-sizing: border-box;
}

.omoweb-related-products {
	margin-block: 24px;
	margin-inline: 0;
}

.omoweb-related-products--inline {
	--omoweb-related-products-item-min: 0;
}

.omoweb-related-products--template {
	margin-block: 32px;
}

.omoweb-related-products__header {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-block: 0 14px;
	margin-inline: 0;
}

.omoweb-related-products__title {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.omoweb-related-products__list {
	display: grid;
	gap: var(--omoweb-rpcta-gap);
	grid-template-columns: repeat(var(--omoweb-related-products-columns, 4), minmax(var(--omoweb-related-products-item-min, 0), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.omoweb-related-products--carousel .omoweb-related-products__list {
	display: flex;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	padding-block-end: 8px;
	scroll-padding-inline: 2px;
	scroll-snap-type: inline proximity;
}

.omoweb-related-products--carousel .omoweb-related-products__item {
	flex: 0 0 min(260px, 80vw);
	scroll-snap-align: start;
}

.omoweb-related-products--carousel .swiper-slide {
	width: min(260px, 80vw);
}

.omoweb-related-products__item {
	margin: 0;
	min-width: 0;
}

.omoweb-product-card {
	background: var(--omoweb-rpcta-surface-color);
	border: 1px solid var(--omoweb-rpcta-border-color);
	border-radius: var(--omoweb-rpcta-radius);
	color: var(--omoweb-rpcta-text-color);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.omoweb-product-card:hover,
.omoweb-product-card:focus-within {
	border-color: var(--omoweb-rpcta-primary-soft);
	box-shadow: 0 10px 26px rgb(17 24 39 / 9%);
	transform: translateY(-1px);
}

.omoweb-product-card__image-link,
.omoweb-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.omoweb-product-card__image-link:hover,
.omoweb-product-card__image-link:focus,
.omoweb-product-card__title a:hover,
.omoweb-product-card__title a:focus {
	color: var(--omoweb-rpcta-primary-color);
	text-decoration: none;
}

.omoweb-product-card__image-link:focus-visible,
.omoweb-product-card__title a:focus-visible,
.omoweb-product-card__add-to-cart:focus-visible {
	outline: 2px solid var(--omoweb-rpcta-primary-color);
	outline-offset: 2px;
}

.omoweb-product-card__image {
	aspect-ratio: 1 / 1;
	background: var(--omoweb-rpcta-soft-color);
	display: block;
	overflow: hidden;
	width: 100%;
}

.omoweb-product-card__image img,
.omoweb-product-card__image-tag {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.omoweb-product-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding-block: 12px;
	padding-inline: 12px;
}

.omoweb-product-card__title {
	color: inherit;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.45;
	margin: 0;
	overflow-wrap: anywhere;
}

.omoweb-product-card__meta {
	display: grid;
	gap: 6px;
	margin: 0;
}

.omoweb-product-card__meta-item {
	align-items: baseline;
	background: var(--omoweb-rpcta-soft-color);
	border-radius: calc(var(--omoweb-rpcta-radius) - 2px);
	display: flex;
	gap: 6px;
	justify-content: space-between;
	line-height: 1.5;
	min-width: 0;
	padding-block: 5px;
	padding-inline: 8px;
}

.omoweb-product-card__meta-label {
	color: var(--omoweb-rpcta-muted-color);
	flex: 0 0 auto;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.omoweb-product-card__meta-value {
	color: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	min-width: 0;
	overflow-wrap: anywhere;
	text-align: end;
}

.omoweb-product-card__footer {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-block-start: auto;
	min-height: 40px;
}

.omoweb-product-card__price {
	color: var(--omoweb-rpcta-accent-color);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.5;
	min-width: 0;
	overflow-wrap: anywhere;
}

.omoweb-product-card__price del {
	color: var(--omoweb-rpcta-muted-color);
	font-size: 0.86em;
	font-weight: 500;
	opacity: 0.75;
}

.omoweb-product-card__price ins {
	background: transparent;
	color: inherit;
	text-decoration: none;
}

.omoweb-product-card__add-to-cart,
.omoweb-product-card__add-to-cart.button {
	align-items: center;
	appearance: none;
	background: var(--omoweb-rpcta-primary-color);
	border: 0;
	border-radius: calc(var(--omoweb-rpcta-radius) - 2px);
	box-shadow: none;
	color: var(--omoweb-rpcta-primary-contrast);
	display: inline-flex;
	flex: 0 0 38px;
	font-size: 18px;
	height: 38px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	min-height: 38px;
	min-width: 38px;
	padding: 0;
	text-decoration: none;
	transition: background-color 160ms ease, transform 160ms ease;
	width: 38px;
}

.omoweb-product-card__add-to-cart:hover,
.omoweb-product-card__add-to-cart:focus,
.omoweb-product-card__add-to-cart.button:hover,
.omoweb-product-card__add-to-cart.button:focus {
	background: #1e40af;
	color: var(--omoweb-rpcta-primary-contrast);
	text-decoration: none;
	transform: translateY(-1px);
}

.omoweb-product-card__cart-icon {
	display: block;
	font-size: 18px;
	height: 1em;
	line-height: 1;
	width: 1em;
}

.omoweb-product-card__stock {
	color: var(--omoweb-rpcta-muted-color);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.4;
}

.omoweb-product-card__stock--out {
	color: var(--omoweb-rpcta-danger-color);
}

.omoweb-related-products--jet .omoweb-related-products__list--jet {
	align-items: stretch;
}

.omoweb-related-products__item--jet {
	margin: 0;
	min-width: 0;
}

.omoweb-related-products__item--jet > * {
	min-width: 0;
}

.omoweb-related-products__link {
	background: var(--omoweb-rpcta-surface-color);
	border: 1px solid var(--omoweb-rpcta-border-color);
	border-radius: var(--omoweb-rpcta-radius);
	color: inherit;
	display: block;
	height: 100%;
	overflow: hidden;
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.omoweb-related-products__link:hover,
.omoweb-related-products__link:focus {
	border-color: var(--omoweb-rpcta-primary-soft);
	box-shadow: 0 8px 24px rgb(15 23 42 / 8%);
	color: inherit;
	text-decoration: none;
	transform: translateY(-1px);
}

.omoweb-related-products__link:focus-visible,
.omoweb-content-cta__button:focus-visible {
	outline: 2px solid var(--omoweb-rpcta-primary-color);
	outline-offset: 2px;
}

.omoweb-related-products__image {
	aspect-ratio: 1 / 1;
	background: var(--omoweb-rpcta-soft-color);
	display: block;
	margin: 0;
	overflow: hidden;
	width: 100%;
}

.omoweb-related-products__image img,
.omoweb-related-products__image-tag {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.omoweb-related-products__name {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.45;
	margin-block: 12px 6px;
	margin-inline: 12px;
	overflow-wrap: anywhere;
}

.omoweb-related-products__price {
	color: var(--omoweb-rpcta-muted-color);
	font-size: 0.92rem;
	line-height: 1.4;
	margin-block: 0 12px;
	margin-inline: 12px;
}

.omoweb-related-products__price del {
	opacity: 0.75;
}

.omoweb-related-products__price ins {
	background: transparent;
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.omoweb-related-products__notice {
	background: var(--omoweb-rpcta-soft-color);
	border: 1px solid var(--omoweb-rpcta-border-color);
	border-radius: var(--omoweb-rpcta-radius);
	color: var(--omoweb-rpcta-muted-color);
	padding: 10px 12px;
}

.omoweb-related-products__pagination.swiper-pagination {
	margin-block-start: 12px;
	position: static;
}

.omoweb-related-products__pagination .swiper-pagination-bullet-active {
	background: var(--omoweb-rpcta-primary-color);
}

.omoweb-content-cta {
	align-items: center;
	background: var(--omoweb-rpcta-surface-color);
	border: 1px solid var(--omoweb-rpcta-border-color);
	border-radius: var(--omoweb-rpcta-radius);
	display: flex;
	gap: var(--omoweb-rpcta-gap);
	justify-content: space-between;
	margin-block: 24px;
	margin-inline: 0;
	padding: 16px;
}

.omoweb-content-cta--default {
	background: var(--omoweb-rpcta-surface-color);
}

.omoweb-content-cta--boxed {
	background: var(--omoweb-rpcta-soft-color);
}

.omoweb-content-cta--minimal {
	background: transparent;
	border-inline: 0;
	border-radius: 0;
	padding-inline: 0;
}

.omoweb-content-cta--highlight {
	background: #fff8e5;
	border-color: #dba617;
}

.omoweb-content-cta__content {
	min-width: 0;
}

.omoweb-content-cta__title {
	display: block;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	overflow-wrap: anywhere;
}

.omoweb-content-cta__text {
	color: var(--omoweb-rpcta-muted-color);
	line-height: 1.6;
	margin-block: 4px 0;
	margin-inline: 0;
	overflow-wrap: anywhere;
}

.omoweb-content-cta__button {
	align-items: center;
	background: var(--omoweb-rpcta-primary-color);
	border-radius: calc(var(--omoweb-rpcta-radius) - 2px);
	color: var(--omoweb-rpcta-primary-contrast);
	display: inline-flex;
	flex: 0 0 auto;
	font-weight: 600;
	justify-content: center;
	line-height: 1.2;
	min-height: 40px;
	padding-block: 10px;
	padding-inline: 14px;
	text-align: center;
	text-decoration: none;
	transition: filter 160ms ease, transform 160ms ease;
}

.omoweb-content-cta__button:hover,
.omoweb-content-cta__button:focus {
	color: var(--omoweb-rpcta-primary-contrast);
	filter: brightness(0.95);
	text-decoration: none;
	transform: translateY(-1px);
}

.omoweb-related-cat-button {
	align-items: center;
	background: var(--omoweb-rpcta-primary-color, #1d4ed8);
	border: 0;
	border-radius: 6px;
	box-sizing: border-box;
	color: var(--omoweb-rpcta-primary-contrast, #ffffff);
	display: inline-flex;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	line-height: 1.2;
	margin: 0;
	max-width: 100%;
	min-height: 40px;
	overflow-wrap: anywhere;
	padding-block: 10px;
	padding-inline: 14px;
	text-align: center;
	text-decoration: none;
	transition: filter 160ms ease, transform 160ms ease;
	white-space: normal;
}

.omoweb-related-cat-button:hover,
.omoweb-related-cat-button:focus {
	color: var(--omoweb-rpcta-primary-contrast, #ffffff);
	filter: brightness(0.95);
	text-decoration: none;
	transform: translateY(-1px);
}

.omoweb-related-cat-button:focus-visible {
	outline: 2px solid var(--omoweb-rpcta-primary-color, #1d4ed8);
	outline-offset: 2px;
}

@media (max-width: 782px) {
	.omoweb-related-products__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.omoweb-related-products--columns-1 .omoweb-related-products__list {
		grid-template-columns: 1fr;
	}

	.omoweb-product-card__body {
		padding-block: 10px;
		padding-inline: 10px;
	}

	.omoweb-product-card__meta-item {
		align-items: flex-start;
		flex-direction: column;
		gap: 2px;
	}

	.omoweb-product-card__meta-value {
		text-align: start;
	}

	.omoweb-content-cta {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.omoweb-related-products__list {
		grid-template-columns: 1fr;
	}

	.omoweb-product-card__footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.omoweb-product-card__add-to-cart,
	.omoweb-product-card__add-to-cart.button {
		align-self: flex-end;
	}

	.omoweb-content-cta__button {
		width: 100%;
	}
}
