/* ==========================================================================
   Ruby Fly Cart — rubykmbeautycenter.com
   Headings: Cormorant Garamond · Tags: DM Sans · Prices: Cormorant
   ========================================================================== */

.ruby-fc,
.ruby-fc-trigger {
	--rfc-ink: #3a2715;          /* site --csecondary */
	--rfc-ink-2: #5e4e40;
	--rfc-muted: #8a7d70;
	--rfc-tag: #a08a6c;          /* taupe category label */
	--rfc-gold: #9a7a4f;
	--rfc-line: #eee8de;
	--rfc-line-2: #ddd4c5;
	--rfc-cream: #f8f3e1;        /* site --bgprimary */
	--rfc-paper: #fcfaf6;
	--rfc-soft: #ece4d3;         /* soft beige button / badges */
	--rfc-card-a: #f8f6f1;
	--rfc-card-b: #ebe5d8;

	--rfc-ff-head: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
	--rfc-ff-price: "Cormorant", "Cormorant Garamond", Georgia, serif;
	--rfc-ff-tag: "DM Sans", "Helvetica Neue", Arial, sans-serif;

	--rfc-ease: cubic-bezier(.22, .61, .36, 1);
	--rfc-ease-out: cubic-bezier(.16, 1, .3, 1);
	--rfc-w: 468px;
	--rfc-pad: 44px;
}

/* --------------------------------------------------------------------------
   Trigger
   -------------------------------------------------------------------------- */

.ruby-fc-trigger {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px;
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: opacity .3s;
}

.ruby-fc-trigger:hover {
	opacity: .85;
}

.ruby-fc-trigger:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
	border-radius: 4px;
}

.ruby-fc-trigger__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ruby-fc-trigger__icon svg {
	display: block;
	width: 29px;
	height: 29px;
	stroke: currentColor;
	transition: transform .4s var(--rfc-ease-out);
}

.ruby-fc-trigger:hover .ruby-fc-trigger__icon svg {
	transform: translateY(-1.5px);
}

.ruby-fc-trigger__label {
	font-family: var(--rfc-ff-head);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: currentColor;
}

.ruby-fc-count {
	position: absolute;
	top: -4px;
	right: -7px;
	box-sizing: border-box;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #a89178;
	color: #ffffff;
	font: 600 10px/17px var(--rfc-ff-tag);
	letter-spacing: 0;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform .45s var(--rfc-ease-out), opacity .3s;
}

.ruby-fc-trigger:not(:has(.ruby-fc-trigger__icon)) .ruby-fc-count {
	position: static;
}

.ruby-fc-count[data-count="0"] {
	opacity: 0;
	transform: scale(.4);
}

.ruby-fc-count.is-bump {
	animation: rfc-bump .7s var(--rfc-ease-out);
}

@keyframes rfc-bump {
	0% { transform: scale(1); }
	35% { transform: scale(1.35); }
	100% { transform: scale(1); }
}

/* Hide WooCommerce's "View cart" link next to loop buttons — the drawer replaces it. */
.ruby-fc-hide-view-cart a.added_to_cart.wc-forward {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.ruby-fc {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .75s;
}

.ruby-fc.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

html.ruby-fc-lock,
html.ruby-fc-lock body {
	overflow: hidden !important;
}

.ruby-fc *,
.ruby-fc *::before,
.ruby-fc *::after {
	box-sizing: border-box;
}

.ruby-fc__overlay {
	position: absolute;
	inset: 0;
	background: rgba(42, 28, 15, .34);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	cursor: pointer;
	transition: opacity .6s var(--rfc-ease);
}

.ruby-fc.is-open .ruby-fc__overlay {
	opacity: 1;
}

.ruby-fc__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(var(--rfc-w), 100%);
	height: 100%;
	height: 100dvh;
	overflow: hidden;
	background: #fff;
	color: var(--rfc-ink);
	font-family: var(--rfc-ff-price);
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	box-shadow: -40px 0 90px rgba(58, 39, 21, .12);
	transform: translate3d(100%, 0, 0);
	transition: transform .75s var(--rfc-ease-out);
	outline: none;
}

.ruby-fc.is-open .ruby-fc__panel {
	transform: none;
}

.ruby-fc h2,
.ruby-fc h3,
.ruby-fc p {
	margin: 0;
	padding: 0;
}

.ruby-fc a {
	color: inherit;
	text-decoration: none;
}

.ruby-fc button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.ruby-fc :focus-visible {
	outline: 1px solid var(--rfc-ink);
	outline-offset: 3px;
}

.ruby-fc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.ruby-fc .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
	white-space: nowrap;
}

/* Thin progress line while a request is running */
.ruby-fc__progress {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
	height: 2px;
	overflow: hidden;
	opacity: 0;
	transition: opacity .3s;
}

.ruby-fc__progress::before {
	content: "";
	position: absolute;
	inset: 0;
	width: 40%;
	background: linear-gradient(90deg, transparent, var(--rfc-gold), transparent);
	animation: rfc-progress 1.1s var(--rfc-ease) infinite;
}

.ruby-fc.is-loading .ruby-fc__progress {
	opacity: 1;
}

@keyframes rfc-progress {
	from { transform: translateX(-100%); }
	to { transform: translateX(260%); }
}

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

.ruby-fc__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 40px var(--rfc-pad) 30px;
	border-bottom: 1px solid var(--rfc-line);
}

.ruby-fc__heading {
	padding-left: 18px;
	border-left: 1px solid var(--rfc-line-2);
}

.ruby-fc__eyebrow {
	font-family: var(--rfc-ff-tag);
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--rfc-tag);
}

.ruby-fc__title {
	margin-top: 12px !important;
	font-family: var(--rfc-ff-head);
	font-size: 34px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--rfc-ink);
}

.ruby-fc__title-count {
	margin-left: 4px;
	font-family: var(--rfc-ff-price);
	font-size: .62em;
	font-style: italic;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--rfc-muted);
	vertical-align: .18em;
}

.ruby-fc__title-count[data-count="0"] {
	display: none;
}

.ruby-fc .ruby-fc__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 42px;
	height: 42px;
	margin-top: -4px;
	border: 1px solid var(--rfc-line-2);
	border-radius: 50%;
	color: var(--rfc-ink);
	transition: background-color .4s var(--rfc-ease), border-color .4s var(--rfc-ease);
}

.ruby-fc__close svg {
	width: 18px;
	height: 18px;
	transition: transform .6s var(--rfc-ease-out);
}

.ruby-fc .ruby-fc__close:hover {
	background: var(--rfc-cream);
	border-color: var(--rfc-cream);
}

.ruby-fc__close:hover svg {
	transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Notice
   -------------------------------------------------------------------------- */

.ruby-fc__notice {
	display: grid;
	grid-template-rows: 0fr;
	margin: 0 var(--rfc-pad);
	transition: grid-template-rows .5s var(--rfc-ease-out), margin .5s var(--rfc-ease-out);
}

.ruby-fc__notice.is-visible {
	grid-template-rows: 1fr;
	margin-top: 20px;
}

.ruby-fc__notice-inner {
	min-height: 0;
	overflow: hidden;
}

.ruby-fc__notice-box {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 8px;
	background: var(--rfc-card-a);
}

.ruby-fc__notice[data-type="error"] .ruby-fc__notice-box {
	background: #f9eeea;
	color: #7a3a26;
}

.ruby-fc__notice-dot {
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--rfc-gold);
}

.ruby-fc__notice[data-type="error"] .ruby-fc__notice-dot {
	background: #b4573a;
}

.ruby-fc__notice-text {
	flex: 1;
	font-family: var(--rfc-ff-tag);
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .02em;
}

.ruby-fc .ruby-fc__notice-undo {
	flex: none;
	font-family: var(--rfc-ff-tag);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Content / items
   -------------------------------------------------------------------------- */

.ruby-fc__content {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	transition: opacity .3s;
}

.ruby-fc.is-loading .ruby-fc__content {
	opacity: .55;
	pointer-events: none;
}

.ruby-fc__body {
	flex: 1;
	min-height: 0;
	padding: 6px var(--rfc-pad);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--rfc-line-2) transparent;
}

.ruby-fc__body::-webkit-scrollbar { width: 6px; }
.ruby-fc__body::-webkit-scrollbar-thumb { background: var(--rfc-line-2); border-radius: 6px; }

.ruby-fc__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ruby-fc-item {
	display: grid;
	grid-template-columns: 108px 1fr;
	gap: 24px;
	margin: 0;
	padding: 30px 0;
	border-bottom: 1px solid var(--rfc-line);
	transition: opacity .35s var(--rfc-ease), transform .45s var(--rfc-ease-out);
}

.ruby-fc-item:last-child {
	border-bottom: 0;
}

.ruby-fc-item.is-removing {
	opacity: 0;
	transform: translateX(24px);
}

.ruby-fc.is-entering .ruby-fc-item {
	animation: rfc-rise .8s var(--rfc-ease-out) both;
	animation-delay: calc(var(--i, 0) * 70ms + 180ms);
}

@keyframes rfc-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

.ruby-fc-item__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 10px;
	background: linear-gradient(180deg, var(--rfc-card-a) 0%, var(--rfc-card-b) 100%);
}

.ruby-fc-item__media img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	padding: 10px;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform .9s var(--rfc-ease-out);
}

a.ruby-fc-item__media:hover img {
	transform: scale(1.05);
}

.ruby-fc-item__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 4px 0 2px;
}

.ruby-fc-item__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.ruby-fc-item__text {
	min-width: 0;
}

.ruby-fc-item__tag {
	display: block;
	margin-bottom: 9px;
	font-family: var(--rfc-ff-tag);
	font-size: 9.5px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--rfc-tag);
}

.ruby-fc-item__name {
	font-family: var(--rfc-ff-head);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--rfc-ink);
}

.ruby-fc-item__name a {
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .5s var(--rfc-ease-out);
}

.ruby-fc-item__name a:hover {
	background-size: 100% 1px;
}

.ruby-fc-item__meta {
	margin-top: 8px !important;
	font-family: var(--rfc-ff-tag);
	font-size: 11px;
	line-height: 1.5;
	color: var(--rfc-muted);
}

.ruby-fc-item__price {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	padding-top: 16px;
}

.ruby-fc-item__total {
	font-family: var(--rfc-ff-price);
	font-size: 21px;
	font-weight: 600;
	line-height: 1;
	color: var(--rfc-ink);
}

.ruby-fc-item__unit {
	font-family: var(--rfc-ff-tag);
	font-size: 10.5px;
	color: var(--rfc-muted);
	white-space: nowrap;
}

.ruby-fc-item__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
	padding-top: 20px;
}

/* Quantity stepper */
.ruby-fc-qty {
	display: inline-flex;
	align-items: center;
	height: 38px;
	border: 1px solid var(--rfc-line-2);
	border-radius: 999px;
	transition: border-color .3s;
}

.ruby-fc-qty:hover,
.ruby-fc-qty:focus-within {
	border-color: var(--rfc-ink-2);
}

.ruby-fc .ruby-fc-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 100%;
	color: var(--rfc-ink);
	transition: opacity .3s;
}

.ruby-fc-qty__btn svg {
	width: 14px;
	height: 14px;
}

.ruby-fc .ruby-fc-qty__btn:disabled {
	opacity: .3;
	cursor: not-allowed;
}

.ruby-fc .ruby-fc-qty__input {
	width: 28px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--rfc-ff-price);
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	color: var(--rfc-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}

.ruby-fc .ruby-fc-qty__input:focus {
	outline: none;
}

.ruby-fc-qty__input::-webkit-outer-spin-button,
.ruby-fc-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ruby-fc-item__single {
	font-family: var(--rfc-ff-tag);
	font-size: 11px;
	letter-spacing: .08em;
	color: var(--rfc-muted);
}

.ruby-fc .ruby-fc-item__remove {
	font-family: var(--rfc-ff-tag);
	font-size: 9.5px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--rfc-muted);
	text-decoration: underline;
	text-decoration-color: var(--rfc-line-2);
	text-underline-offset: 5px;
	transition: color .3s, text-decoration-color .3s;
}

.ruby-fc .ruby-fc-item__remove:hover {
	color: var(--rfc-ink);
	text-decoration-color: var(--rfc-ink);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.ruby-fc__foot {
	padding: 30px var(--rfc-pad) 36px;
	border-top: 1px solid var(--rfc-line);
	background: var(--rfc-paper);
}

.ruby-fc__ship {
	margin-bottom: 26px;
}

.ruby-fc__ship-text {
	margin-bottom: 12px !important;
	font-family: var(--rfc-ff-tag);
	font-size: 11.5px;
	line-height: 1.5;
	letter-spacing: .02em;
	color: var(--rfc-ink-2);
}

.ruby-fc__ship-text strong {
	font-weight: 600;
	color: var(--rfc-ink);
}

.ruby-fc__ship-bar {
	position: relative;
	display: block;
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--rfc-line);
}

.ruby-fc__ship-bar span {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--rfc-gold);
	transition: width .8s var(--rfc-ease-out);
}

.ruby-fc__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.ruby-fc__subtotal-label {
	font-family: var(--rfc-ff-head);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.ruby-fc__subtotal-value {
	font-family: var(--rfc-ff-price);
	font-size: 28px;
	font-weight: 600;
	line-height: 1;
}

.ruby-fc__note {
	margin: 10px 0 26px !important;
	font-family: var(--rfc-ff-tag);
	font-size: 11px;
	line-height: 1.5;
	color: var(--rfc-muted);
}

/* Buttons */
.ruby-fc .ruby-fc__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	height: 58px;
	padding: 0 28px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-family: var(--rfc-ff-head);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .14em;
	text-transform: uppercase;
	transition: background-color .45s var(--rfc-ease), color .45s var(--rfc-ease), border-color .45s var(--rfc-ease);
}

.ruby-fc__arrow {
	flex: none;
	width: 24px;
	height: auto;
	transition: transform .6s var(--rfc-ease-out);
}

.ruby-fc__btn:hover .ruby-fc__arrow {
	transform: translateX(6px);
}

.ruby-fc .ruby-fc__btn--primary {
	background: var(--rfc-ink);
	color: var(--rfc-cream);
}

.ruby-fc .ruby-fc__btn--primary:hover {
	background: #4c3b2a;
	color: #fff;
}

.ruby-fc .ruby-fc__btn--soft {
	display: inline-flex;
	width: auto;
	height: 52px;
	background: var(--rfc-soft);
	color: var(--rfc-ink);
	font-size: 15px;
}

.ruby-fc .ruby-fc__btn--soft:hover {
	background: var(--rfc-ink);
	color: var(--rfc-cream);
}

.ruby-fc .ruby-fc__link {
	display: table;
	margin: 22px auto 0;
	font-family: var(--rfc-ff-tag);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--rfc-ink-2);
	text-decoration: underline;
	text-decoration-color: var(--rfc-line-2);
	text-underline-offset: 6px;
	transition: color .3s, text-decoration-color .3s;
}

.ruby-fc .ruby-fc__link:hover {
	color: var(--rfc-ink);
	text-decoration-color: var(--rfc-ink);
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.ruby-fc__empty {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px var(--rfc-pad) 72px;
	text-align: center;
}

.ruby-fc.is-entering .ruby-fc__empty > * {
	animation: rfc-rise .9s var(--rfc-ease-out) both;
}

.ruby-fc.is-entering .ruby-fc__empty > :nth-child(2) { animation-delay: .25s; }
.ruby-fc.is-entering .ruby-fc__empty > :nth-child(3) { animation-delay: .3s; }
.ruby-fc.is-entering .ruby-fc__empty > :nth-child(4) { animation-delay: .35s; }
.ruby-fc.is-entering .ruby-fc__empty > :nth-child(5) { animation-delay: .4s; }

.ruby-fc__empty-art {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
	margin-bottom: 34px;
	border-radius: 50%;
	background: linear-gradient(180deg, var(--rfc-card-a) 0%, var(--rfc-card-b) 100%);
	color: var(--rfc-ink-2);
}

.ruby-fc__empty-art svg {
	width: 40px;
	height: 40px;
}

.ruby-fc__empty-title {
	margin-top: 14px !important;
	font-family: var(--rfc-ff-head);
	font-size: 30px;
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--rfc-ink);
}

.ruby-fc__empty-text {
	max-width: 290px;
	margin: 14px 0 34px !important;
	font-family: var(--rfc-ff-price);
	font-size: 18px;
	line-height: 1.45;
	color: var(--rfc-ink-2);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
	.ruby-fc,
	.ruby-fc-trigger {
		--rfc-pad: 24px;
	}

	.ruby-fc__panel {
		width: 100%;
		box-shadow: none;
	}

	.ruby-fc__head {
		padding-top: 28px;
		padding-bottom: 22px;
	}

	.ruby-fc__title {
		font-size: 30px;
	}

	.ruby-fc-item {
		grid-template-columns: 92px 1fr;
		gap: 18px;
		padding: 24px 0;
	}

	.ruby-fc-item__name {
		font-size: 17px;
	}

	.ruby-fc-item__total {
		font-size: 19px;
	}

	.ruby-fc__foot {
		padding-top: 24px;
		padding-bottom: calc(24px + env(safe-area-inset-bottom));
	}

	.ruby-fc .ruby-fc__btn--primary {
		height: 54px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ruby-fc *,
	.ruby-fc,
	.ruby-fc-trigger * {
		animation-duration: .01ms !important;
		animation-delay: 0s !important;
		transition-duration: .01ms !important;
	}
}
