/* Frill Thrills — Shopify-style cart drawer */

.ft-cd {
	position: fixed;
	inset: 0;
	z-index: 100050;
	pointer-events: none;
}

.ft-cd.is-open {
	pointer-events: auto;
}

.ft-cd__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(420px, 100vw);
	height: 100%;
	background: #fff;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
}

.ft-cd.is-open .ft-cd__panel {
	transform: translateX(0);
}

.ft-cd__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.45);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ft-cd.is-open .ft-cd__overlay {
	opacity: 1;
}

.ft-cd__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.ft-cd__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 12px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.ft-cd__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #111;
	letter-spacing: -0.02em;
}

.ft-cd__close {
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #111;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
}

.ft-cd__close:hover {
	background: #f5f5f5;
	color: #f71358;
}

.ft-cd__shipping {
	padding: 14px 20px 12px;
	border-bottom: 1px solid #f0f0f0;
	flex-shrink: 0;
}

.ft-cd__shipping-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.ft-cd__shipping-icon {
	color: #444;
	display: inline-flex;
}

.ft-cd__shipping-text {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #222;
	line-height: 1.35;
}

.ft-cd__shipping-bar {
	height: 4px;
	background: #e8e8e8;
	border-radius: 999px;
	overflow: hidden;
}

.ft-cd__shipping-fill {
	display: block;
	height: 100%;
	background: #222;
	border-radius: 999px;
	transition: width 0.35s ease;
}

.ft-cd__scroll {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	padding: 8px 0 16px;
	-webkit-overflow-scrolling: touch;
}

.ft-cd__empty {
	padding: 48px 24px;
	text-align: center;
	color: #666;
}

.ft-cd__shop-btn {
	display: inline-flex;
	margin-top: 14px;
	padding: 10px 18px;
	background: #f71358;
	color: #fff !important;
	border-radius: 6px;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 13px;
}

.ft-cd__items {
	list-style: none;
	margin: 0;
	padding: 4px 22px 0;
}

.ft-cd__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	column-gap: 22px;
	padding: 20px 0;
	border-bottom: 0;
	align-items: start;
}

.ft-cd__item + .ft-cd__item {
	margin-top: 0;
}

.ft-cd__item-media {
	width: 72px;
}

.ft-cd__item-media a {
	display: block;
	line-height: 0;
}

.ft-cd__item-media img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 2px;
	background: #f3f1ec;
}

.ft-cd__item-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.ft-cd__item-body,
.ft-cd__item-copy {
	display: contents;
}

.ft-cd__item-title {
	font-size: 15px;
	font-weight: 600;
	color: #2b2b2b !important;
	text-decoration: none !important;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.ft-cd__item-title:hover {
	color: #f71358 !important;
}

.ft-cd__item-meta {
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: #8a8a8a;
	line-height: 1.35;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.35em;
}

.ft-cd__item-meta .amount,
.ft-cd__item-meta .woocommerce-Price-amount,
.ft-cd__item-price,
.ft-cd__item-price .amount,
.ft-cd__item-x {
	color: inherit;
	font-weight: inherit;
	font-size: inherit;
}

.ft-cd__item-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
	width: 100%;
}

.ft-cd__item-remove {
	border: 0;
	background: transparent;
	color: #8a8a8a;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	padding: 0;
	margin: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	flex: 0 0 auto;
	line-height: 1.2;
}

.ft-cd__item-remove:hover {
	color: #f71358;
}

.ft-cd__qty {
	display: inline-flex;
	align-items: stretch;
	flex: 0 0 auto;
	width: auto;
	max-width: max-content;
	border: 1px solid #cfcfcf;
	border-radius: 3px;
	overflow: hidden;
	height: 36px;
	background: #fff;
}

.ft-cd__qty-btn {
	width: 34px;
	height: 100%;
	border: 0;
	background: #fff;
	color: #444;
	font-size: 16px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	flex: 0 0 34px;
}

.ft-cd__qty-btn:hover {
	background: #f7f7f7;
}

.ft-cd__qty-input {
	width: 42px;
	height: 100%;
	border: 0;
	border-left: 1px solid #e4e4e4;
	border-right: 1px solid #e4e4e4;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	appearance: textfield;
	-moz-appearance: textfield;
	padding: 0;
	margin: 0;
	background: #fff;
	flex: 0 0 42px;
}

.ft-cd__qty-input::-webkit-outer-spin-button,
.ft-cd__qty-input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.ft-cd__item-line {
	font-size: 13px;
	font-weight: 700;
	color: #111;
}

.ft-cd__upsell {
	padding: 18px 0 8px;
	border-top: 1px solid #f0f0f0;
	margin-top: 8px;
}

.ft-cd__upsell-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px 12px;
}

.ft-cd__upsell-head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #111;
}

.ft-cd__upsell-nav {
	display: inline-flex;
	gap: 6px;
}

.ft-cd__upsell-prev,
.ft-cd__upsell-next {
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: #222;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-sizing: border-box;
}

.ft-cd__upsell-prev:hover,
.ft-cd__upsell-next:hover {
	border-color: #f71358;
	color: #f71358;
}

.ft-cd__upsell-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 0 20px 4px;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.ft-cd__upsell-track::-webkit-scrollbar {
	display: none;
}

.ft-cd__upsell-card {
	position: relative;
	flex: 0 0 140px;
	width: 140px;
	overflow: visible;
}

.ft-cd__upsell-image img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 6px;
	background: #f7f7f7;
}

.ft-cd__upsell-title {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
	color: #222 !important;
	text-decoration: none !important;
	line-height: 1.3;
	max-height: 2.6em;
	overflow: hidden;
}

.ft-cd__upsell-price {
	margin-top: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #111;
}

.ft-cd__upsell-card .ft-qa {
	position: relative;
	width: 100%;
	margin-top: 6px;
	z-index: 1;
}

.ft-cd__upsell-card .ft-qa.is-open {
	z-index: 20;
}

.ft-cd__upsell-add {
	display: inline-block;
	margin-top: 6px;
	border: 0;
	background: transparent;
	padding: 0;
	color: #f71358 !important;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none !important;
	width: auto !important;
	border-radius: 0 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.ft-cd__upsell-card .ft-qa .ft-cd__upsell-add,
.ft-cd__upsell-card .ft-qa__trigger {
	margin-top: 0 !important;
}

.ft-cd__upsell-add:hover {
	text-decoration: underline !important;
	background: transparent !important;
	color: #f71358 !important;
}

.ft-cd__upsell-card .ft-qa__panel {
	position: absolute;
	left: 0;
	right: auto;
	bottom: auto;
	top: calc(100% + 6px);
	z-index: 30;
	min-width: 148px;
	width: max-content;
	max-width: 200px;
	padding: 8px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.ft-cd__upsell-card .ft-qa__label {
	margin: 0 0 6px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #666;
}

.ft-cd__upsell-card .ft-qa__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ft-cd__upsell-card .ft-qa__size {
	min-width: 30px;
	height: 28px;
	padding: 0 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	color: #222;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.ft-cd__upsell-card .ft-qa__size:hover,
.ft-cd__upsell-card .ft-qa__size.is-active {
	border-color: #f71358;
	background: #f71358;
	color: #fff;
}

.ft-cd__utils {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 16px 20px 8px;
	border-top: 1px solid #eee;
	margin-top: 8px;
}

.ft-cd__util {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	border: 0;
	background: transparent;
	color: #333;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	padding: 8px 4px;
}

.ft-cd__util:hover,
.ft-cd__util.is-active {
	color: #f71358;
}

.ft-cd__panel-box {
	padding: 0 20px 8px;
}

.ft-cd__panel-form {
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 12px;
	background: #fafafa;
}

.ft-cd__panel-form.is-hidden {
	display: none;
}

.ft-cd__panel-form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 8px;
	color: #222;
}

.ft-cd__panel-form textarea,
.ft-cd__panel-form input[type="text"] {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 13px;
	background: #fff;
	box-sizing: border-box;
}

.ft-cd__coupon-row {
	display: flex;
	gap: 8px;
}

.ft-cd__panel-submit {
	border: 0;
	background: #111;
	color: #fff;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	margin-top: 8px;
}

.ft-cd__coupon-row .ft-cd__panel-submit {
	margin-top: 0;
}

.ft-cd__panel-submit:hover {
	background: #f71358;
}

.ft-cd__footer {
	flex-shrink: 0;
	border-top: 1px solid #eee;
	padding: 16px 20px 20px;
	background: #fff;
}

.ft-cd__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 16px;
	font-weight: 700;
	color: #111;
}

.ft-cd__taxes {
	margin: 6px 0 14px;
	font-size: 12px;
	color: #777;
}

.ft-cd__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.ft-cd__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	text-align: center;
	box-sizing: border-box;
}

.ft-cd__btn--ghost {
	border: 1.5px solid #111;
	color: #111 !important;
	background: #fff;
}

.ft-cd__btn--ghost:hover {
	border-color: #f71358;
	color: #f71358 !important;
}

.ft-cd__btn--solid {
	border: 1.5px solid #111;
	background: #111;
	color: #fff !important;
}

.ft-cd__btn--solid:hover {
	background: #f71358;
	border-color: #f71358;
}

.ft-cd.is-loading .ft-cd__scroll {
	opacity: 1;
	pointer-events: auto;
}

/* Full-drawer overlay removed — only per-item / per-button loaders */
.ft-cd__loader {
	display: none !important;
}

.ft-cd__item {
	position: relative;
	transition: opacity 0.15s ease;
}

.ft-cd__item.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.ft-cd__item.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 12px;
	left: auto;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 0;
	border: 2px solid rgba(0, 0, 0, 0.12);
	border-top-color: #f71358;
	border-radius: 50%;
	animation: ft-cd-spin 0.65s linear infinite;
	z-index: 3;
}

@keyframes ft-cd-spin {
	to {
		transform: rotate(360deg);
	}
}

.ft-cd__qty-btn.is-busy,
.ft-cd__item-remove.is-busy {
	color: transparent !important;
	position: relative;
}

.ft-cd__qty-btn.is-busy::after,
.ft-cd__item-remove.is-busy::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: #f71358;
	border-radius: 50%;
	animation: ft-cd-spin 0.65s linear infinite;
}

/* Upsell / quick-add button loader stays on that button only */
.ft-cd__upsell-card .ft-cd__upsell-add.loading,
.ft-cd__upsell-card .ft-qa__trigger.loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.ft-cd__upsell-card .ft-cd__upsell-add.loading::after,
.ft-cd__upsell-card .ft-qa__trigger.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border: 2px solid rgba(247, 19, 88, 0.25);
	border-top-color: #f71358;
	border-radius: 50%;
	animation: ft-cd-spin 0.65s linear infinite;
}

body.ft-cd-open {
	overflow: hidden;
}

/* Keep header icons intact while the cart drawer is open */
body.ft-cd-open .ft-header-icons,
body.ft-cd-open .ft-header-icons__item,
body.ft-cd-open .ft-hdr-wishlist,
body.ft-cd-open .ft-header-account,
body.ft-cd-open .zak-header-search {
	visibility: visible !important;
	opacity: 1 !important;
}

@media screen and (max-width: 480px) {
	.ft-cd__panel {
		width: 100vw;
	}

	.ft-cd__actions {
		grid-template-columns: 1fr;
	}
}
