/**
 * Ultra Professional & Compact Cart Design
 * Modern, Corporate, and Beautiful
 */

/* ============================================
   CART HEADER - Removed, using theme default
   ============================================ */

/* ============================================
   CART CONTAINER
   ============================================ */
.cz-modern-cart-container {
	padding: 0 15px 0 !important;
	background: #ffffff;
	margin-bottom: 0 !important;
	padding-bottom: var(--cart-footer-spacing, 200px) !important;
}

/* Ensure cart page has enough space for footer */
body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cz-modern-cart-container {
	min-height: calc(100vh - var(--header-height, 200px) - var(--footer-height, 400px) - 100px);
}

.cz-modern-cart-container.pb-5 {
	padding-bottom: 40px !important;
}

.cz-modern-cart-container.mb-2,
.cz-modern-cart-container.mb-md-4 {
	margin-bottom: 0 !important;
}

.cz-cart-items-section {
	background: #fafbfc;
	border-radius: 12px;
	padding: 15px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	margin-bottom: 15px;
}

/* ============================================
   CART ITEMS
   ============================================ */
.cz-cart-items-wrapper {
	background: transparent;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.cz-cart-item {
	display: flex;
	gap: 15px;
	padding: 15px;
	margin-bottom: 12px;
	background: #fafbfc;
	border: 1px solid #e3e9ef;
	border-radius: 12px;
	transition: opacity 0.3s ease-out, transform 0.3s ease-out, height 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
	position: relative;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}

.cz-cart-item:hover {
	border-color: #dae1e7;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
	background: #ffffff;
}

.cz-cart-item:last-child {
	margin-bottom: 0;
}

/* Product Image */
.cz-cart-item-image {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #e3e9ef;
}

.cz-cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cz-cart-item:hover .cz-cart-item-image img {
	transform: scale(1.05);
}

.cz-cart-item-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.cz-sale-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #f34770;
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(243, 71, 112, 0.4);
}

/* Product Details */
.cz-cart-item-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.cz-cart-item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
}

.cz-cart-item-info {
	flex: 1;
}

.cz-product-name {
	font-size: 14px;
	font-weight: 600;
	color: #373f50;
	margin: 0 0 6px 0;
	line-height: 1.4;
}

.cz-product-name a {
	color: #2d3748;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cz-product-name a:hover {
	color: #fe696a;
}

.cz-product-meta {
	font-size: 12px;
	color: #7d879c;
	line-height: 1.4;
}

.cz-product-meta dl {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.cz-product-meta dt,
.cz-product-meta dd {
	display: inline;
	margin: 0;
}

.cz-product-meta dt::after {
	content: ':';
	margin-right: 5px;
}

.cz-product-meta p {
	margin: 5px 0 0;
}

/* Remove Button */
.cz-cart-item-remove {
	flex-shrink: 0;
}

.cz-remove-btn {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid #fed7d7;
	color: #fc8181;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
}

.cz-remove-btn:hover {
	background: #fc8181;
	color: #ffffff;
	transform: scale(1.1);
	border-color: #fc8181;
	box-shadow: 0 2px 8px rgba(252, 129, 129, 0.3);
}

/* Footer with Price, Quantity, Subtotal */
.cz-cart-item-footer {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 15px;
	align-items: flex-start;
	padding-top: 12px;
	border-top: 1px solid #e3e9ef;
}

.cz-cart-item-price,
.cz-cart-item-subtotal {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-start;
}

.cz-price-label,
.cz-subtotal-label {
	font-size: 12px;
	color: #7d879c;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.cz-price-value,
.cz-subtotal-value {
	font-size: 15px;
	font-weight: 700;
	color: #373f50;
	line-height: 1.4;
}

.cz-price-value .woocommerce-Price-amount,
.cz-subtotal-value .woocommerce-Price-amount {
	color: #fe696a;
}

/* Quantity Input */
.cz-cart-item-quantity {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 16px;
}

.cz-quantity-wrapper {
	display: flex;
}

.cz-qty-input {
	width: 80px !important;
	height: 38px;
	text-align: center;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	color: #2d3748;
	transition: all 0.3s ease;
	background: #ffffff;
}

.cz-qty-input:focus {
	outline: none;
	border-color: #4e54c8;
	box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

.cz-quantity-single {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	background: #edf2f7;
	border-radius: 10px;
	font-weight: 700;
	color: #2d3748;
}

/* Backorder Notice */
.cz-backorder-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 15px;
	background: #bee3f8;
	border-radius: 8px;
	color: #2c5282;
	font-size: 13px;
	font-weight: 600;
}

.cz-backorder-notice i {
	font-size: 16px;
}

/* ============================================
   CART ACTIONS
   ============================================ */
.cz-cart-actions {
	background: #f0f2f5;
	border-radius: 12px;
	padding: 18px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	border: 1px solid #e3e9ef;
	display: flex;
	gap: 15px;
	align-items: center;
	flex-wrap: wrap;
}

/* Coupon Section */
.cz-coupon-section {
	flex: 1;
	min-width: 300px;
}

.cz-coupon-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #e9ecef;
	border: 1px solid #dae1e7;
	border-radius: 10px;
	padding: 5px;
	transition: all 0.3s ease;
}

.cz-coupon-wrapper:focus-within {
	border-color: #4e54c8;
	box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
	background: #f0f2f5;
}

.cz-coupon-icon-wrapper {
	width: 36px;
	height: 36px;
	background: #4e54c8;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cz-coupon-icon-wrapper i {
	color: #ffffff;
	font-size: 20px;
}

.cz-coupon-input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 8px 5px;
	font-size: 14px;
	color: #2d3748;
	font-weight: 600;
	outline: none;
}

.cz-coupon-input::placeholder {
	color: #a0aec0;
	font-weight: 500;
}

.cz-coupon-btn {
	padding: 8px 16px;
	background: #4e54c8;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.cz-coupon-btn:hover {
	background: #3d42a8;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(78, 84, 200, 0.3);
}

/* Update Cart Button */
.cz-update-cart-btn {
	padding: 8px 16px;
	background: #373f50;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.cz-update-cart-btn:hover {
	background: #2b3445;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(55, 63, 80, 0.3);
}

.cz-update-cart-btn i {
	font-size: 18px;
}

/* ============================================
   CART SIDEBAR - SUMMARY
   ============================================ */
.cz-cart-sidebar {
	position: static;
	height: auto;
}

.cz-cart-summary {
	background: #f3f5f9;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	border: 1px solid #e3e9ef;
	margin-top: 40px;
	margin-bottom: 0;
	position: relative;
	z-index: 1;
}

.cz-cart-summary .cart_totals {
	background: transparent;
	padding: 0;
}

.cz-cart-summary .cart_totals h2 {
	font-size: 16px;
	font-weight: 600;
	color: #373f50;
	margin: 0 0 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e3e9ef;
}

.cz-cart-summary .shop_table {
	border: none;
	background: transparent;
}

.cz-cart-summary .shop_table th {
	font-size: 12px;
	color: #7d879c;
	font-weight: 600;
	padding: 8px 0;
	border: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.4;
}

.cz-cart-summary .shop_table td {
	font-size: 15px;
	color: #373f50;
	font-weight: 600;
	padding: 8px 0;
	border: none;
	text-align: right;
	line-height: 1.4;
}

.cz-cart-summary .shop_table .cart-subtotal,
.cz-cart-summary .shop_table .order-total {
	border-top: 1px solid #e3e9ef;
}

.cz-cart-summary .shop_table .order-total th,
.cz-cart-summary .shop_table .order-total td {
	font-size: 16px !important;
	font-weight: 700;
	padding-top: 10px;
	padding-bottom: 0;
	color: #fe696a;
	line-height: 1.4;
}

.cz-cart-summary .shop_table .order-total .cz-total-label,
.cz-cart-summary .shop_table .order-total .cz-total-label span,
.cz-cart-summary .shop_table .order-total .cz-total-amount {
	font-size: 14px !important;
}

.cz-cart-summary .wc-proceed-to-checkout {
	margin-top: 8px !important;
	padding-top: 10px !important;
	border-top: 1px solid #e3e9ef;
}

.cz-cart-summary .wc-proceed-to-checkout .checkout-button {
	width: 100%;
	padding: 10px 18px;
	background: #fe696a;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-shadow: 0 2px 8px rgba(254, 105, 106, 0.3);
}

.cz-cart-summary .wc-proceed-to-checkout .checkout-button:hover {
	background: #fd5556;
	transform: translateY(-1px);
	box-shadow: 0 3px 12px rgba(254, 105, 106, 0.4);
	color: #ffffff;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes cartBounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1199px) {
	.cz-cart-items-section {
		padding-right: 15px;
	}
	
	.cz-cart-sidebar {
		position: static;
		margin-top: 0;
	}
}

/* Tablet */
@media (max-width: 991px) {
	.cz-modern-cart-container {
		background: #ffffff;
		padding: 0 15px 0 !important;
		padding-bottom: var(--cart-footer-spacing, 150px) !important;
	}
	
	.cz-cart-items-section {
		margin-bottom: 20px;
		padding: 15px;
	}
	
	.cz-cart-summary {
		margin-top: 20px;
		margin-bottom: 0;
	}
	
	.cz-cart-item {
		padding: 12px;
		gap: 12px;
	}
	
	.cz-cart-item-image {
		width: 90px;
		height: 90px;
	}
	
	.cz-product-name {
		font-size: 13px;
	}
	
	.cz-price-value,
	.cz-subtotal-value {
		font-size: 14px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.cz-modern-cart-container {
		padding: 0 10px 0 !important;
		padding-bottom: var(--cart-footer-spacing, 150px) !important;
	}
	
	.cz-cart-items-section {
		padding: 12px;
		margin-bottom: 15px;
		border-radius: 10px;
	}
	
	.cz-cart-items-wrapper {
		padding: 0;
		gap: 10px;
	}
	
	.cz-cart-item {
		flex-direction: row;
		padding: 10px;
		margin-bottom: 10px;
		gap: 10px;
		border-radius: 10px;
	}
	
	.cz-cart-item-image {
		width: 70px;
		height: 70px;
		border-radius: 8px;
		flex-shrink: 0;
	}
	
	.cz-cart-item-details {
		flex: 1;
		min-width: 0;
		gap: 8px;
	}
	
	.cz-cart-item-header {
		gap: 8px;
	}
	
	.cz-product-name {
		font-size: 12px;
		margin: 0 0 4px 0;
		line-height: 1.3;
	}
	
	.cz-product-meta {
		font-size: 11px;
	}
	
	.cz-cart-item-remove {
		position: absolute;
		top: 8px;
		right: 8px;
	}
	
	.cz-remove-btn {
		width: 24px;
		height: 24px;
		font-size: 12px;
	}
	
	.cz-cart-item-footer {
		grid-template-columns: 1fr auto 1fr;
		gap: 8px;
		padding-top: 8px;
		margin-top: 8px;
	}
	
	.cz-cart-item-price,
	.cz-cart-item-subtotal {
		gap: 2px;
	}
	
	.cz-price-label,
	.cz-subtotal-label {
		font-size: 10px;
		margin-bottom: 2px;
	}
	
	.cz-price-value,
	.cz-subtotal-value {
		font-size: 13px;
	}
	
	.cz-cart-item-quantity {
		padding-top: 12px;
	}
	
	.cz-qty-input {
		width: 60px !important;
		height: 32px;
		font-size: 12px;
		border-radius: 6px;
	}
	
	.cz-cart-actions {
		flex-direction: column;
		padding: 15px;
		gap: 12px;
		border-radius: 10px;
	}
	
	.cz-coupon-section {
		width: 100%;
		min-width: auto;
	}
	
	.cz-coupon-wrapper {
		padding: 4px;
		gap: 8px;
		border-radius: 8px;
	}
	
	.cz-coupon-icon-wrapper {
		width: 32px;
		height: 32px;
	}
	
	.cz-coupon-input {
		font-size: 12px;
		padding: 6px 4px;
	}
	
	.cz-coupon-btn {
		padding: 6px 12px;
		font-size: 11px;
	}
	
	.cz-update-cart-btn {
		width: 100%;
		justify-content: center;
		padding: 8px 14px;
		font-size: 12px;
	}
	
	.cz-cart-summary {
		padding: 15px;
		margin-top: 15px;
		margin-bottom: 0;
		border-radius: 10px;
	}
	
	.cz-cart-summary .cart_totals h2 {
		font-size: 14px;
		margin: 0 0 12px;
		padding-bottom: 8px;
	}
	
	.cz-cart-summary .shop_table th {
		font-size: 11px;
		padding: 6px 0;
	}
	
	.cz-cart-summary .shop_table td {
		font-size: 13px;
		padding: 6px 0;
	}
	
	.cz-cart-summary .shop_table .order-total th,
	.cz-cart-summary .shop_table .order-total td {
		font-size: 14px !important;
		padding-top: 8px;
	}
	
	.cz-cart-summary .wc-proceed-to-checkout {
		margin-top: 10px !important;
		padding-top: 10px !important;
	}
	
	.cz-cart-summary .wc-proceed-to-checkout .checkout-button {
		padding: 10px 16px;
		font-size: 12px;
		gap: 6px;
	}
}

@media (max-width: 480px) {
	.cz-modern-cart-container {
		padding: 0 8px 0 !important;
		padding-bottom: var(--cart-footer-spacing, 150px) !important;
	}
	
	.cz-cart-summary {
		margin-bottom: 0;
	}
	
	.cz-cart-items-section {
		padding: 10px;
	}
	
	.cz-cart-item {
		padding: 8px;
	}
	
	.cz-cart-item-image {
		width: 60px;
		height: 60px;
	}
	
	.cz-product-name {
		font-size: 11px;
	}
	
	.cz-price-value,
	.cz-subtotal-value {
		font-size: 12px;
	}
	
	.cz-qty-input {
		width: 50px !important;
		height: 28px;
		font-size: 11px;
	}
	
	.cz-cart-summary {
		padding: 12px;
	}
	
	.cz-cart-summary .shop_table td {
		font-size: 12px;
	}
	
	.cz-cart-summary .shop_table .order-total th,
	.cz-cart-summary .shop_table .order-total td {
		font-size: 13px !important;
	}
}

/* ============================================
   LOADING STATE
   ============================================ */
.woocommerce-cart-form.processing {
	opacity: 0.6;
	pointer-events: none;
}

.woocommerce-cart-form.processing .cz-cart-item {
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* ============================================
   NOTICES & MESSAGES
   ============================================ */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	border-radius: 12px;
	padding: 15px 20px;
	margin-bottom: 20px;
	border-left-width: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	animation: slideInDown 0.5s ease;
}

.woocommerce-message {
	background: #f0fff4;
	border-left-color: #48bb78;
	color: #22543d;
}

.woocommerce-error {
	background: #fff5f5;
	border-left-color: #fc8181;
	color: #742a2a;
}

.woocommerce-info {
	background: #ebf8ff;
	border-left-color: #4299e1;
	color: #2c5282;
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   SUCCESS HIGHLIGHT ANIMATION
   ============================================ */
.cz-cart-summary.highlight-success {
	animation: highlightPulse 0.6s ease;
}

@keyframes highlightPulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
	}
	50% {
		transform: scale(1.02);
		box-shadow: 0 4px 30px rgba(102, 126, 234, 0.3);
	}
}

