/* ==========================================================================
   Atelier product grid
   ========================================================================== */

.atl-grid {
	--atl-ink: #151413;
	--atl-muted: #77736c;
	--atl-line: #dcd8d0;
	--atl-paper: #ffffff;
	--atl-wash: #f1efea;
	--atl-sale: #8a2b1d;
	--atl-ease: cubic-bezier(.22, .61, .36, 1);

	display: grid;
	grid-template-columns: repeat(var(--atl-cols-m, 2), minmax(0, 1fr));
	column-gap: 8px;
	row-gap: 40px;
	font-family: "Manrope", system-ui, sans-serif;
	color: var(--atl-ink);
	-webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
	.atl-grid {
		grid-template-columns: repeat(var(--atl-cols-t, 3), minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 56px;
	}
}

@media (min-width: 1025px) {
	.atl-grid {
		grid-template-columns: repeat(var(--atl-cols, 4), minmax(0, 1fr));
		column-gap: 20px;
		row-gap: 72px;
	}
}

/* Mygtukų reset'as prieš Elementor Kit globalius stilius */
.atl-grid .atl-btn,
.atl-grid .atl-btn:hover,
.atl-grid .atl-btn:focus {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	text-decoration: none;
	line-height: 1;
	margin: 0;
	padding: 0;
	min-height: 0;
	cursor: pointer;
}

.atl-grid .atl-btn:focus-visible,
.atl-grid a:focus-visible {
	outline: 1px solid var(--atl-ink);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Nuotrauka
   -------------------------------------------------------------------------- */
.atl-card {
	position: relative;
	min-width: 0;
}

.atl-media {
	position: relative;
	aspect-ratio: var(--atl-ratio, 3/4);
	overflow: hidden;
	background: var(--atl-wash);
}

.atl-media__link {
	position: absolute;
	inset: 0;
	display: block;
}

.atl-grid .atl-media__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}

.atl-media__img--alt {
	opacity: 0;
	transition: opacity .55s var(--atl-ease);
}

@media (hover: hover) {
	.atl-card.has-alt:hover .atl-media__img--alt {
		opacity: 1;
	}
}

.atl-card.is-variant .atl-media__img--alt {
	display: none;
}

/* Žyma */
.atl-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 6px 8px 5px;
	background: var(--atl-paper);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	pointer-events: none;
}

.atl-badge--sale { color: var(--atl-sale); }
.atl-badge--out { color: var(--atl-muted); }

/* --------------------------------------------------------------------------
   Quick shop
   -------------------------------------------------------------------------- */
.atl-qs {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 3;
	background: var(--atl-paper);
	color: var(--atl-ink);
	transform: translateY(calc(100% + 12px));
	transition: transform .45s var(--atl-ease);
}

@media (hover: hover) {
	.atl-card:hover .atl-qs,
	.atl-card:focus-within .atl-qs,
	.atl-card.is-open .atl-qs,
	.atl-card.is-added .atl-qs {
		transform: none;
	}
}

.atl-grid .atl-qs__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 42px;
	padding: 0 14px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.atl-qs__icon {
	position: relative;
	width: 11px;
	height: 11px;
	transition: transform .35s var(--atl-ease);
}

.atl-qs__icon::before,
.atl-qs__icon::after {
	content: "";
	position: absolute;
	background: currentColor;
}

.atl-qs__icon::before { left: 0; right: 0; top: 5px; height: 1px; }
.atl-qs__icon::after { top: 0; bottom: 0; left: 5px; width: 1px; }

.atl-card.is-open .atl-qs__icon { transform: rotate(45deg); }
.atl-card.is-busy .atl-qs__toggle { cursor: progress; }

.atl-qs__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .4s var(--atl-ease);
}

.atl-card.is-open .atl-qs__body { grid-template-rows: 1fr; }

.atl-qs__inner {
	min-height: 0;
	overflow: hidden;
}

.atl-qs__pad {
	padding: 12px 14px 14px;
	border-top: 1px solid var(--atl-line);
}

.atl-grid .atl-qs__hint {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
	font-size: 11px;
	line-height: 1.3;
	color: var(--atl-muted);
}

.atl-qs__color {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.atl-qs__sizes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 4px;
}

.atl-grid .atl-size {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	border: 1px solid var(--atl-line);
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	transition: background-color .2s, color .2s, border-color .2s;
}

.atl-grid .atl-size:hover {
	background: var(--atl-ink);
	border-color: var(--atl-ink);
	color: var(--atl-paper);
}

.atl-grid .atl-size.is-out,
.atl-grid .atl-size.is-out:hover {
	background: linear-gradient(to top right, transparent calc(50% - .5px), var(--atl-line) 50%, transparent calc(50% + .5px));
	border-color: var(--atl-line);
	color: var(--atl-muted);
	cursor: default;
}

.atl-grid .atl-size.is-loading {
	color: transparent;
	background: var(--atl-ink);
	border-color: var(--atl-ink);
}

.atl-size.is-loading::after {
	content: "";
	position: absolute;
	left: 8px;
	right: 8px;
	top: 50%;
	height: 1px;
	background: var(--atl-paper);
	transform-origin: left;
	animation: atl-load .9s var(--atl-ease) infinite;
}

.atl-card.is-busy .atl-size { pointer-events: none; }

@keyframes atl-load {
	0% { transform: scaleX(0); }
	60% { transform: scaleX(1); transform-origin: left; }
	61% { transform-origin: right; }
	100% { transform: scaleX(0); transform-origin: right; }
}

/* Patvirtinimas */
.atl-qs__done {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 14px;
	background: var(--atl-ink);
	color: var(--atl-paper);
	font-size: 12px;
	font-weight: 500;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s, visibility .25s;
}

.atl-card.is-added .atl-qs__done,
.atl-card.is-error .atl-qs__done {
	opacity: 1;
	visibility: visible;
}

.atl-card.is-error .atl-qs__done { background: var(--atl-sale); }

.atl-grid .atl-qs__done a {
	color: inherit;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
	white-space: nowrap;
}

/* Lietimo įrenginiai: mažas „+“ kampe, išsiskleidžia per visą plotį */
@media (hover: none) {
	.atl-qs {
		transform: none;
		left: auto;
		right: 8px;
		bottom: 8px;
	}

	.atl-grid .atl-qs__toggle {
		width: 38px;
		height: 38px;
		padding: 0;
		justify-content: center;
	}

	.atl-qs__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.atl-card.is-open .atl-qs,
	.atl-card.is-added .atl-qs,
	.atl-card.is-error .atl-qs { left: 8px; }

	.atl-card.is-open .atl-qs__toggle {
		width: 100%;
		padding: 0 12px;
		justify-content: space-between;
	}

	.atl-card.is-open .atl-qs__label {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
	}
}

/* --------------------------------------------------------------------------
   Informacija
   -------------------------------------------------------------------------- */
.atl-info {
	display: grid;
	gap: 4px;
	padding-top: 14px;
}

.atl-grid .atl-info__collection {
	margin: 0 0 2px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--atl-muted);
}

.atl-grid .atl-info__title {
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -.005em;
	text-transform: none;
}

.atl-grid .atl-info__title a {
	color: var(--atl-ink);
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .4s var(--atl-ease);
}

.atl-grid .atl-card:hover .atl-info__title a,
.atl-grid .atl-info__title a:focus-visible {
	background-size: 100% 1px;
}

.atl-grid .atl-info__price {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

.atl-grid .atl-info__price del {
	color: var(--atl-muted);
	font-weight: 400;
	margin-right: 6px;
}

.atl-grid .atl-info__price ins {
	text-decoration: none;
	color: var(--atl-sale);
}

/* Spalvos */
.atl-colors {
	position: relative;
	height: 22px;
	margin-top: 6px;
}

.atl-colors__count,
.atl-swatches {
	position: absolute;
	left: 0;
	top: 0;
	height: 22px;
	display: flex;
	align-items: center;
	transition: opacity .3s var(--atl-ease), transform .3s var(--atl-ease), visibility .3s;
}

.atl-colors__count {
	font-size: 12px;
	color: var(--atl-muted);
}

.atl-swatches {
	gap: 9px;
	right: 0;
	padding-left: 4px;
}

.atl-grid .atl-swatch {
	position: relative;
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--sw, var(--atl-wash));
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.atl-grid .atl-swatch.is-nohex {
	background: repeating-linear-gradient(135deg, var(--atl-wash) 0 2px, var(--atl-line) 2px 3px);
}

.atl-swatch::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 1px solid var(--atl-ink);
	border-radius: 50%;
	opacity: 0;
	transform: scale(.8);
	transition: opacity .2s, transform .25s var(--atl-ease);
}

.atl-swatch:hover::after { opacity: .35; transform: none; }
.atl-swatch[aria-pressed="true"]::after { opacity: 1; transform: none; }

.atl-grid .atl-swatches__more {
	font-size: 11px;
	color: var(--atl-muted);
	text-decoration: none;
}

.atl-swatches__name {
	min-width: 0;
	margin-left: 4px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	color: var(--atl-muted);
}

@media (hover: hover) {
	.atl-swatches {
		opacity: 0;
		visibility: hidden;
		transform: translateY(4px);
	}

	.atl-card:hover .atl-swatches,
	.atl-card:focus-within .atl-swatches {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.atl-card:hover .atl-colors__count,
	.atl-card:focus-within .atl-colors__count {
		opacity: 0;
		visibility: hidden;
		transform: translateY(-4px);
	}
}

@media (hover: none) {
	.atl-colors__count { display: none; }
	.atl-swatches__name { display: none; }
}

@media (max-width: 767px) {
	.atl-info { padding-top: 10px; }
	.atl-grid .atl-info__title { font-size: 13px; }
	.atl-grid .atl-info__price { font-size: 12.5px; }
	.atl-badge { top: 8px; left: 8px; }
}

/* --------------------------------------------------------------------------
   Puslapiavimas
   -------------------------------------------------------------------------- */
.atl-pagination {
	margin-top: 72px;
	font-family: "Manrope", system-ui, sans-serif;
}

.atl-pagination ul {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.atl-pagination a,
.atl-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: #151413;
	text-decoration: none;
}

.atl-pagination .current {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

.atl-empty {
	font-family: "Manrope", system-ui, sans-serif;
	color: #77736c;
}

@media (prefers-reduced-motion: reduce) {
	.atl-grid *,
	.atl-grid *::before,
	.atl-grid *::after {
		transition: none !important;
		animation: none !important;
	}
}
