/**
 * WP Travel Engine - Modern Cart Page Styles
 * 
 * @package WP Travel Engine
 * @since 6.6.8
 */

/* ==========================================================================
   Cart Page Container
   ========================================================================== */

.wte-cart-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.wte-cart-notice {
	padding: 16px 20px;
	margin-bottom: 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 12px;
	animation: wte-slide-down 0.3s ease-out;
}

.wte-cart-notice--success {
	background: #c6f6d5;
	color: #22543d;
	border-left: 4px solid #38a169;
}

.wte-cart-notice--error {
	background: #fed7d7;
	color: #742a2a;
	border-left: 4px solid #e53e3e;
}

@keyframes wte-slide-down {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   Empty Cart
   ========================================================================== */

.wte-cart-empty {
	text-align: center;
	padding: 80px 20px;
	background: #f8f9fa;
	border-radius: 16px;
}

.wte-cart-empty__icon {
	margin-bottom: 24px;
	color: #cbd5e0;
}

.wte-cart-empty__icon svg {
	width: 120px;
	height: 120px;
}

.wte-cart-empty__title {
	font-size: 28px;
	font-weight: 700;
	color: #2d3748;
	margin: 0 0 12px;
}

.wte-cart-empty__text {
	font-size: 16px;
	color: #718096;
	margin: 0 0 32px;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.wte-cart-empty__button {
	display: inline-block;
	padding: 14px 32px;
	background: #1CA8CB;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 16px;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wte-cart-empty__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
	color: #fff;
	text-decoration: none;
}

/* ==========================================================================
   Cart Header
   ========================================================================== */

.wte-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 2px solid #e2e8f0;
}

.wte-cart-title {
	font-size: 32px;
	font-weight: 700;
	color: #2d3748;
	margin: 0;
}

.wte-cart-count {
	display: inline-block;
	padding: 8px 16px;
	background: #edf2f7;
	color: #4a5568;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
}

/* ==========================================================================
   Cart Layout
   ========================================================================== */

.wte-cart-layout {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 32px;
	align-items: start;
}

@media (max-width: 1024px) {
	.wte-cart-layout {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Cart Items
   ========================================================================== */

.wte-cart-items {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.wte-cart-item {
	display: flex;
	gap: 20px;
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.3s;
	position: relative;
}

.wte-cart-item:hover {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.wte-cart-item__image {
	position: relative;
	width: 180px;
	height: 180px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
}

.wte-cart-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wte-cart-item__image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
	color: #a0aec0;
}

.wte-cart-item__image-placeholder svg {
	width: 80px;
	height: 80px;
	opacity: 0.5;
}

.wte-cart-item__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wte-cart-item__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wte-cart-item__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.wte-cart-item__info {
	flex: 1;
}

.wte-cart-item__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.wte-cart-item__title a {
	color: #2d3748;
	text-decoration: none;
	transition: color 0.2s;
}

.wte-cart-item__title a:hover {
	color: #1CA8CB;
}

.wte-cart-item__code {
	display: inline-block;
	padding: 4px 8px;
	background: #edf2f7;
	color: #718096;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}

.wte-cart-item__remove {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	color: #718096;
}

.wte-cart-item__remove:hover {
	background: #fee;
	border-color: #fc8181;
	color: #e53e3e;
}

/* ==========================================================================
   Cart Item Details
   ========================================================================== */

.wte-cart-item__details {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	padding: 16px 0;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}

.wte-cart-item__detail {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wte-cart-item__detail-label {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #718096;
	font-size: 14px;
	font-weight: 500;
}

.wte-cart-item__detail-label svg {
	color: #a0aec0;
	flex-shrink: 0;
}

.wte-cart-item__detail-value {
	color: #2d3748;
	font-size: 14px;
	font-weight: 600;
}

/* ==========================================================================
   Pax Breakdown
   ========================================================================== */

.wte-cart-item__pax-breakdown {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px dashed #e2e8f0;
	margin-top: 4px;
}

.wte-cart-item__pax-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f7fafc;
	border-radius: 6px;
	font-size: 13px;
	color: #4a5568;
}

.wte-cart-item__pax-item strong {
	color: #2d3748;
}

/* ==========================================================================
   Extras
   ========================================================================== */

.wte-cart-item__extras {
	grid-column: 1 / -1;
	padding-top: 12px;
	border-top: 1px dashed #e2e8f0;
	margin-top: 4px;
}

.wte-cart-item__extras-title {
	font-size: 14px;
	font-weight: 600;
	color: #4a5568;
	margin: 0 0 8px;
}

.wte-cart-item__extra {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 13px;
	color: #718096;
}

/* ==========================================================================
   Cart Item Footer
   ========================================================================== */

.wte-cart-item__footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.wte-cart-item__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.wte-cart-item__price-label {
	font-size: 14px;
	color: #718096;
	font-weight: 500;
}

.wte-cart-item__price-value {
	font-size: 24px;
	font-weight: 700;
	color: #1CA8CB;
}

/* ==========================================================================
   Cart Summary
   ========================================================================== */

.wte-cart-summary {
	position: sticky;
	top: 20px;
}

.wte-cart-summary__inner {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wte-cart-summary__title {
	font-size: 22px;
	font-weight: 700;
	color: #2d3748;
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e2e8f0;
}

.wte-cart-summary__content {
	margin-bottom: 24px;
}

.wte-cart-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	font-size: 15px;
}

.wte-cart-summary__row--discount {
	color: #48bb78;
}

.wte-cart-summary__row--total {
	padding-top: 16px;
	font-size: 18px;
	font-weight: 700;
}

.wte-cart-summary__row--total .wte-cart-summary__value {
	font-size: 24px;
	color: #1CA8CB;
}

.wte-cart-summary__label {
	color: #4a5568;
	font-weight: 500;
}

.wte-cart-summary__value {
	color: #2d3748;
	font-weight: 700;
}

.wte-cart-summary__divider {
	height: 1px;
	background: #e2e8f0;
	margin: 12px 0;
}

.wte-cart-summary__tax-note {
	font-size: 12px;
	color: #718096;
	margin: 8px 0 0;
	text-align: right;
	font-style: italic;
}

/* ==========================================================================
   Summary Actions
   ========================================================================== */

.wte-cart-summary__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.wte-cart-summary__checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 24px;
	background: #1CA8CB;
	color: #fff;
	text-decoration: none !important;
	border-radius: 8px;
	font-weight: 700;
	font-size: 16px;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	text-align: center;
}

.wte-cart-summary__checkout-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px #1CA8CB;
	color: #fff;
	text-decoration: none !important;
}

.wte-cart-summary__continue-btn {
	display: block;
	padding: 12px 24px;
	background: #fff;
	color: #1CA8CB;
	text-decoration: none;
	border: 2px solid #1CA8CB;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	text-align: center;
	transition: all 0.2s;
	text-decoration: none !important;
}

.wte-cart-summary__continue-btn:hover {
	background: #1CA8CB;
	color: #fff;
	text-decoration: none !important;
}

/* ==========================================================================
   Summary Info
   ========================================================================== */

.wte-cart-summary__info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
}

.wte-cart-summary__info-item {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #718096;
	font-size: 13px;
}

.wte-cart-summary__info-item svg {
	color: #48bb78;
	flex-shrink: 0;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.wte-cart-item.is-removing {
	opacity: 0.5;
	pointer-events: none;
	position: relative;
}

.wte-cart-item.is-removing::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #1CA8CB;
	border-radius: 50%;
	animation: wte-spin 1s linear infinite;
}

@keyframes wte-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.wte-cart-page {
		padding: 20px 15px;
	}

	.wte-cart-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.wte-cart-title {
		font-size: 24px;
	}

	.wte-cart-item {
		flex-direction: column;
		gap: 16px;
	}

	.wte-cart-item__image {
		width: 100%;
		height: 200px;
	}

	.wte-cart-item__details {
		grid-template-columns: 1fr;
	}

	.wte-cart-item__footer {
		justify-content: space-between;
	}

	.wte-cart-summary {
		position: static;
	}

	.wte-cart-empty__title {
		font-size: 22px;
	}

	.wte-cart-empty__icon svg {
		width: 80px;
		height: 80px;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.wte-cart-item__remove,
	.wte-cart-summary__actions {
		display: none;
	}

	.wte-cart-item {
		break-inside: avoid;
	}
}

