/**
 * Slide-over / Sidebar Cart Styles
 * Matches the reference design (v2 CartDrawer) pixel-for-pixel:
 * - Lucide bag icon in header with subtle (count)
 * - Modern outline circle close button
 * - Clean, borderless free shipping banner with slim blue progress line
 * - Individual cart item cards with border, subtle shadow, thumbnail, meta/sku, pill stepper, bold price
 * - Rounded pill coupon input with tag icon & navy "Apply" button
 * - Subtotal & Total lines
 * - Pill-shaped Apple Pay & Secure Checkout buttons
 * - Three trust badges (256-bit SSL, Secure checkout, Ships < 24h)
 */

/* Overlay */
.aa-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aa-cart-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Drawer Container */
.aa-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 440px;
	background: #ffffff;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	border-left: 1px solid #e2e8f0;
	transform: translate3d(100%, 0, 0);
	visibility: hidden;
	pointer-events: none;
	box-shadow: none;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
}

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

.aa-cart-drawer.is-open {
	transform: translate3d(0, 0, 0);
	visibility: visible;
	pointer-events: auto;
	box-shadow: -12px 0 35px rgba(0, 0, 0, 0.12);
}

body.aa-cart-drawer-active {
	overflow: hidden !important;
}

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

.aa-cart-header-title {
	display: flex;
	align-items: center;
	gap: 9px;
}

.aa-cart-header-bag {
	width: 20px;
	height: 20px;
	stroke: #0284c7;
	flex-shrink: 0;
}

.aa-cart-header-title h2 {
	margin: 0;
	font-size: 18.5px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.aa-cart-count-badge {
	color: #94a3b8;
	font-size: 14.5px;
	font-weight: 400;
	margin-left: 1px;
}

.aa-cart-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	background: #ffffff;
	color: #64748b;
	cursor: pointer;
	padding: 0;
	transition: all 0.15s ease;
}

.aa-cart-close:hover {
	border-color: #0A225C;
	color: #0284C7;
	background: #f8fafc;
}

.aa-cart-close svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2;
}

/* Content Container */
.aa-cart-drawer-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	background: #ffffff;
}

/* Free Shipping Banner */
.aa-cart-shipping-banner {
	padding: 14px 24px 16px;
	background: #ffffff;
	border-bottom: 1px solid #f1f5f9;
	flex-shrink: 0;
}

.aa-ship-text {
	font-size: 13.5px;
	color: #334155;
	margin: 0 0 10px 0;
	font-weight: 500;
	line-height: 1.3;
}

.aa-ship-amount {
	color: #0284C7;
	font-weight: 700;
}

.aa-ship-bold {
	font-weight: 700;
	color: #0f172a;
}

.aa-ship-unlocked {
	color: #0284C7;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.aa-ship-track {
	width: 100%;
	height: 5px;
	background: #e2e8f0;
	border-radius: 9999px;
	overflow: hidden;
}

.aa-ship-bar {
	height: 100%;
	background: #0EA5E9;
	border-radius: 9999px;
	transition: width 0.4s ease;
}

/* Cart Items List */
.aa-cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	margin: 0;
	background: #ffffff;
}

.aa-cart-items::-webkit-scrollbar {
	width: 6px;
}

.aa-cart-items::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

/* Cart Item Card */
.aa-cart-item-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	position: relative;
	transition: opacity 0.2s;
}

.aa-cart-item-card.is-updating {
	opacity: 0.5;
	pointer-events: none;
}

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

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

.aa-cart-item-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

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

.aa-cart-item-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aa-cart-item-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 0;
	color: #94a3b8;
	cursor: pointer;
	transition: color 0.15s;
	flex-shrink: 0;
	margin-top: 1px;
}

.aa-cart-item-remove:hover {
	color: #ef4444;
}

.aa-cart-item-remove svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

.aa-cart-item-meta {
	font-size: 11px;
	font-weight: 700;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	color: #334155;
	margin-top: 3px;
	line-height: 1.3;
}

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

/* Quantity Pill Stepper */
.aa-cart-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #94a3b8;
	border-radius: 9999px;
	height: 32px;
	padding: 0 2px;
	background: #ffffff;
}

.aa-cart-stepper-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	color: #334155;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	border-radius: 9999px;
	padding: 0;
	transition: color 0.15s;
	user-select: none;
}

.aa-cart-stepper-btn:hover {
	color: #0284c7;
}

.aa-cart-stepper-qty {
	width: 26px;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	line-height: 28px;
	user-select: none;
}

.aa-cart-item-price {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	text-align: right;
}

/* Footer Section */
.aa-cart-drawer-footer {
	border-top: 1px solid #e2e8f0;
	background: #ffffff;
	padding: 18px 24px 20px;
	margin-top: auto;
	flex-shrink: 0;
}

/* Coupon Component */
.aa-cart-coupon-wrap {
	margin-bottom: 16px;
}

.aa-cart-coupon-pill {
	display: flex;
	align-items: center;
	gap: 9px;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	background: #ffffff;
	padding: 4px 5px 4px 14px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.aa-cart-coupon-pill:focus-within {
	border-color: #0284c7;
	box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.aa-coupon-icon {
	stroke: #94a3b8;
	flex-shrink: 0;
}

.aa-cart-coupon-input {
	flex: 1;
	min-width: 0;
	border: none !important;
	background: transparent !important;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a !important;
	outline: none !important;
	box-shadow: none !important;
	padding: 4px 0 !important;
}

.aa-cart-coupon-input::placeholder {
	color: #64748b;
	font-weight: 500;
}

.aa-cart-coupon-btn {
	background: #0A225C !important;
	color: #ffffff !important;
	font-size: 13.5px;
	font-weight: 700;
	border: none !important;
	border-radius: 9999px !important;
	padding: 8px 22px !important;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
	line-height: 1.2;
}

.aa-cart-coupon-btn:hover {
	background: #051840 !important;
}

.aa-cart-coupon-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.aa-cart-coupon-notice {
	font-size: 12px;
	font-weight: 600;
	margin-top: 8px;
	padding: 6px 12px;
	border-radius: 6px;
}

.aa-cart-coupon-notice.is-error {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.aa-cart-coupon-notice.is-success {
	background: #f0fdf4;
	color: #16a34a;
	border: 1px solid #bbf7d0;
}

.aa-cart-applied-coupons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.aa-applied-coupon-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	font-weight: 700;
	background: #f0f9ff;
	color: #0369a1;
	border: 1px solid #bae6fd;
	border-radius: 9999px;
	padding: 3px 10px;
}

.aa-remove-coupon-btn {
	background: none !important;
	border: none !important;
	cursor: pointer;
	color: #0369a1 !important;
	font-size: 15px;
	padding: 0 0 0 4px !important;
	line-height: 1;
}

.aa-remove-coupon-btn:hover {
	color: #ef4444 !important;
}

/* Totals Area */
.aa-cart-totals-area {
	margin-bottom: 14px;
}

.aa-cart-subtotal-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
	font-size: 14px;
}

.aa-cart-subtotal-label {
	color: #475569;
	font-weight: 500;
}

.aa-cart-subtotal-val {
	color: #0f172a;
	font-weight: 600;
	font-size: 15px;
}

.aa-cart-discount-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
	font-size: 14px;
	color: #0284c7;
	font-weight: 600;
}

.aa-cart-total-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 6px;
}

.aa-cart-total-label {
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
}

.aa-cart-total-val {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.02em;
}

/* Action Buttons */
.aa-cart-buttons-area {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

.aa-cart-apple-pay-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 48px;
	border-radius: 9999px;
	background: #000000 !important;
	color: #ffffff !important;
	font-size: 16px;
	font-weight: 700;
	border: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: background 0.15s, transform 0.1s;
}

.aa-cart-apple-pay-btn:hover {
	background: #1e293b !important;
	color: #ffffff !important;
}

.aa-cart-apple-pay-btn:active {
	transform: scale(0.99);
}

.aa-cart-secure-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 52px;
	border-radius: 9999px;
	background: #0A225C !important;
	color: #ffffff !important;
	font-size: 17px;
	font-weight: 700;
	border: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(10, 34, 92, 0.28);
	transition: background 0.15s, transform 0.1s;
}

.aa-cart-secure-btn:hover {
	background: #051840 !important;
	color: #ffffff !important;
}

.aa-cart-secure-btn:active {
	transform: scale(0.99);
}

/* Trust Badges */
.aa-cart-trust-badges {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	font-size: 11.5px;
	font-weight: 600;
	color: #334155;
	margin-top: 10px;
}

.aa-cart-trust-badges span {
	display: flex;
	align-items: center;
	gap: 5px;
}

.aa-cart-trust-badges svg {
	width: 13px;
	height: 13px;
	stroke: #0284c7;
	flex-shrink: 0;
}

/* Empty State */
.aa-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 100%;
	padding: 40px 24px;
}

.aa-cart-empty-icon {
	margin-bottom: 16px;
}

.aa-cart-empty-title {
	font-size: 16px;
	font-weight: 600;
	color: #64748b;
	margin: 0 0 20px 0;
}

.aa-cart-btn-browse {
	display: inline-block;
	padding: 10px 24px;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	background: #ffffff;
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.15s;
}

.aa-cart-btn-browse:hover {
	border-color: #0A225C;
	color: #0284C7;
	background: #f8fafc;
}

/* Elementor Menu Cart Match */
.elementor-menu-cart__container .elementor-menu-cart__main {
	font-family: inherit !important;
	box-shadow: -12px 0 35px rgba(0, 0, 0, 0.12) !important;
}
.elementor-menu-cart__header {
	padding: 20px 24px !important;
	border-bottom: 1px solid #f1f5f9 !important;
}
.elementor-menu-cart__close-button {
	width: 36px !important;
	height: 36px !important;
	border-radius: 9999px !important;
	border: 1px solid #cbd5e1 !important;
}
