/**
 * Sirbal latest products — independent storefront component.
 */

.sirbal-latest-products {
	--sirbal-latest-ink: #111820;
	--sirbal-latest-muted: #5d6973;
	--sirbal-latest-accent: #063d5a;
	--sirbal-latest-accent-soft: #edf5f8;
	--sirbal-latest-gold: #c9ad7d;
	--sirbal-latest-surface: #fff;
	--sirbal-latest-canvas: #f6f8f8;
	--sirbal-latest-line: #e3e9ec;
	--sirbal-latest-danger: #b42318;
	--sirbal-latest-radius: 20px;
	color: var(--sirbal-latest-ink);
	font-family: inherit;
	margin-inline: auto;
	padding-block: clamp(20px, 3vw, 40px);
	width: 100%;
}

.sirbal-latest-products *,
.sirbal-latest-products *::before,
.sirbal-latest-products *::after {
	box-sizing: border-box;
}

.sirbal-latest-products__header {
	align-items: end;
	display: flex;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 24px;
}

.sirbal-latest-products__intro {
	min-width: 0;
	max-width: 620px;
}

.sirbal-latest-products__eyebrow {
	align-items: center;
	color: var(--sirbal-latest-accent);
	display: inline-flex;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	line-height: 1.6;
	margin-bottom: 5px;
}

.sirbal-latest-products__eyebrow::before {
	background: var(--sirbal-latest-gold);
	border-radius: 999px;
	content: "";
	height: 7px;
	width: 7px;
}

.sirbal-latest-products__intro h2 {
	color: var(--sirbal-latest-ink);
	font-size: clamp(25px, 2.4vw, 34px);
	font-weight: 800;
	letter-spacing: -.025em;
	line-height: 1.35;
	margin: 0;
	text-wrap: balance;
}

.sirbal-latest-products__intro p {
	color: var(--sirbal-latest-muted);
	font-size: 15px;
	line-height: 1.8;
	margin: 7px 0 0;
}

.sirbal-latest-products__actions,
.sirbal-latest-products__nav,
.sirbal-latest-products__all {
	align-items: center;
	display: flex;
}

.sirbal-latest-products__actions {
	flex: 0 0 auto;
	gap: 12px;
}

.sirbal-latest-products__nav {
	direction: rtl;
	gap: 8px;
}

.sirbal-latest-products__all {
	border: 1px solid var(--sirbal-latest-line);
	border-radius: 999px;
	color: var(--sirbal-latest-ink);
	font-size: 14px;
	font-weight: 700;
	gap: 6px;
	justify-content: center;
	min-height: 44px;
	padding: 0 17px;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
	white-space: nowrap;
}

.sirbal-latest-products__all:hover {
	background: var(--sirbal-latest-accent-soft);
	border-color: #b9ced7;
	color: var(--sirbal-latest-accent);
}

.sirbal-latest-products__nav-button {
	align-items: center;
	appearance: none;
	background: var(--sirbal-latest-surface);
	border: 1px solid var(--sirbal-latest-line);
	border-radius: 50%;
	color: var(--sirbal-latest-ink);
	cursor: pointer;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	margin: 0;
	padding: 0;
	touch-action: manipulation;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
	width: 44px;
}

.sirbal-latest-products__nav-button:hover:not(:disabled) {
	background: var(--sirbal-latest-accent);
	border-color: var(--sirbal-latest-accent);
	color: #fff;
}

.sirbal-latest-products__nav-button:disabled {
	cursor: default;
	opacity: .35;
}

.sirbal-latest-products a:focus-visible,
.sirbal-latest-products button:focus-visible,
.sirbal-latest-products__track:focus-visible {
	outline: 3px solid var(--sirbal-latest-gold);
	outline-offset: 3px;
}

.sirbal-latest-products__viewport {
	margin-inline: -4px;
	overflow: hidden;
	padding-inline: 4px;
}

.sirbal-latest-products__track {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0 16px;
	scroll-behavior: smooth;
	scroll-snap-type: inline mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.sirbal-latest-products__track::-webkit-scrollbar {
	display: none;
}

.sirbal-latest-products__slide {
	flex: 0 0 calc((100% - 60px) / 4);
	margin: 0;
	min-width: 0;
	scroll-snap-align: start;
	scroll-snap-stop: normal;
}

.sirbal-product-card {
	background: var(--sirbal-latest-surface);
	border: 1px solid var(--sirbal-latest-line);
	border-radius: var(--sirbal-latest-radius);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
	transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

@media (hover: hover) and (pointer: fine) {
	.sirbal-product-card:hover {
		border-color: #ccd7dc;
		box-shadow: 0 16px 40px rgba(17, 24, 32, .1);
		transform: translateY(-3px);
	}
}

.sirbal-product-card__media {
	aspect-ratio: 1 / 1;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, .55), transparent 42%),
		var(--sirbal-latest-canvas);
	overflow: hidden;
	position: relative;
}

.sirbal-product-card__image-link {
	display: block;
	height: 100%;
	width: 100%;
}

.sirbal-product-card__image {
	height: 100% !important;
	inset: 0;
	object-fit: cover;
	position: absolute;
	transition: opacity .32s ease, transform .45s cubic-bezier(.2, .65, .3, 1);
	width: 100% !important;
}

.sirbal-product-card__image--primary {
	opacity: 1;
}

.sirbal-product-card__image--secondary {
	opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
	.sirbal-product-card:hover .sirbal-product-card__image--primary {
		opacity: 0;
		transform: scale(1.025);
	}

	.sirbal-product-card:hover .sirbal-product-card__image--secondary {
		opacity: 1;
		transform: scale(1.025);
	}
}

.sirbal-product-card__badge {
	background: #fff3f1;
	border: 1px solid #f7d4cf;
	border-radius: 999px;
	color: var(--sirbal-latest-danger);
	font-size: 12px;
	font-weight: 750;
	line-height: 1;
	padding: 8px 10px;
	position: absolute;
	right: 12px;
	top: 12px;
	z-index: 3;
}

.sirbal-product-card__quick-view {
	bottom: 12px;
	left: 50%;
	opacity: 0;
	position: absolute;
	transform: translate(-50%, 8px);
	transition: opacity .18s ease, transform .22s ease;
	z-index: 4;
}

.sirbal-product-card:hover .sirbal-product-card__quick-view,
.sirbal-product-card:focus-within .sirbal-product-card__quick-view {
	opacity: 1;
	transform: translate(-50%, 0);
}

.sirbal-product-card__quick-view .quick-view {
	height: auto;
	width: auto;
}

.sirbal-product-card__quick-view .quick-view > a {
	align-items: center;
	background: rgba(17, 24, 32, .9);
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(17, 24, 32, .2);
	color: #fff !important;
	display: flex;
	flex-direction: row;
	font-size: 13px !important;
	gap: 7px;
	justify-content: center;
	height: 44px;
	min-height: 44px;
	min-width: 44px;
	padding: 0 15px;
	width: auto;
	text-decoration: none;
	white-space: nowrap;
}

.sirbal-product-card__quick-view .quick-view > a::before {
	color: inherit;
	font-size: 18px;
	margin: 0;
	position: static;
}


.sirbal-product-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
}

.sirbal-product-card__category {
	color: var(--sirbal-latest-muted);
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sirbal-product-card__title {
	color: var(--sirbal-latest-ink);
	display: -webkit-box;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.7;
	margin: 0;
	min-height: 3.4em;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sirbal-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.sirbal-product-card__title a:hover {
	color: var(--sirbal-latest-accent);
}

.sirbal-product-card__rating {
	margin-top: 7px;
	min-height: 18px;
}

.sirbal-product-card__rating .star-rating {
	color: var(--sirbal-latest-gold);
	font-size: 13px;
	margin: 0;
}

.sirbal-product-card__footer {
	border-top: 1px solid var(--sirbal-latest-line);
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 14px;
	padding-top: 14px;
}

.sirbal-product-card__price {
	color: var(--sirbal-latest-ink);
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1.6;
	min-height: 26px;
}

.sirbal-product-card__price del {
	color: #7c8790;
	font-size: 12px;
	font-weight: 500;
	margin-inline-end: 5px;
	opacity: 1;
}

.sirbal-product-card__price ins {
	background: none;
	color: var(--sirbal-latest-ink);
	padding: 0;
	text-decoration: none;
}

.sirbal-latest-products .sirbal-product-card__cta.button {
	align-items: center;
	background: var(--sirbal-latest-accent);
	border: 1px solid var(--sirbal-latest-accent);
	border-radius: 12px;
	box-shadow: none;
	color: #fff;
	display: flex;
	font-size: 13.5px;
	font-weight: 700;
	gap: 8px;
	justify-content: center;
	line-height: 1.45;
	margin: 0;
	min-height: 46px;
	padding: 9px 12px;
	text-align: center;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
	width: 100%;
}

.sirbal-latest-products .sirbal-product-card__cta.button:hover {
	background: #0b1117;
	border-color: #0b1117;
	color: #fff;
}

.sirbal-latest-products .sirbal-product-card__cta.added {
	display: none;
}

.sirbal-product-card__cta + .added_to_cart {
	align-items: center;
	border: 1px solid var(--sirbal-latest-accent);
	border-radius: 12px;
	color: var(--sirbal-latest-accent);
	display: flex;
	font-size: 13.5px;
	font-weight: 700;
	justify-content: center;
	min-height: 46px;
	padding: 9px 12px;
	text-decoration: none;
}

@media (max-width: 1024px) {
	.sirbal-latest-products__slide {
		flex-basis: calc((100% - 36px) / 3);
	}

	.sirbal-latest-products__track {
		gap: 18px;
	}
}

@media (max-width: 767px) {
	.sirbal-latest-products {
		padding-block: 20px 28px;
	}

	.sirbal-latest-products__header {
		align-items: stretch;
		flex-direction: column;
		gap: 16px;
		margin-bottom: 16px;
	}

	.sirbal-latest-products__intro h2 {
		font-size: 26px;
	}

	.sirbal-latest-products__intro p {
		font-size: 14px;
		margin-top: 5px;
	}

	.sirbal-latest-products__actions {
		justify-content: space-between;
		width: 100%;
	}

	.sirbal-latest-products__all {
		padding-inline: 15px;
	}

	.sirbal-latest-products__track {
		gap: 12px;
		padding-bottom: 12px;
	}

	.sirbal-latest-products__slide {
		flex-basis: calc((100% - 12px) / 2);
	}

	.sirbal-product-card {
		border-radius: 16px;
	}

	.sirbal-product-card__content {
		padding: 12px;
	}

	.sirbal-product-card__title {
		font-size: 15px;
		line-height: 1.65;
		min-height: 3.3em;
	}

	.sirbal-product-card__category {
		font-size: 12.5px;
	}

	.sirbal-product-card__footer {
		gap: 10px;
		margin-top: 11px;
		padding-top: 11px;
	}

	.sirbal-product-card__price {
		font-size: 15px;
	}

	.sirbal-latest-products .sirbal-product-card__cta.button,
	.sirbal-product-card__cta + .added_to_cart {
		border-radius: 10px;
		font-size: 13px;
		min-height: 46px;
		padding-inline: 8px;
	}

	.sirbal-product-card__quick-view {
		bottom: 10px;
		left: 10px;
		opacity: 1;
		transform: none;
	}

	.sirbal-product-card__quick-view .quick-view > a {
		font-size: 0 !important;
		height: 44px;
		padding: 0;
		width: 44px;
	}
}

@media (max-width: 374px) {
	.sirbal-latest-products__slide {
		flex-basis: 82%;
	}

	.sirbal-latest-products__intro p {
		max-width: 32ch;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sirbal-latest-products__track {
		scroll-behavior: auto;
	}

	.sirbal-product-card,
	.sirbal-product-card__image,
	.sirbal-product-card__quick-view,
	.sirbal-latest-products a,
	.sirbal-latest-products button {
		transition-duration: .01ms !important;
	}
}
