/**
 * Side cart.
 *
 * Elementor Pro's menu cart widget supplies the panel, the toggle and the open
 * and close behaviour; everything below is presentation on top of its markup.
 * The classes are Elementor's own — elementor-menu-cart__main, __products,
 * __product, __subtotal, __footer-buttons — plus WooCommerce's mini cart
 * classes inside them, and .elementor-menu-cart--shown for the open state.
 *
 * Selectors are chained and the contested properties marked important for the
 * same reason as the other Alcli stylesheets: Elementor generates per widget
 * CSS for this widget and enqueues it after plugin styles.
 */

.elementor-menu-cart__container {
	--cart-red: #cd4547;
	--cart-red-dark: #b23a3c;
	--cart-ink: #14110f;
	--cart-soft: #57514a;
	--cart-mute: #9a938a;
	--cart-beige: #f4efe3;
	--cart-line: rgba(20, 17, 15, 0.11);
}

/* ------------------------------------------------------------- the scrim */

.elementor-menu-cart__container {
	background: rgba(20, 17, 15, 0.55) !important;
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.32s ease;
}

.elementor-menu-cart--shown .elementor-menu-cart__container {
	opacity: 1;
}

/* ------------------------------------------------------------- the panel */

.elementor-menu-cart__container .elementor-menu-cart__main {
	display: flex !important;
	flex-direction: column;
	width: 100% !important;
	max-width: 420px !important;
	padding: 0 !important;
	background: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: -24px 0 60px -28px rgba(20, 17, 15, 0.6) !important;
	overflow: hidden;
}

/* ------------------------------------------------------------ the header */

.alcli-cart__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex: 0 0 auto;
	padding: 22px 24px 16px;
	border-bottom: 1px solid var(--cart-line);
	background: #fff;
}

.alcli-cart__title {
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: -0.2px;
	color: var(--cart-ink);
}

.alcli-cart__count {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--cart-red);
	background: rgba(205, 69, 71, 0.1);
	border-radius: 999px;
	padding: 3px 10px;
}

/* Elementor's close button, restyled as a round control that sits clear of
   the heading rather than floating over it. */
.elementor-menu-cart__container .elementor-menu-cart__close-button {
	position: absolute !important;
	top: 18px !important;
	inset-inline-end: 18px !important;
	z-index: 3;
	display: grid !important;
	place-items: center;
	width: 34px !important;
	height: 34px !important;
	margin: 0 !important;
	border-radius: 50% !important;
	background: var(--cart-beige) !important;
	color: var(--cart-ink) !important;
	font-size: 15px !important;
	line-height: 1 !important;
	opacity: 1 !important;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.elementor-menu-cart__container .elementor-menu-cart__close-button:hover {
	background: var(--cart-red) !important;
	color: #fff !important;
	transform: rotate(90deg);
}

/* ------------------------------------------------------------- the items */

.elementor-menu-cart__container .elementor-menu-cart__products {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none !important;
	padding: 10px 14px !important;
	margin: 0 !important;
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Elementor already lays a row out as a grid: image spanning both rows in
   column one, name in row one of column two, price in row two. Only the
   proportions are wrong — its default column is 28% of the panel, which makes
   a very large thumbnail and a cramped name. Overriding display here rather
   than the track sizes is what squeezed the name in beside the price and made
   it wrap; the grid itself was right all along. */
.elementor-menu-cart__container .elementor-menu-cart__product {
	position: relative;
	grid-template-columns: 66px auto !important;
	grid-template-rows: auto auto !important;
	column-gap: 14px;
	row-gap: 4px;
	align-items: start;
	padding: 14px 34px 14px 10px !important;
	margin: 0 !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(20, 17, 15, 0.07) !important;
	border-radius: 12px;
	transition: background-color 0.18s ease;
	animation: alcli-cart-item 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.elementor-menu-cart__container .elementor-menu-cart__product:hover {
	background: rgba(244, 239, 227, 0.6);
}

.elementor-menu-cart__container .elementor-menu-cart__product:last-child {
	border-bottom: 0 !important;
}

.elementor-menu-cart__container .elementor-menu-cart__product-image {
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 66px !important;
	height: 66px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--cart-beige);
}

.elementor-menu-cart__container .elementor-menu-cart__product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.elementor-menu-cart__container .elementor-menu-cart__product-name {
	grid-column: 2;
	grid-row: 1;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	font-weight: 650 !important;
	line-height: 1.35 !important;
}

/* The chosen variation, e.g. Size: 3 inches / Color: Black.
   Elementor's template already prints this through
   wc_get_formatted_cart_item_data(); it arrives as a <dl class="variation">
   with a <p> inside every <dd>, which stacks into a tall block by default.
   Laid out inline here so three attributes read as one quiet line. */
.elementor-menu-cart__container .elementor-menu-cart__product-name .variation {
	display: flex;
	flex-wrap: wrap;
	column-gap: 4px;
	row-gap: 1px;
	margin: 5px 0 0 !important;
	padding: 0 !important;
	font-size: 11.5px;
	line-height: 1.4;
}

.elementor-menu-cart__container .elementor-menu-cart__product-name .variation dt {
	margin: 0 !important;
	padding: 0 !important;
	font-weight: 600;
	color: var(--cart-mute);
}

.elementor-menu-cart__container .elementor-menu-cart__product-name .variation dd {
	margin: 0 10px 0 0 !important;
	padding: 0 !important;
	color: var(--cart-soft);
}

.elementor-menu-cart__container .elementor-menu-cart__product-name .variation dd p {
	display: inline;
	margin: 0 !important;
	padding: 0 !important;
	font-size: inherit;
	line-height: inherit;
}

.elementor-menu-cart__container .elementor-menu-cart__product-name a {
	color: var(--cart-ink) !important;
	text-decoration: none !important;
	transition: color 0.18s ease;
}

.elementor-menu-cart__container .elementor-menu-cart__product-name a:hover {
	color: var(--cart-red) !important;
}

/* Elementor pads the price 20px from the start and aligns it to the end of the
   row, both of which assume the taller default layout. */
.elementor-menu-cart__container .elementor-menu-cart__product-price {
	grid-column: 2;
	grid-row: 2;
	align-self: start !important;
	display: block;
	padding: 0 !important;
	margin-top: 4px;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	color: var(--cart-red) !important;
}

/* WooCommerce writes the quantity as "1 × $42.00" inside the price. The count
   is the quieter half of that, so it is toned down rather than matched. */
.elementor-menu-cart__container .elementor-menu-cart__product-price .quantity {
	color: var(--cart-soft) !important;
	font-weight: 500 !important;
}

/* Elementor sets position:relative on the row, so this anchors to it. */
.elementor-menu-cart__container .elementor-menu-cart__product-remove {
	position: absolute !important;
	top: 16px !important;
	inset-inline-end: 6px !important;
	display: grid !important;
	place-items: center;
	width: 24px !important;
	height: 24px !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--cart-mute) !important;
	opacity: 1 !important;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.elementor-menu-cart__container .elementor-menu-cart__product-remove:hover {
	background: rgba(205, 69, 71, 0.12) !important;
	color: var(--cart-red) !important;
}

/* ------------------------------------------------------------ the footer */

.elementor-menu-cart__container .elementor-menu-cart__footer-buttons,
.elementor-menu-cart__container .elementor-menu-cart__subtotal {
	flex: 0 0 auto;
	background: #fff;
}

.elementor-menu-cart__container .elementor-menu-cart__subtotal {
	display: flex !important;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	/* The rule sits on this element's top edge, so the whole distance from the
	   line down to the buttons is set here: 26px above the subtotal row, 28px
	   below it. Elementor's own --product-divider-gap of 20px each side is what
	   made this feel cramped. */
	padding: 26px 24px 28px !important;
	border-top: 1px solid var(--cart-line) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 1px;
	color: var(--cart-soft) !important;
}

/* WooCommerce prints the label as <strong>Subtotal:</strong> and the figure as
   .woocommerce-Price-amount. They need opposite treatment — the label small and
   quiet, the figure large — so they must not share a rule. */
.elementor-menu-cart__container .elementor-menu-cart__subtotal strong {
	font-size: 10.5px !important;
	font-weight: 700 !important;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	color: var(--cart-soft) !important;
}

.elementor-menu-cart__container .elementor-menu-cart__subtotal .woocommerce-Price-amount {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.4px;
	text-transform: none;
	color: var(--cart-ink);
}

.elementor-menu-cart__container .elementor-menu-cart__footer-buttons {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	/* No top padding: the gap above comes from the subtotal's bottom padding,
	   so there is one number to change rather than two that add up.
	   Elementor sets font-size:20px on this container, which leaks into the
	   buttons' line box even though they set their own size. */
	padding: 0 24px 26px !important;
	font-size: 12px !important;
	border-top: 0 !important;
}

.elementor-menu-cart__container .elementor-menu-cart__footer-buttons .elementor-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 46px;
	padding: 13px 16px !important;
	border-radius: 999px !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
	text-decoration: none !important;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.elementor-menu-cart__container .elementor-button--view-cart {
	background: #fff !important;
	border: 1px solid var(--cart-line) !important;
	color: var(--cart-ink) !important;
}

.elementor-menu-cart__container .elementor-button--view-cart:hover {
	border-color: var(--cart-ink) !important;
	background: var(--cart-beige) !important;
}

.elementor-menu-cart__container .elementor-button--checkout {
	background: var(--cart-red) !important;
	border: 1px solid var(--cart-red) !important;
	color: #fff !important;
}

.elementor-menu-cart__container .elementor-button--checkout:hover {
	background: var(--cart-red-dark) !important;
	border-color: var(--cart-red-dark) !important;
	transform: translateY(-1px);
}

/* -------------------------------------------------------- the empty state */

.elementor-menu-cart__container .woocommerce-mini-cart__empty-message {
	margin: 0 !important;
	padding: 54px 24px 14px !important;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--cart-soft);
}

/* A cart icon drawn above the message, so an empty panel is not just a
   sentence floating in white space. */
.elementor-menu-cart__container .woocommerce-mini-cart__empty-message::before {
	content: "";
	display: block;
	width: 62px;
	height: 62px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--cart-beige)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239a938a'%3E%3Cpath d='M7 18a2 2 0 100 4 2 2 0 000-4zm10 0a2 2 0 100 4 2 2 0 000-4zM6.2 6l1.2 6h9.2l1.6-6H6.2zM4.3 2H2v2h1.7l3 10.4-1 1.8c-.6 1 .2 2.3 1.4 2.3H19v-2H7.4l.9-1.6h8.1c.7 0 1.3-.4 1.6-1L21 5H5.9l-.5-2z'/%3E%3C/svg%3E")
		center / 28px 28px no-repeat;
}

.alcli-cart__emptyactions {
	display: flex;
	justify-content: center;
	padding: 0 24px 34px;
}

.elementor-menu-cart__container .alcli-cart__browse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 13px 28px;
	border-radius: 999px;
	background: var(--cart-ink);
	color: #fff !important;
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none !important;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.elementor-menu-cart__container .alcli-cart__browse:hover {
	background: var(--cart-red);
	transform: translateY(-1px);
}

/* ---------------------------------------------------------- animations */

@keyframes alcli-cart-item {
	from {
		opacity: 0;
		transform: translateX(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Each row starts a beat after the one above it. Capped so a large cart does
   not take a noticeable time to finish drawing. */
.elementor-menu-cart__product:nth-child(1) { animation-delay: 0.04s; }
.elementor-menu-cart__product:nth-child(2) { animation-delay: 0.08s; }
.elementor-menu-cart__product:nth-child(3) { animation-delay: 0.12s; }
.elementor-menu-cart__product:nth-child(4) { animation-delay: 0.16s; }
.elementor-menu-cart__product:nth-child(5) { animation-delay: 0.2s; }
.elementor-menu-cart__product:nth-child(n + 6) { animation-delay: 0.24s; }

/* ---------------------------------------------------------- small screens */

@media (max-width: 480px) {
	.elementor-menu-cart__container .elementor-menu-cart__main {
		max-width: 100% !important;
	}

	.elementor-menu-cart__container .elementor-menu-cart__footer-buttons {
		grid-template-columns: 1fr;
		padding: 4px 18px 20px !important;
	}

	.elementor-menu-cart__container .elementor-menu-cart__subtotal {
		padding: 16px 18px 10px !important;
	}

	.alcli-cart__head {
		padding: 20px 18px 14px;
	}

	.elementor-menu-cart__container .elementor-menu-cart__products {
		padding: 8px 10px !important;
	}

	/* On a full width phone panel the thumbnail and the name compete for a
	   narrow line. Giving the image 10px back keeps most product names on one
	   line instead of breaking after the comma. */
	.elementor-menu-cart__container .elementor-menu-cart__product {
		grid-template-columns: 56px auto !important;
		column-gap: 12px;
		padding-inline: 8px 30px !important;
	}

	.elementor-menu-cart__container .elementor-menu-cart__product-image {
		width: 56px !important;
		height: 56px;
	}

	.elementor-menu-cart__container .elementor-menu-cart__product-name {
		font-size: 13.5px !important;
		line-height: 1.3 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementor-menu-cart__container,
	.elementor-menu-cart__container .elementor-menu-cart__product,
	.elementor-menu-cart__container .elementor-menu-cart__close-button,
	.elementor-menu-cart__container .elementor-button,
	.elementor-menu-cart__container .alcli-cart__browse {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}
