/* Little Journal Club — slide-in cart drawer. Themed to the shop.
   Type comes from the Elementor kit globals (Primary = headings, Secondary =
   body, Accent = buttons, Text = small print), falling back to the theme. */

:root {
	--ljc-drawer-accent: #cc3366;
	--ljc-drawer-ink: #272421;
	--ljc-drawer-muted: #6b6560;
	--ljc-drawer-paper: #fffdf9;
	--ljc-drawer-line: #ebe3df;
}

.ljc-drawer {
	--ljc-drawer-font-heading: var(--e-global-typography-primary-font-family, inherit);
	--ljc-drawer-font-body: var(--e-global-typography-secondary-font-family, inherit);
	--ljc-drawer-font-button: var(--e-global-typography-accent-font-family, inherit);
	--ljc-drawer-font-text: var(--e-global-typography-text-font-family, inherit);
	position: fixed;
	inset: 0;
	z-index: 100000;
	font-family: var(--ljc-drawer-font-body);
	color: var(--ljc-drawer-ink);
}

html.ljc-drawer-open,
html.ljc-drawer-open body {
	overflow: hidden;
}

.ljc-drawer[hidden] {
	display: none;
}

.ljc-drawer *,
.ljc-drawer *::before,
.ljc-drawer *::after {
	box-sizing: border-box;
}

.ljc-drawer a,
.ljc-drawer ins {
	text-decoration: none;
}

.ljc-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(39, 36, 33, 0.42);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ljc-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 100vw);
	display: flex;
	flex-direction: column;
	background: var(--ljc-drawer-paper);
	box-shadow: -24px 0 60px rgba(39, 36, 33, 0.18);
	transform: translateX(100%);
	transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: none;
}

.ljc-drawer.is-open .ljc-drawer__overlay {
	opacity: 1;
}

.ljc-drawer.is-open .ljc-drawer__panel {
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.ljc-drawer__overlay,
	.ljc-drawer__panel {
		transition: none;
	}
}

/* Washi strip pinning the top of the drawer, matching the cart motivator. */
.ljc-drawer__washi {
	display: block;
	flex: 0 0 auto;
	height: 10px;
	background: var(--ljc-drawer-accent);
	opacity: 0.6;
	-webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 17px);
	mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 17px);
}

/* ---------- Header ---------- */

.ljc-drawer__head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--ljc-drawer-line);
}

.ljc-drawer__title {
	margin: 0;
	font-family: var(--ljc-drawer-font-heading);
	font-weight: var(--e-global-typography-primary-font-weight, 600);
	font-size: 26px;
	line-height: 1.1;
	text-transform: none;
	color: var(--ljc-drawer-ink);
}

.ljc-drawer__count {
	font-size: 0.7em;
	font-weight: 400;
	color: var(--ljc-drawer-muted);
	vertical-align: middle;
}

/* Heading font options. "Theme default" uses the Elementor Primary font. */
.ljc-drawer--font-serif {
	--ljc-drawer-font-heading: Georgia, Cambria, "Times New Roman", Times, serif;
}

.ljc-drawer--font-sans {
	--ljc-drawer-font-heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ljc-drawer--font-rounded {
	--ljc-drawer-font-heading: ui-rounded, "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

/* Elementor Pro styles every <button> with its global button colour — force
   the plain transparent control with a dark "x". */
.ljc-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0 -8px 0 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--ljc-drawer-ink) !important;
	box-shadow: none !important;
	cursor: pointer;
}

.ljc-drawer__close:hover,
.ljc-drawer__close:focus-visible {
	background: rgba(39, 36, 33, 0.06) !important;
}

/* ---------- Body: scroll area + pinned footer ---------- */

.ljc-drawer__content {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	transition: opacity 0.15s ease;
}

.ljc-drawer__content.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.ljc-drawer__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 24px 24px;
}

.ljc-drawer__scroll .ljc-cg {
	margin: 0 0 8px;
}

.ljc-drawer__empty {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 18px;
	text-align: center;
}

.ljc-drawer__empty-msg {
	margin: 0;
	font-family: var(--ljc-drawer-font-heading);
	font-size: 20px;
	color: var(--ljc-drawer-muted);
}

.ljc-drawer__foot {
	flex: 0 0 auto;
	padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--ljc-drawer-line);
	background: var(--ljc-drawer-paper);
	box-shadow: 0 -10px 24px rgba(39, 36, 33, 0.05);
}

.ljc-drawer__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	font-family: var(--ljc-drawer-font-heading);
	font-size: 18px;
}

.ljc-drawer__subtotal,
.ljc-drawer__subtotal * {
	color: var(--ljc-drawer-ink) !important;
}

.ljc-drawer__subtotal strong {
	font-weight: 600;
}

.ljc-drawer__note {
	margin: 4px 0 14px;
	font-family: var(--ljc-drawer-font-text);
	font-size: 14px;
	font-style: italic;
	color: var(--ljc-drawer-muted);
}

.ljc-drawer__actions {
	display: grid;
	gap: 10px;
}

/* Square, full-width buttons. Plain <a> (not .button / .elementor-button) so
   the kit's rounded gold button style never reaches them. */
.ljc-drawer .ljc-drawer__btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px 18px;
	border: 1px solid var(--ljc-drawer-ink);
	border-radius: 0;
	font-family: var(--ljc-drawer-font-button);
	font-weight: var(--e-global-typography-accent-font-weight, 500);
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ljc-drawer .ljc-drawer__btn--primary {
	background: var(--ljc-drawer-ink);
	color: #fff;
}

.ljc-drawer .ljc-drawer__btn--primary:hover,
.ljc-drawer .ljc-drawer__btn--primary:focus-visible {
	background: #000;
	color: #fff;
}

.ljc-drawer .ljc-drawer__btn--secondary {
	background: transparent;
	color: var(--ljc-drawer-ink);
}

.ljc-drawer .ljc-drawer__btn--secondary:hover,
.ljc-drawer .ljc-drawer__btn--secondary:focus-visible {
	background: var(--ljc-drawer-ink);
	color: #fff;
}

/* ---------- Bundle offer cards ("Stack & save!") ---------- */

.ljc-bundles {
	--ljc-cg-accent: #cc3366;
	display: grid;
	gap: 12px;
	margin: 0 0 8px;
}

.ljc-bundle {
	position: relative;
	padding: 16px 18px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 14px;
	background: #fffdf9;
	box-shadow: 0 6px 18px rgba(39, 36, 33, 0.06);
}

/* Washi tape pinning the note, like the free-shipping card (optional). */
.ljc-bundle--tape::before {
	content: "";
	position: absolute;
	top: -9px;
	right: 28px;
	width: 70px;
	height: 18px;
	background: var(--ljc-cg-accent);
	opacity: 0.45;
	transform: rotate(3deg);
	border-radius: 2px;
	-webkit-mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
	mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
}

.ljc-bundle__title {
	margin: 0 0 4px;
	font-family: var(--ljc-drawer-font-heading);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.15;
	color: var(--ljc-cg-accent);
}

.ljc-bundle__desc {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--ljc-drawer-ink);
}

.ljc-bundle__progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.ljc-bundle__dots {
	--ljc-dot: 24px;
	--ljc-bundle-free: #3aa76d;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

/* More sets on show: smaller dots so the strip stays on a line or two. */
.ljc-bundle__dots.is-small {
	--ljc-dot: 18px;
}

.ljc-bundle__dots.is-tiny {
	--ljc-dot: 14px;
}

/* One set (paid dots, then the free one); sets sit slightly apart. */
.ljc-bundle__set {
	display: inline-flex;
	gap: calc(var(--ljc-dot) / 3);
}

.ljc-bundle__dot {
	position: relative;
	box-sizing: border-box;
	width: var(--ljc-dot);
	height: var(--ljc-dot);
	border: 2px dashed var(--ljc-cg-accent);
	border-radius: 50%;
	transition: background-color 0.2s ease, border-style 0.2s ease;
}

.ljc-bundle__dot.is-filled {
	border-style: solid;
	background: var(--ljc-cg-accent);
}

/* The free item in each set: green, with a star — faint until earned. */
.ljc-bundle__dot.is-free {
	border-color: var(--ljc-bundle-free);
}

.ljc-bundle__dot.is-free::after {
	content: "\2605";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc(var(--ljc-dot) * 0.55);
	line-height: 1;
	color: var(--ljc-bundle-free);
	opacity: 0.6;
}

.ljc-bundle__dot.is-free.is-filled {
	background: var(--ljc-bundle-free);
}

.ljc-bundle__dot.is-free.is-filled::after {
	color: #fff;
	opacity: 1;
}

/* Earlier completed sets, collapsed: "+2 free". */
.ljc-bundle__more {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--ljc-bundle-free);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.ljc-bundle__count {
	font-size: 14px;
	color: var(--ljc-drawer-muted);
}

.ljc-bundle__msg {
	margin: 10px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ljc-drawer-ink);
}

.ljc-bundle.is-unlocked .ljc-bundle__msg {
	color: var(--ljc-cg-accent);
}

/* ---------- Line items ---------- */

.ljc-drawer__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ljc-line {
	display: grid;
	grid-template-columns: 76px 1fr auto;
	gap: 14px;
	align-items: start;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--ljc-drawer-line);
}

.ljc-line__thumb a {
	display: block;
}

.ljc-drawer .ljc-line__thumb img {
	display: block;
	width: 76px;
	height: 76px;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
	background: #f4efec;
}

.ljc-line__info {
	min-width: 0;
}

.ljc-line__name {
	display: block;
	font-family: var(--ljc-drawer-font-heading);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.25;
	color: var(--ljc-drawer-ink) !important;
}

.ljc-line__meta:empty {
	display: none;
}

.ljc-line__meta,
.ljc-line__meta dl {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--ljc-drawer-muted);
}

.ljc-line__meta dt,
.ljc-line__meta dd {
	display: inline;
	margin: 0;
}

.ljc-line__meta dd p {
	display: inline;
	margin: 0;
}

.ljc-line__meta dd::after {
	content: "";
	display: block;
}

.ljc-line__price {
	display: block;
	margin-top: 2px;
	font-size: 13px;
}

/* Elementor globals can wash prices out to near-white on the cream drawer. */
.ljc-line__total,
.ljc-line__total * {
	color: var(--ljc-drawer-ink) !important;
}

.ljc-line__price,
.ljc-line__price * {
	color: var(--ljc-drawer-muted) !important;
}

.ljc-line__total {
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
}

.ljc-line__controls {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 10px;
}

.ljc-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--ljc-drawer-line);
	background: #fff;
}

/* Real <button>s, so the selectors out-rank the kit's global button style
   (.elementor-kit-N button, incl. :hover). */
.ljc-drawer button.ljc-qty__btn,
.ljc-drawer button.ljc-qty__btn:hover,
.ljc-drawer button.ljc-qty__btn:focus {
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--ljc-drawer-ink);
	box-shadow: none;
	font-family: var(--ljc-drawer-font-body);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.ljc-drawer button.ljc-qty__btn:hover,
.ljc-drawer button.ljc-qty__btn:focus-visible {
	background: rgba(39, 36, 33, 0.06);
}

.ljc-drawer button.ljc-qty__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ljc-qty__value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	font-size: 14px;
}

.ljc-line__qty-fixed {
	font-size: 13px;
	color: var(--ljc-drawer-muted);
}

.ljc-drawer button.ljc-line__remove,
.ljc-drawer button.ljc-line__remove:hover,
.ljc-drawer button.ljc-line__remove:focus {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ljc-drawer-muted);
	font-family: var(--ljc-drawer-font-body);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ljc-drawer button.ljc-line__remove:hover,
.ljc-drawer button.ljc-line__remove:focus-visible {
	color: var(--ljc-drawer-ink);
}

/* ---------- "You might be interested in" ---------- */

.ljc-xsell {
	margin: 24px 0 0;
}

.ljc-xsell__title {
	margin: 0 0 12px;
	font-family: var(--ljc-drawer-font-heading);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ljc-drawer-muted);
}

.ljc-xsell__row {
	display: grid;
	gap: 10px;
}

.ljc-xsell__card {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 12px;
	padding: 8px;
	border: 1px solid var(--ljc-drawer-line);
	background: #fff;
}

.ljc-xsell__link {
	display: contents;
	color: var(--ljc-drawer-ink);
}

.ljc-drawer .ljc-xsell__card img {
	grid-row: 1 / span 2;
	width: 52px;
	height: 52px;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}

.ljc-xsell__name {
	align-self: end;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--ljc-drawer-ink);
}

.ljc-xsell__price {
	align-self: start;
	font-size: 13px;
}

.ljc-xsell__price,
.ljc-xsell__price * {
	color: var(--ljc-drawer-muted) !important;
}

.ljc-drawer .ljc-xsell__add {
	grid-column: 3;
	grid-row: 1 / span 2;
	align-self: center;
	white-space: nowrap;
	padding: 8px 12px;
	border: 1px solid var(--ljc-drawer-ink);
	border-radius: 0;
	background: transparent;
	color: var(--ljc-drawer-ink);
	font-family: var(--ljc-drawer-font-button);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.ljc-drawer .ljc-xsell__add:hover,
.ljc-drawer .ljc-xsell__add:focus-visible {
	background: var(--ljc-drawer-ink);
	color: #fff;
}

.ljc-xsell__add.loading {
	opacity: 0.6;
	pointer-events: none;
}

.ljc-xsell__add.added::after {
	content: " ✓";
}

/* WooCommerce appends a "View cart" link after an AJAX add; the drawer already
   shows the cart. */
.ljc-xsell .added_to_cart {
	display: none;
}

@media (max-width: 480px) {
	.ljc-drawer__head,
	.ljc-drawer__scroll,
	.ljc-drawer__foot {
		padding-left: 18px;
		padding-right: 18px;
	}

	.ljc-line {
		grid-template-columns: 64px 1fr auto;
		gap: 12px;
	}

	.ljc-drawer .ljc-line__thumb img {
		width: 64px;
		height: 64px;
	}
}
