/**
 * Cart Popup Styles
 * Animated popup when product is added to cart
 * 
 * @package Understrap
 */

/* Overlay */
.cart-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.cart-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Popup Container */
.cart-popup {
	position: fixed;
	top: 0;
	right: -450px;
	width: 100%;
	max-width: 420px;
	height: 100vh;
	background: #fff;
	z-index: 9999;
	box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
	transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	display: flex;
	flex-direction: column;
}

.cart-popup.active {
	right: 0;
}

/* Popup Header */
.cart-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	border-bottom: 1px solid #e5e5e5;
	background: #faf8f6;
}

.cart-popup-title {
	font-family: "Georgia", serif;
	font-size: 18px;
	font-weight: 400;
	font-style: italic;
	color: #333;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.cart-popup-title .checkmark {
	width: 24px;
	height: 24px;
	background: #4caf50;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: popIn 0.4s ease;
}

.cart-popup-title .checkmark svg {
	width: 14px;
	height: 14px;
	stroke: #fff;
}

@keyframes popIn {
	0% { transform: scale(0); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

.cart-popup-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #666;
	transition: color 0.2s;
}

.cart-popup-close:hover {
	color: #333;
}

/* Added Product */
.cart-popup-product {
	display: flex;
	gap: 15px;
	padding: 20px 25px;
	border-bottom: 1px solid #e5e5e5;
	animation: slideIn 0.4s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.cart-popup-product-image {
	width: 80px;
	height: 100px;
	flex-shrink: 0;
	background: #f5f5f5;
	border-radius: 4px;
	overflow: hidden;
}

.cart-popup-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cart-popup-product-info {
	flex: 1;
}

.cart-popup-product-title {
	font-family: "Georgia", serif;
	font-size: 14px;
	font-style: italic;
	color: #333;
	margin: 0 0 5px 0;
}

.cart-popup-product-variant {
	font-size: 12px;
	color: #888;
	margin: 0 0 8px 0;
	font-family: "Montserrat", sans-serif;
}

.cart-popup-product-price {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	font-family: "Montserrat", sans-serif;
}

/* Cart Summary */
.cart-popup-summary {
	padding: 20px 25px;
	background: #faf8f6;
	border-bottom: 1px solid #e5e5e5;
}

.cart-popup-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-family: "Montserrat", sans-serif;
	font-size: 13px;
}

.cart-popup-summary-row:last-child {
	margin-bottom: 0;
}

.cart-popup-summary-row.total {
	font-weight: 600;
	font-size: 15px;
	padding-top: 10px;
	border-top: 1px solid #e5e5e5;
	margin-top: 10px;
}

/* Free Shipping Progress */
.cart-popup-shipping {
	padding: 15px 25px;
	background: #f0f7f0;
	border-bottom: 1px solid #e5e5e5;
}

.shipping-progress-text {
	font-size: 12px;
	color: #333;
	margin-bottom: 8px;
	font-family: "Montserrat", sans-serif;
}

.shipping-progress-text strong {
	color: #4caf50;
}

.shipping-progress-bar {
	height: 4px;
	background: #ddd;
	border-radius: 2px;
	overflow: hidden;
}

.shipping-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #c4a07a, #4caf50);
	border-radius: 2px;
	transition: width 0.5s ease;
}

/* Cart Actions */
.cart-popup-actions {
	padding: 20px 25px;
	margin-top: auto;
}

.cart-popup-btn {
	display: block;
	width: 100%;
	padding: 14px 20px;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.3s ease;
}

.cart-popup-btn-primary {
	background: #333;
	color: #fff;
	margin-bottom: 10px;
}

.cart-popup-btn-primary:hover {
	background: #000;
	color: #fff;
}

.cart-popup-btn-secondary {
	background: transparent;
	color: #333;
	border: 1px solid #333;
}

.cart-popup-btn-secondary:hover {
	background: #333;
	color: #fff;
}

.cart-popup-continue {
	display: block;
	text-align: center;
	margin-top: 15px;
	font-size: 12px;
	color: #888;
	text-decoration: underline;
	font-family: "Montserrat", sans-serif;
	cursor: pointer;
	background: none;
	border: none;
	width: 100%;
}

.cart-popup-continue:hover {
	color: #333;
}

/* Responsive */
@media (max-width: 480px) {
	.cart-popup {
		max-width: 100%;
	}
}
