/* Al Mahjar Core — combo packs on the shop: the pack panel (with size / colour choices) on the product page, the "also
   comes in a pack" card on a single product, and the pack's products nested under the pack in cart, checkout and mini cart.
   Colours and sizes come from the central palette tokens (--almahjar-*), with plain fallbacks for any theme. */
.almahjar-combo,
.almahjar-inpack {
	--ck-ink: var(--almahjar-ink, #1a1a1a);
	--ck-line: var(--almahjar-line, #e6e1da);
	--ck-card: var(--almahjar-card, #fff);
	--ck-mute: var(--almahjar-taupe-deep, #6b645c);
	--ck-acc: var(--almahjar-copper, #b5651d);
	--ck-ok: var(--almahjar-sage-deep, #3f6b4f);
	--ck-bad: var(--almahjar-brick, #b4442c);
	--ck-r: var(--almahjar-radius, 12px);
	--ck-fs: var(--almahjar-fs, 1);
	--ck-sp: var(--almahjar-sp, 1);
}
.almahjar-ic {
	flex: none;
	vertical-align: middle;
}

/* ---------- the pack panel ---------- */
.almahjar-combo {
	flex: 1 1 100%;
	margin: 0 0 calc(14px * var(--ck-sp));
	padding: calc(16px * var(--ck-sp));
	border: 1px solid var(--ck-line);
	border-radius: var(--ck-r);
	background: var(--ck-card);
	color: var(--ck-ink);
	font-size: calc(14px * var(--ck-fs));
}
.almahjar-combo p {
	margin: 0;
}
.almahjar-combo-h {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: calc(15px * var(--ck-fs));
}
.almahjar-combo-h small {
	margin-left: auto;
	font-weight: 500;
	color: var(--ck-mute);
	font-size: calc(12.5px * var(--ck-fs));
}
.almahjar-combo-tip {
	margin-top: 4px !important;
	color: var(--ck-mute);
	font-size: calc(13px * var(--ck-fs));
}
.almahjar-combo-list {
	list-style: none;
	margin: calc(12px * var(--ck-sp)) 0 0;
	padding: 0;
	counter-reset: ck;
}
.almahjar-combo-it {
	position: relative;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 22px;
	gap: 12px;
	align-items: start;
	padding: calc(10px * var(--ck-sp)) 0;
	border-top: 1px dashed var(--ck-line);
	margin: 0 !important;
}
.almahjar-combo-it:first-child {
	border-top: 0;
	padding-top: 0;
}
.almahjar-combo-img {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: calc(var(--ck-r) * 0.6);
	overflow: hidden;
	background: color-mix(in srgb, var(--ck-ink) 5%, var(--ck-card));
}
.almahjar-combo-img img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	margin: 0 !important;
	transition: opacity 0.2s;
}
.almahjar-combo-b {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.almahjar-combo-n {
	font-weight: 600;
	line-height: 1.3;
}
.almahjar-combo-n a {
	color: inherit !important;
	text-decoration: none !important;
}
.almahjar-combo-n a:hover {
	text-decoration: underline !important;
}
.almahjar-combo-q {
	font-weight: 700;
	color: var(--ck-acc);
}
.almahjar-combo-of {
	margin-left: 4px;
	padding: 1px 7px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ck-ink) 7%, transparent);
	color: var(--ck-mute);
	font-weight: 600;
	font-size: calc(11.5px * var(--ck-fs));
}
.almahjar-combo-b > small,
.almahjar-combo-st {
	color: var(--ck-mute);
	font-size: calc(12.5px * var(--ck-fs));
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}
.almahjar-combo-st .almahjar-ic {
	color: var(--ck-acc);
}
.almahjar-combo-x {
	color: var(--ck-ink);
}
.almahjar-combo-st em {
	font-style: normal;
	color: var(--ck-bad);
	font-weight: 600;
}
.is-done .almahjar-combo-st {
	color: var(--ck-ok);
	font-weight: 600;
}
.almahjar-combo-ok {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border-radius: 50%;
	border: 1.5px solid var(--ck-line);
	color: transparent;
	transition:
		background 0.2s,
		border-color 0.2s,
		color 0.2s;
}
.almahjar-combo-ok.is-on,
.is-done .almahjar-combo-ok {
	background: var(--ck-ok);
	border-color: var(--ck-ok);
	color: #fff;
}
.almahjar-combo-it.is-need {
	animation: almahjar-ck-nudge 0.45s ease;
}
.almahjar-combo-it.is-need .almahjar-combo-st {
	color: var(--ck-bad);
	font-weight: 600;
}
.almahjar-combo-it.is-need .almahjar-combo-ok {
	border-color: var(--ck-bad);
}
@keyframes almahjar-ck-nudge {
	0%,
	100% {
		transform: none;
	}
	25% {
		transform: translateX(-4px);
	}
	75% {
		transform: translateX(4px);
	}
}
@media (prefers-reduced-motion: reduce) {
	.almahjar-combo-it.is-need {
		animation: none;
	}
}

/* size / colour buttons */
.almahjar-combo-opts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 6px;
}
.almahjar-combo-g {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.almahjar-combo-gl {
	font-size: calc(12px * var(--ck-fs));
	color: var(--ck-mute);
	letter-spacing: 0.02em;
}
.almahjar-combo-gl b {
	color: var(--ck-ink);
}
.almahjar-combo-sws {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.almahjar-combo-sw {
	position: relative;
	min-width: 40px;
	height: 36px;
	padding: 0 12px;
	border: 1.5px solid var(--ck-line);
	border-radius: var(--almahjar-pill, 999px);
	background: var(--ck-card);
	color: var(--ck-ink);
	font: inherit;
	font-size: calc(13px * var(--ck-fs));
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition:
		border-color 0.15s,
		box-shadow 0.15s,
		background 0.15s;
}
.almahjar-combo-sw:hover {
	border-color: var(--ck-ink);
}
.almahjar-combo-sw:focus-visible {
	outline: 2px solid var(--ck-acc);
	outline-offset: 2px;
}
.almahjar-combo-sw[aria-checked="true"] {
	border-color: var(--ck-ink);
	background: var(--ck-ink);
	color: var(--almahjar-on-ink, #fff);
}
.almahjar-combo-sw.is-color {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0 12px 0 4px;
}
.almahjar-combo-sw.is-color i {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.almahjar-combo-sw.is-color[aria-checked="true"] {
	background: var(--ck-card);
	color: var(--ck-ink);
	box-shadow: inset 0 0 0 1px var(--ck-ink);
}
.almahjar-combo-sw.is-off {
	opacity: 0.38;
	cursor: not-allowed;
	text-decoration: line-through;
}
.almahjar-combo-sw.is-off {
	border-style: dashed;
}
.almahjar-combo-sw.is-off i {
	opacity: 0.4;
	filter: grayscale(0.6);
}

/* saving, total, warnings */
.almahjar-combo-save,
.almahjar-combo-total,
.almahjar-combo-need,
.almahjar-combo-left {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: calc(12px * var(--ck-sp)) !important;
	padding: 9px 12px;
	border-radius: calc(var(--ck-r) * 0.7);
	font-size: calc(13px * var(--ck-fs));
}
.almahjar-combo-save {
	background: color-mix(in srgb, var(--ck-ok) 10%, var(--ck-card));
	color: var(--ck-ok);
}
.almahjar-combo-save b {
	color: inherit;
}
.almahjar-combo-total {
	background: color-mix(in srgb, var(--ck-ink) 5%, var(--ck-card));
	font-weight: 700;
}
.almahjar-combo-need {
	background: color-mix(in srgb, var(--ck-bad) 10%, var(--ck-card));
	color: var(--ck-bad);
	font-weight: 600;
}
.almahjar-combo-left {
	padding: 0;
	color: var(--ck-bad);
	font-weight: 600;
}
.almahjar-combo [hidden] {
	display: none !important;
}
.almahjar-combo-from {
	font-size: 0.7em;
	font-weight: 500;
	opacity: 0.75;
	margin-right: 2px;
}

/* ---------- "also comes in a pack" on a single product ---------- */
.almahjar-inpack {
	margin: 0;
	padding: 0;
	color: var(--ck-ink);
}
.almahjar-inpack-h {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 0 0 10px !important;
}
.almahjar-inpack-h .almahjar-ic {
	color: var(--ck-acc);
}
.almahjar-inpack-h span {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.almahjar-inpack-h b {
	font-size: calc(15px * var(--ck-fs));
}
.almahjar-inpack-h small {
	color: var(--ck-mute);
	font-size: calc(12.5px * var(--ck-fs));
}
.almahjar-inpack-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	margin-top: 8px;
	border-radius: var(--ck-r);
	background: color-mix(in srgb, var(--ck-ink) 4.5%, var(--ck-card));
	border: 0;
	color: inherit !important;
	text-decoration: none !important;
	transition:
		background 0.2s,
		box-shadow 0.2s;
}
.almahjar-inpack-card:hover {
	background: color-mix(in srgb, var(--ck-ink) 8%, var(--ck-card));
	box-shadow: none;
}
.almahjar-inpack-card:hover .almahjar-inpack-go {
	transform: translateX(3px);
}
.almahjar-inpack-card:focus-visible {
	outline: 2px solid var(--ck-acc);
	outline-offset: 2px;
}
.almahjar-inpack-stack {
	display: flex;
	align-items: center;
	padding-left: 14px;
}
.almahjar-inpack-stack img,
.almahjar-inpack-more {
	width: 44px;
	height: 44px;
	margin-left: -14px !important;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--ck-card);
	background: var(--ck-card);
	box-shadow: 0 2px 6px -3px color-mix(in srgb, var(--ck-ink) 45%, transparent);
	position: relative;
	z-index: calc(5 - var(--i, 4));
}
.almahjar-inpack-more {
	display: grid;
	place-items: center;
	font-size: 12px;
	font-weight: 700;
	background: color-mix(in srgb, var(--ck-ink) 8%, var(--ck-card));
}
.almahjar-inpack-t {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.almahjar-inpack-t b {
	font-size: calc(14px * var(--ck-fs));
	line-height: 1.3;
}
.almahjar-inpack-t small {
	color: var(--ck-mute);
	font-size: calc(12px * var(--ck-fs));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.almahjar-inpack-p {
	font-size: calc(13px * var(--ck-fs));
	font-weight: 600;
}
.almahjar-inpack-p del {
	opacity: 0.55;
	font-weight: 400;
}
.almahjar-inpack-p ins {
	text-decoration: none;
}
.almahjar-inpack-save {
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--ck-ok);
	color: #fff;
	font-size: calc(11.5px * var(--ck-fs));
	font-weight: 700;
	white-space: nowrap;
}
.almahjar-inpack-go {
	display: grid;
	place-items: center;
	transition: transform 0.2s;
}
@media (max-width: 480px) {
	.almahjar-inpack-card {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}
	.almahjar-inpack-go {
		display: none;
	}
	.almahjar-inpack-save {
		grid-column: 2;
		justify-self: start;
	}
}

/* ---------- cart, checkout, mini cart: the pack's products under the pack ---------- */
.wc-block-components-product-details__in-this-pack,
.wc-block-components-product-details li:has(.almahjar-pk-list) {
	display: block !important;
	margin-top: 6px;
}
.wc-block-components-product-details__in-this-pack .wc-block-components-product-details__name {
	display: block;
	font-size: 0.85em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.7;
	margin-bottom: 4px;
}
.wc-block-components-product-details__in-this-pack .wc-block-components-product-details__value,
.almahjar-pk-list {
	display: block;
}
.almahjar-pk-list {
	position: relative;
	padding-left: 12px;
	border-left: 2px solid color-mix(in srgb, var(--almahjar-ink, #1a1a1a) 12%, transparent);
	margin: 2px 0;
}
.almahjar-pk {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
	line-height: 1.3;
}
.almahjar-pk-i {
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	overflow: hidden;
	background: color-mix(in srgb, var(--almahjar-ink, #1a1a1a) 6%, transparent);
}
a.almahjar-pk-i {
	display: block;
}
.almahjar-pk-i img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	margin: 0 !important;
}
.almahjar-pk-t {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}
.almahjar-pk-t b {
	font-weight: 600;
	color: var(--almahjar-ink, inherit);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.almahjar-pk-a {
	font-size: 0.92em;
	opacity: 0.75;
}
.almahjar-pk-q {
	font-weight: 600;
	opacity: 0.8;
	white-space: nowrap;
}
/* classic cart / mini cart / Milano's cart drawer (dl.variation): the list under its label, full width. Matched by
   content, not by the dt/dd class, which follows the (translated) label. */
.almahjar-pk-i {
	position: relative;
}
.almahjar-pk-i img {
	position: static !important;
	inset: auto !important;
	max-width: none !important;
	transform: none !important;
}
dl.variation:has(.almahjar-pk-list) {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 2px;
	width: 100%;
	margin: 6px 0 0;
}
dl.variation:has(.almahjar-pk-list) dt:has(+ dd .almahjar-pk-list),
dl.variation dd:has(.almahjar-pk-list) {
	float: none !important;
	display: block !important;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}
dl.variation dt:has(+ dd .almahjar-pk-list) {
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.65;
}
dl.variation dd:has(.almahjar-pk-list) p {
	margin: 0;
}
dl.variation .almahjar-pk {
	padding: 3px 0;
}
dl.variation .almahjar-pk-i {
	width: 34px;
	height: 34px;
}
/* the photo stack keeps its size (the theme shrinks images in flex rows); one photo sits centred as a rounded tile */
.almahjar-inpack-stack {
	flex: none;
}
.almahjar-inpack-stack img,
.almahjar-inpack-more {
	flex: none;
	min-width: 44px;
	max-width: none !important;
}
.almahjar-inpack-stack:has(> img:only-child) {
	padding-left: 0;
}
.almahjar-inpack-stack > img:only-child {
	margin-left: 0 !important;
	width: 56px;
	height: 56px;
	min-width: 56px;
	border-radius: 12px;
}
