/**
 * CoreBuild Essential Pro - Ultra-Clean Slide-Out Cart Drawer Stylesheet
 * High-Converting RippedUpNutrition & Gymshark Style
 * Engineered by Method Commerce
 */

.corebuild-cart-drawer-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
}

.corebuild-cart-drawer-overlay.is-open {
	display: block;
}

.cart-drawer-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	animation: cbFadeIn 0.2s ease;
}

.cart-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 420px;
	height: 100%;
	background: #ffffff;
	box-shadow: -6px 0 32px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	animation: cbSlideRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
	box-sizing: border-box;
}

@keyframes cbSlideRight {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

@keyframes cbFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* 1. Header */
.cart-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid #e2e8f0;
	background: #ffffff;
	flex-shrink: 0;
}

.drawer-title-wrap {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.drawer-title-wrap h3 {
	font-size: 1.6rem;
	font-weight: 900;
	color: #080900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
	line-height: 1;
}

.drawer-count-tag {
	font-size: 1.25rem;
	font-weight: 700;
	color: #64748b;
}

.cart-drawer-close {
	font-size: 2.6rem;
	line-height: 1;
	color: #94a3b8;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.cart-drawer-close:hover {
	color: #0f172a;
	background: #f1f5f9;
}

/* 2. Free Shipping Goal */
.free-shipping-goal {
	background: #fdfbf2;
	border-bottom: 1px solid #f6eed1;
	padding: 12px 20px;
	flex-shrink: 0;
}

.goal-message {
	font-size: 1.25rem;
	color: #744210;
	margin-bottom: 6px;
	text-align: center;
	font-weight: 600;
}

.goal-message .unlocked {
	color: #166534;
	font-weight: 800;
}

.goal-progress-bar {
	width: 100%;
	height: 6px;
	background: #e2d9b6;
	border-radius: 8px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: #f5c518;
	border-radius: 8px;
	transition: width 0.3s ease;
}

/* 3. Cart Body & Item Rows */
.cart-drawer-body {
	flex-grow: 1;
	overflow-y: auto;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.corebuild-mini-cart-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 100%;
}

.cart_list.product_list_widget {
	list-style: none;
	margin: 0;
	padding: 0;
	flex-grow: 1;
}

.mini-cart-item-row {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
	align-items: flex-start;
	transition: opacity 0.2s;
}

.mini-cart-item-thumb {
	width: 68px;
	height: 68px;
	background: #f8fafc;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e2e8f0;
}

.mini-cart-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mini-cart-item-info {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mini-cart-item-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.item-title {
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
	margin: 0;
}

.item-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.item-title a:hover {
	color: #2563eb;
}

.mini-cart-remove-btn {
	color: #94a3b8 !important;
	font-size: 1.8rem !important;
	line-height: 1 !important;
	text-decoration: none !important;
	padding: 0 4px !important;
	transition: color 0.2s !important;
}

.mini-cart-remove-btn:hover {
	color: #ef4444 !important;
}

.variation {
	font-size: 1.1rem;
	color: #64748b;
	margin: 0;
}

.mini-cart-item-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 4px;
}

.item-price {
	font-size: 1.4rem;
	font-weight: 800;
	color: #0f172a;
}

/* Interactive Drawer Quantity Stepper */
.mini-cart-qty-ctrl {
	display: inline-flex;
	align-items: center;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	overflow: hidden;
	background: #f8fafc;
	height: 30px;
}

.mini-qty-btn {
	width: 28px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	font-size: 1.4rem;
	font-weight: 700;
	cursor: pointer;
	color: #475569;
	transition: all 0.2s;
	padding: 0;
}

.mini-qty-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.mini-qty-num {
	min-width: 24px;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f172a;
	padding: 0 4px;
}

/* 4. Cart Footer & Action Buttons */
.corebuild-mini-cart-footer {
	border-top: 1px solid #e2e8f0;
	padding-top: 16px;
	margin-top: auto;
	background: #ffffff;
}

.mini-cart-subtotal-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.subtotal-label {
	font-size: 1.35rem;
	font-weight: 800;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.subtotal-amount {
	font-size: 2.1rem;
	font-weight: 900;
	color: #0f172a;
}

.shipping-tax-notice {
	font-size: 1.15rem;
	color: #64748b;
	margin: 0 0 16px;
	line-height: 1.3;
}

.mini-cart-buttons-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.mini-cart-btn {
	width: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border-radius: 8px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
}

.checkout-button {
	height: 48px;
	background: #0f172a;
	color: #ffffff !important;
	border: 1.5px solid #0f172a;
	font-size: 1.35rem;
	font-weight: 900;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.checkout-button:hover {
	background: #1e293b;
	border-color: #1e293b;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
}

.btn-bolt-icon {
	color: #f5c518;
	margin-right: 6px;
	font-size: 1.35rem;
}

.view-cart-button {
	height: 44px;
	background: #ffffff;
	color: #0f172a !important;
	border: 1.5px solid #0f172a;
	font-size: 1.25rem;
	font-weight: 800;
}

.view-cart-button:hover {
	background: #f8fafc;
	border-color: #0f172a;
	color: #000000 !important;
}

/* 5. Empty Cart State */
.empty-cart-state {
	text-align: center;
	padding: 50px 16px;
	margin: auto;
}

.empty-cart-icon {
	font-size: 4.2rem;
	margin-bottom: 12px;
}

.empty-cart-state h3 {
	font-size: 1.8rem;
	font-weight: 900;
	color: #121212;
	margin-bottom: 6px;
	text-transform: uppercase;
}

.empty-cart-state p {
	font-size: 1.35rem;
	color: #64748b;
	margin-bottom: 20px;
}

.start-shopping-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	background: #0f172a;
	color: #ffffff !important;
	font-size: 1.25rem;
	font-weight: 800;
	border-radius: 8px;
	text-decoration: none !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	transition: all 0.2s;
}

.start-shopping-btn:hover {
	background: #1e293b;
	transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE CART DRAWER ALIGNMENT & RESPONSIVE TOUCH OVERHAUL
   ========================================================================== */
@media (max-width: 767px) {
	.cart-drawer-panel {
		width: 90vw !important;
		max-width: 380px !important;
	}
	.cart-drawer-header {
		padding: 14px 18px !important;
	}
	.drawer-title-wrap h3 {
		font-size: 1.45rem !important;
	}
	.free-shipping-goal {
		padding: 10px 18px !important;
	}
	.goal-message {
		font-size: 1.15rem !important;
	}
	.cart-drawer-body {
		padding: 12px 18px !important;
	}
	.mini-cart-item-row {
		padding: 12px 0 !important;
		gap: 12px !important;
	}
	.mini-cart-item-thumb {
		width: 60px !important;
		height: 60px !important;
		border-radius: 8px !important;
	}
	.item-title {
		font-size: 1.25rem !important;
		line-height: 1.25 !important;
	}
	.variation {
		font-size: 1.05rem !important;
	}
	.item-price {
		font-size: 1.35rem !important;
	}
	.corebuild-mini-cart-footer {
		padding-top: 14px !important;
		padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
		background: #ffffff !important;
	}
	.subtotal-label {
		font-size: 1.3rem !important;
	}
	.subtotal-amount {
		font-size: 1.85rem !important;
	}
	.checkout-button {
		height: 46px !important;
		font-size: 1.25rem !important;
		border-radius: 8px !important;
	}
	.view-cart-button {
		height: 42px !important;
		font-size: 1.18rem !important;
		border-radius: 8px !important;
	}
}
