/* ==========================================================================
   WinMedic — Assortment section ("Deo našeg asortimana") + product popup
   Shared by: Sales Page, Landing - Nova ordinacija, Landing Page.
   Uses global tokens from assets/css/global.css. Mobile-first.
   ========================================================================== */

/* ---------- Section ---------- */
.wm-asrt {
	padding: 4rem 0;
	background:
		radial-gradient(ellipse 60% 50% at 85% 0%, rgba(0, 180, 216, 0.06), transparent),
		var(--wm-bg-alt, #f7f9fc);
}

@media (min-width: 48em) {
	.wm-asrt {
		padding: 5.5rem 0;
	}
}

.wm-asrt__header {
	max-width: 720px;
	margin: 0 auto 2.5rem;
	text-align: center;
}

.wm-asrt__tag {
	display: inline-block;
	padding: 0.35rem 0.95rem;
	background: rgba(12, 26, 76, 0.08);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wm-primary, #0c1a4c);
}

.wm-asrt__title {
	margin: 0.75rem 0;
	font-family: var(--wm-font-heading, 'Poppins', sans-serif);
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	line-height: 1.15;
	color: var(--wm-text, #1a2332);
}

.wm-asrt__desc {
	margin: 0 auto;
	max-width: 620px;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--wm-text-light, #4a5568);
}

/* ---------- Cards grid (flex so the 3-item last row stays centered) ---------- */
.wm-asrt__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.25rem;
}

.wm-asrt__card {
	flex: 1 1 100%;
	max-width: 420px;
	display: flex;
}

@media (min-width: 34em) {
	.wm-asrt__card {
		flex: 0 1 calc(50% - 0.625rem);
	}
}

@media (min-width: 48em) {
	.wm-asrt__card {
		flex: 0 1 calc(33.333% - 0.834rem);
	}
}

@media (min-width: 64em) {
	.wm-asrt__card {
		flex: 0 1 calc(25% - 0.9375rem);
	}
}

.wm-asrt__card-btn {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	text-align: left;
	background: var(--wm-bg, #fff);
	border: 1px solid var(--wm-border, #e2e8f0);
	border-radius: var(--wm-radius-lg, 12px);
	overflow: hidden;
	box-shadow: var(--wm-shadow);
	transition: transform var(--wm-transition, 0.3s ease), box-shadow var(--wm-transition, 0.3s ease), border-color var(--wm-transition, 0.3s ease);
}

.wm-asrt__card-btn:hover,
.wm-asrt__card-btn:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(0, 180, 216, 0.45);
	box-shadow: var(--wm-shadow-lg);
}

.wm-asrt__media {
	display: block;
	padding: 1.25rem 1.25rem 0.5rem;
	background: #fff;
}

.wm-asrt__media img {
	width: 100%;
	height: 170px;
	object-fit: contain;
	transition: transform var(--wm-transition, 0.3s ease);
}

.wm-asrt__card-btn:hover .wm-asrt__media img {
	transform: scale(1.04);
}

.wm-asrt__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.375rem;
	padding: 0.75rem 1.25rem 1.25rem;
	border-top: 1px solid var(--wm-border, #e2e8f0);
}

.wm-asrt__name {
	font-family: var(--wm-font-heading, 'Poppins', sans-serif);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wm-text, #1a2332);
}

.wm-asrt__teaser {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--wm-text-light, #4a5568);
}

.wm-asrt__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.625rem;
	margin-top: auto;
	padding-top: 0.75rem;
}

.wm-asrt__price {
	display: inline-block;
	padding: 0.25rem 0.7rem;
	background: rgba(138, 21, 56, 0.08);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #8a1538; /* bordo; AA contrast on the tinted badge background */
	white-space: nowrap;
}

.wm-asrt__more {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wm-primary, #0c1a4c);
}

.wm-asrt__more-icon {
	width: 14px;
	height: 14px;
	transition: transform var(--wm-transition, 0.3s ease);
}

.wm-asrt__card-btn:hover .wm-asrt__more-icon {
	transform: translateX(3px);
}

.wm-asrt__note {
	margin: 1.75rem auto 0;
	max-width: 640px;
	text-align: center;
	font-size: 0.8125rem;
	color: var(--wm-text-muted, #718096);
}

/* ---------- Reveal animation (self-contained) ---------- */
.wm-asrt-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-asrt-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

[data-wm-asrt-delay="1"] { transition-delay: 0.05s; }
[data-wm-asrt-delay="2"] { transition-delay: 0.15s; }
[data-wm-asrt-delay="3"] { transition-delay: 0.25s; }
[data-wm-asrt-delay="4"] { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
	.wm-asrt-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------- Modal ---------- */
.wm-asrt-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.wm-asrt-modal[hidden] {
	display: none;
}

.wm-asrt-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 26, 76, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.wm-asrt-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 860px;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	background: var(--wm-bg, #fff);
	border-radius: var(--wm-radius-lg, 12px);
	box-shadow: 0 24px 64px rgba(7, 15, 46, 0.35);
	animation: wmAsrtModalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wmAsrtModalIn {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wm-asrt-modal__dialog {
		animation: none;
	}
}

.wm-asrt-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--wm-bg-alt, #f7f9fc);
	border: 1px solid var(--wm-border, #e2e8f0);
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wm-text-light, #4a5568);
	transition: background var(--wm-transition, 0.3s ease), color var(--wm-transition, 0.3s ease);
}

.wm-asrt-modal__close:hover {
	background: var(--wm-primary, #0c1a4c);
	border-color: var(--wm-primary, #0c1a4c);
	color: #fff;
}

.wm-asrt-modal__panel {
	display: grid;
	gap: 0;
}

.wm-asrt-modal__panel[hidden] {
	display: none;
}

@media (min-width: 48em) {
	.wm-asrt-modal__panel {
		grid-template-columns: 5fr 7fr;
	}
}

.wm-asrt-modal__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.5rem 0.5rem;
	background: #fff;
}

@media (min-width: 48em) {
	.wm-asrt-modal__media {
		padding: 2.5rem 1rem 2.5rem 2rem;
		border-right: 1px solid var(--wm-border, #e2e8f0);
	}
}

.wm-asrt-modal__media img {
	width: 100%;
	max-width: 300px;
	height: auto;
	object-fit: contain;
}

.wm-asrt-modal__content {
	padding: 1.5rem;
}

@media (min-width: 48em) {
	.wm-asrt-modal__content {
		padding: 2.5rem 2.5rem 2.5rem 2rem;
	}
}

.wm-asrt-modal__title {
	margin: 0 0 0.5rem;
	padding-right: 2.5rem;
	font-family: var(--wm-font-heading, 'Poppins', sans-serif);
	font-size: clamp(1.25rem, 2.5vw, 1.55rem);
	line-height: 1.25;
	color: var(--wm-text, #1a2332);
}

.wm-asrt-modal__price {
	margin: 0 0 0.875rem;
	font-size: 0.9375rem;
	color: var(--wm-text-light, #4a5568);
}

.wm-asrt-modal__price strong {
	color: #8a1538; /* bordo; AA contrast on white */
	font-weight: 700;
}

.wm-asrt-modal__desc {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--wm-text-light, #4a5568);
}

.wm-asrt-modal__features {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
}

.wm-asrt-modal__features li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--wm-text, #1a2332);
}

.wm-asrt-modal__check {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	color: var(--wm-success, #38a169);
}

.wm-asrt-modal__actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}

/* Body scroll lock while the modal is open */
body.wm-asrt-modal-open {
	overflow: hidden;
}
