/* Best categories. Visual tokens are CSS variables so Elementor can restyle every part. */

.elementor-widget-medadak-best-category,
.elementor-widget-medadak-best-category > .elementor-widget-container {
	overflow: visible;
}

.medadak-best-category {
	--heading-gap: 8px;
	--stack-gap: 28px;
	--eyebrow-color: #707486;
	--heading-color: #1c1c25;
	--accent-color: #732bed;
	--accent-rotate: -24deg;
	--accent-top: 0px;
	--accent-x: 29%;
	--accent-pad: 0px;
	--accent-duration: 2.8s;
	--curve-color: #000000;
	--curve-w: 60px;
	--curve-stroke: 15;
	--curve-x: 29%;
	--curve-y: 24px;
	--cards-gap: 12px;
	--cards-offset: 50px;
	--pack-pad: 0px;
	--card-width: 244px;
	--card-hover-width: 521px;
	--card-height: 243px;
	--card-min-height: 243px;
	--card-gap: 12px;
	--card-radius: 30px;
	--card-bg: #f3f8fb;
	--card-bg-hover: #f3f8fb;
	--expand-duration: 0.35s;
	--hover-gap: 100px;
	--info-width: 130px;
	--info-gap: 4px;
	--image-size: 130px;
	--image-fit: contain;
	--image-mobile-width: 96px;
	--image-mobile-height: 84px;
	--title-color: #1c1c25;
	--count-color: #707486;
	--count-gap: 15px;
	--btn-size: 29px;
	--btn-radius: 10px;
	--btn-bg: #0060fe;
	--btn-bg-hover: #0060fe;
	--btn-color: #ffffff;
	--btn-color-hover: #ffffff;
	--btn-icon: 14px;
	--btn-scale: 1.05;
	--product-cols: 3;
	--product-panel: calc(var(--product-cols) * var(--thumb-size) + (var(--product-cols) - 1) * var(--thumb-gap));
	--thumb-size: 69px;
	--thumb-gap: 6px;
	--thumb-bg: #ffffff;
	--thumb-radius: 10px;
	--thumb-fit: contain;
	--empty-color: #707486;
	--cols-mobile: 2;
	--grid-min: 160px;
	position: relative;
	width: 100%;
	max-width: 100%;
}

.medadak-best-category,
.medadak-best-category *,
.medadak-best-category *::before,
.medadak-best-category *::after {
	box-sizing: border-box;
}

.medadak_best-category-packs {
	display: flex;
	justify-content: center;
	position: relative;
	width: 100%;
	padding-top: var(--accent-pad);
}

.medadak_best-category-packs-heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--heading-gap);
	max-width: 100%;
}

.medadak_best-category-label {
	margin: 0;
	color: var(--eyebrow-color);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
}

.medadak_best-category-title {
	margin: 0;
	color: var(--heading-color);
	font-size: 32px;
	font-weight: 600;
	line-height: 1.3;
}

.medadak_heading-best-category-packs {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
}

.medadak_accent-best-category {
	position: absolute;
	top: var(--accent-top);
	left: var(--accent-x);
	margin: 0;
	color: var(--accent-color);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	transform: rotate(var(--accent-rotate));
	transform-origin: center center;
	animation: medadak-heading-best-category-zigzag var(--accent-duration) ease-in-out infinite;
}

.medadak-best-category.is-accent-static .medadak_accent-best-category {
	animation: none;
}

@keyframes medadak-heading-best-category-zigzag {
	0%,
	82% {
		transform: rotate(var(--accent-rotate)) translate(0, 0);
	}
	86% {
		transform: rotate(var(--accent-rotate)) translate(6px, -4px);
	}
	90% {
		transform: rotate(var(--accent-rotate)) translate(-6px, 4px);
	}
	94% {
		transform: rotate(var(--accent-rotate)) translate(4px, -3px);
	}
	97%,
	100% {
		transform: rotate(var(--accent-rotate)) translate(0, 0);
	}
}

.medadak_curved-line-best-category {
	display: block;
	position: absolute;
	top: var(--curve-y);
	left: var(--curve-x);
	width: var(--curve-w);
	max-width: none;
	height: auto;
	overflow: visible;
}

.medadak_curved-line-best-category path {
	stroke: var(--curve-color);
	stroke-width: var(--curve-stroke);
	fill: none;
	stroke-linecap: round;
	stroke-dasharray: 540;
	stroke-dashoffset: 0;
	animation: medadak-curved-line-best-category-draw var(--accent-duration) ease-in-out infinite;
}

.medadak-best-category.is-line-static .medadak_curved-line-best-category path {
	animation: none;
}

@keyframes medadak-curved-line-best-category-draw {
	0%,
	18% {
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dashoffset: 540;
	}
	82%,
	100% {
		stroke-dashoffset: 0;
	}
}

.medadak_best-category-pack {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: var(--cards-gap);
	width: 100%;
	margin: var(--cards-offset) 0 0;
	padding-inline: var(--pack-pad);
	list-style: none;
}

.medadak-best-category.is-wrap .medadak_best-category-pack {
	flex-wrap: wrap;
}

.medadak-best-category.is-scroll .medadak_best-category-pack {
	overflow-x: auto;
	padding-bottom: 8px;
	scrollbar-width: thin;
}

.medadak_item-best-category {
	background: var(--card-bg);
	padding: 21px 29px;
	border-radius: var(--card-radius);
	display: flex;
	flex-direction: column;
	width: var(--card-width);
	height: var(--card-height);
	gap: var(--card-gap);
	overflow: hidden;
	flex-shrink: 0;
	min-width: 0;
	transition: width var(--expand-duration) ease, background-color var(--expand-duration) ease;
}

.medadak_item-best-category:hover,
.medadak_item-best-category:focus-within {
	width: max(var(--card-hover-width), calc(var(--card-width) + var(--product-panel) + var(--hover-gap) - var(--info-width)));
	background: var(--card-bg-hover);
}

.medadak_count-items-category {
	display: flex;
	gap: var(--count-gap);
	flex-direction: row-reverse;
	align-items: center;
}

.medadak_count-items-category p {
	margin: 0;
	color: var(--count-color);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
}

.medadak_best-category-button {
	cursor: pointer;
	border: none;
	background: var(--btn-bg);
	color: var(--btn-color);
	width: var(--btn-size);
	height: var(--btn-size);
	border-radius: var(--btn-radius);
	overflow: hidden;
	position: relative;
	display: grid;
	place-content: center;
	padding: 0;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 300ms, transform 200ms, color 300ms;
}

.medadak_best-category-button__circle {
	position: relative;
	width: calc(var(--btn-size) + 11px);
	height: calc(var(--btn-size) + 11px);
	overflow: hidden;
	color: inherit;
	border-radius: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}

.medadak_best-category-button__icon {
	width: var(--btn-icon);
	height: var(--btn-icon);
	font-size: var(--btn-icon);
	line-height: 1;
	display: block;
	flex-shrink: 0;
	color: inherit;
	fill: currentColor;
}

.medadak_best-category-button__icon--copy {
	position: absolute;
	transform: translate(150%, 150%);
}

.medadak_best-category-button:hover,
.medadak_best-category-button:focus-visible {
	background: var(--btn-bg-hover);
	color: var(--btn-color-hover);
	transform: scale(var(--btn-scale));
}

.medadak_best-category-button:focus-visible {
	outline: 2px solid var(--btn-bg);
	outline-offset: 3px;
}

.medadak_best-category-button:hover .medadak_best-category-button__icon:first-child,
.medadak_best-category-button:focus-visible .medadak_best-category-button__icon:first-child {
	transition: transform 0.3s ease-in-out;
	transform: translate(-150%, -150%);
}

.medadak_best-category-button:hover .medadak_best-category-button__icon--copy,
.medadak_best-category-button:focus-visible .medadak_best-category-button__icon--copy {
	transition: transform 0.3s ease-in-out 0.1s;
	transform: translate(0);
}

.medadak_item-best-category-image {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	flex: 1;
	min-height: 0;
	min-width: 0;
	gap: 0;
	transition: gap var(--expand-duration) ease;
}

.medadak_item-best-category:hover .medadak_item-best-category-image,
.medadak_item-best-category:focus-within .medadak_item-best-category-image {
	justify-content: flex-start;
	gap: var(--hover-gap);
}

.medadak_info-best-category {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	width: var(--info-width);
	min-width: var(--info-width);
	flex: 0 0 var(--info-width);
	gap: var(--info-gap);
	text-decoration: none;
	color: inherit;
	min-height: 0;
}

.medadak_info-best-category img {
	width: var(--image-size);
	height: var(--image-size);
	object-fit: var(--image-fit);
	display: block;
}

.medadak_category-title {
	margin: 0;
	color: var(--title-color);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	max-width: 100%;
}

.medadak-best-category.is-title-nowrap .medadak_category-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.medadak_item-best-category-content {
	display: grid;
	grid-template-columns: repeat(var(--product-cols), var(--thumb-size));
	gap: var(--thumb-gap);
	width: 0;
	min-width: 0;
	opacity: 0;
	overflow: hidden;
	flex-shrink: 0;
	align-content: end;
	transition: width var(--expand-duration) ease, opacity var(--expand-duration) ease;
}

.medadak_item-best-category:hover .medadak_item-best-category-content,
.medadak_item-best-category:focus-within .medadak_item-best-category-content {
	width: var(--product-panel);
	opacity: 1;
}

.medadak_item-best-category-content a {
	display: block;
	line-height: 0;
	text-decoration: none;
	border-radius: var(--thumb-radius);
}

.medadak_item-best-category-content a:focus-visible {
	outline: 2px solid var(--btn-bg);
	outline-offset: 2px;
}

.medadak_item-best-category-content img {
	width: var(--thumb-size);
	height: var(--thumb-size);
	object-fit: var(--thumb-fit);
	background: var(--thumb-bg);
	padding: 10px 15px;
	border-radius: var(--thumb-radius);
	display: block;
}

.medadak_info-best-category:focus-visible {
	outline: 2px solid var(--btn-bg);
	outline-offset: 3px;
	border-radius: 12px;
}

.medadak-best-category-empty {
	margin: var(--cards-offset) 0 0;
	color: var(--empty-color);
	font-size: 15px;
}

.medadak-best-category.is-expand-off .medadak_item-best-category:hover,
.medadak-best-category.is-expand-off .medadak_item-best-category:focus-within,
.medadak_item-best-category.is-no-products:hover,
.medadak_item-best-category.is-no-products:focus-within {
	width: var(--card-width);
	background: var(--card-bg);
}

.medadak-best-category.is-expand-off .medadak_item-best-category:hover .medadak_item-best-category-image,
.medadak-best-category.is-expand-off .medadak_item-best-category:focus-within .medadak_item-best-category-image,
.medadak_item-best-category.is-no-products:hover .medadak_item-best-category-image,
.medadak_item-best-category.is-no-products:focus-within .medadak_item-best-category-image {
	justify-content: center;
	gap: 0;
}

.medadak-best-category.is-expand-off .medadak_item-best-category:hover .medadak_item-best-category-content,
.medadak-best-category.is-expand-off .medadak_item-best-category:focus-within .medadak_item-best-category-content,
.medadak_item-best-category.is-no-products:hover .medadak_item-best-category-content,
.medadak_item-best-category.is-no-products:focus-within .medadak_item-best-category-content {
	width: 0;
	opacity: 0;
}

@media screen and (min-width: 1025px) {
	.medadak_item-best-category.is-open {
		width: max(var(--card-hover-width), calc(var(--card-width) + var(--product-panel) + var(--hover-gap) - var(--info-width)));
		background: var(--card-bg-hover);
	}

	.medadak_item-best-category.is-open .medadak_item-best-category-image {
		justify-content: flex-start;
		gap: var(--hover-gap);
	}

	.medadak_item-best-category.is-open .medadak_item-best-category-content {
		width: var(--product-panel);
		opacity: 1;
	}

	.medadak_best-category-pack:has(> .medadak_item-best-category:hover) > .medadak_item-best-category.is-open:not(:hover),
	.medadak_best-category-pack:has(> .medadak_item-best-category:focus-within) > .medadak_item-best-category.is-open:not(:focus-within) {
		width: var(--card-width);
		background: var(--card-bg);
	}

	.medadak_best-category-pack:has(> .medadak_item-best-category:hover) > .medadak_item-best-category.is-open:not(:hover) .medadak_item-best-category-image,
	.medadak_best-category-pack:has(> .medadak_item-best-category:focus-within) > .medadak_item-best-category.is-open:not(:focus-within) .medadak_item-best-category-image {
		justify-content: center;
		gap: 0;
	}

	.medadak_best-category-pack:has(> .medadak_item-best-category:hover) > .medadak_item-best-category.is-open:not(:hover) .medadak_item-best-category-content,
	.medadak_best-category-pack:has(> .medadak_item-best-category:focus-within) > .medadak_item-best-category.is-open:not(:focus-within) .medadak_item-best-category-content {
		width: 0;
		opacity: 0;
	}
}

@media screen and (max-width: 1024px) {
	.medadak_best-category-packs {
		flex-direction: column-reverse;
		align-items: center;
		gap: var(--stack-gap);
	}

	.medadak_heading-best-category-packs {
		position: relative;
		inset: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		gap: 9px;
	}

	.medadak_accent-best-category,
	.medadak_curved-line-best-category {
		position: relative;
		top: auto;
		left: auto;
	}

	.medadak_curved-line-best-category {
		width: 100%;
		max-width: var(--curve-w);
	}

	.medadak_best-category-pack {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min)), 1fr));
	}

	.medadak_item-best-category,
	.medadak_item-best-category:hover,
	.medadak_item-best-category:focus-within,
	.medadak-best-category.is-expand-off .medadak_item-best-category:hover,
	.medadak-best-category.is-expand-off .medadak_item-best-category:focus-within,
	.medadak_item-best-category.is-no-products:hover,
	.medadak_item-best-category.is-no-products:focus-within {
		width: 100%;
		height: auto;
		min-height: var(--card-min-height);
	}

	.medadak_item-best-category:hover .medadak_item-best-category-image,
	.medadak_item-best-category:focus-within .medadak_item-best-category-image {
		justify-content: center;
		gap: 0;
	}

	.medadak_item-best-category:hover .medadak_item-best-category-content,
	.medadak_item-best-category:focus-within .medadak_item-best-category-content {
		width: 0;
		opacity: 0;
	}
}

@media screen and (max-width: 480px) {
	.medadak_best-category-pack {
		grid-template-columns: repeat(var(--cols-mobile), minmax(0, 1fr));
	}

	.medadak_item-best-category,
	.medadak_item-best-category:hover,
	.medadak_item-best-category:focus-within {
		min-height: 0;
		height: var(--card-height);
	}

	.medadak_info-best-category {
		width: 100%;
		min-width: 0;
		flex: 1 1 auto;
	}

	.medadak_info-best-category img {
		width: 100%;
		max-width: var(--image-mobile-width);
		height: var(--image-mobile-height);
	}

	.medadak_category-title {
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
		overflow-wrap: anywhere;
	}
}

@media (prefers-reduced-motion: reduce) {
	.medadak_accent-best-category,
	.medadak_curved-line-best-category path,
	.medadak_item-best-category,
	.medadak_item-best-category-image,
	.medadak_item-best-category-content,
	.medadak_best-category-button,
	.medadak_best-category-button__icon {
		animation: none !important;
		transition: none !important;
	}
}
