/* Keyframe Animations */
@keyframes mmcShimmer {
	0% { background-position: -200px 0; }
	100% { background-position: 200px 0; }
}

@keyframes mmcBounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.15); }
}

@keyframes mmcWiggle {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(-8deg); }
	75% { transform: rotate(8deg); }
}

@keyframes mmcFadeInUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mmc-cart-notice-container {
	margin: 0 0 2rem 0;
	border-radius: 12px;
	padding: 20px 24px;
	font-family: inherit;
	transition: all 0.3s ease;
	position: relative;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
	animation: mmcFadeInUp 0.4s ease-out;
}

/* Icon Animations */
.mmc-status-warning .mmc-notice-icon {
	background: #ffe58f;
	color: #d48800;
	animation: mmcWiggle 2.5s infinite ease-in-out;
}

.mmc-status-success .mmc-notice-icon {
	background: #b7eb8f;
	color: #389e0d;
	animation: mmcBounce 0.6s ease;
}

/* Animated Progress Bar */
.mmc-progress-bar-fill {
	height: 100%;
	border-radius: 10px;
	transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
	overflow: hidden;
}

.mmc-progress-bar-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.35) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	background-size: 200px 100%;
	animation: mmcShimmer 2s infinite linear;
}

/* Staggered Entrance for Cards */
.mmc-product-card {
	animation: mmcFadeInUp 0.4s ease-out backwards;
}

.mmc-product-card:nth-child(1) { animation-delay: 0.05s; }
.mmc-product-card:nth-child(2) { animation-delay: 0.1s; }
.mmc-product-card:nth-child(3) { animation-delay: 0.15s; }
.mmc-product-card:nth-child(4) { animation-delay: 0.2s; }


/* Warning State (Under Minimum) */
.mmc-cart-notice-container.mmc-status-warning {
	background: linear-gradient(135deg, #fffcf5 0%, #fff7e6 100%);
	border: 1px solid #ffd591;
	color: #432400;
}

/* Success State (Reached Minimum) */
.mmc-cart-notice-container.mmc-status-success {
	background: linear-gradient(135deg, #f6ffed 0%, #e6f7ff 100%);
	border: 1px solid #b7eb8f;
	color: #135200;
}

/* Header Notice Area */
.mmc-notice-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
}

.mmc-notice-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mmc-status-warning .mmc-notice-icon {
	background: #ffe58f;
	color: #d48800;
}

.mmc-status-success .mmc-notice-icon {
	background: #b7eb8f;
	color: #389e0d;
}

.mmc-notice-content {
	flex: 1;
}

.mmc-notice-title {
	margin: 0 0 6px 0 !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: inherit !important;
}

.mmc-notice-desc {
	margin: 0 !important;
	font-size: 0.95rem;
	line-height: 1.5;
	opacity: 0.9;
}

/* Progress Bar */
.mmc-progress-wrapper {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.mmc-progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.mmc-progress-label {
	font-weight: 600;
}

.mmc-progress-values strong {
	font-size: 1rem;
}

.mmc-progress-bar-bg {
	width: 100%;
	height: 12px;
	background: rgba(0, 0, 0, 0.07);
	border-radius: 10px;
	overflow: hidden;
	position: relative;
}

.mmc-progress-bar-fill {
	height: 100%;
	border-radius: 10px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mmc-status-warning .mmc-progress-bar-fill {
	background: linear-gradient(90deg, #fa8c16 0%, #fa541c 100%);
}

.mmc-status-success .mmc-progress-bar-fill {
	background: linear-gradient(90deg, #52c41a 0%, #389e0d 100%);
}

/* Suggested Products Header & Actions */
.mmc-shop-action {
	flex-shrink: 0;
	margin-left: auto;
}

.mmc-btn-continue-shopping {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	color: #262626;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
	transition: all 0.2s ease;
	white-space: nowrap;
}

.mmc-btn-continue-shopping:hover {
	border-color: var(--theme-palette-color-1, #1890ff);
	color: var(--theme-palette-color-1, #1890ff);
	background: #f0f7ff;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(24, 144, 255, 0.12);
}

.mmc-suggested-section {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mmc-suggested-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.mmc-suggested-header h5 {
	margin: 0 !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	color: #262626 !important;
	display: flex;
	align-items: center;
	gap: 6px;
}

.mmc-link-more-products {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--theme-palette-color-1, #1890ff);
	text-decoration: none !important;
	transition: color 0.2s ease, transform 0.2s ease;
}

.mmc-link-more-products:hover {
	color: var(--theme-palette-color-2, #096dd9);
	text-decoration: underline !important;
}

.mmc-suggested-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

/* Product Card */
.mmc-product-card {
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.mmc-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	border-color: #d9d9d9;
}

.mmc-product-thumb {
	display: block;
	width: 100%;
	height: 130px;
	text-align: center;
	margin-bottom: 10px;
	overflow: hidden;
	border-radius: 6px;
}

.mmc-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.mmc-product-card:hover .mmc-product-thumb img {
	transform: scale(1.05);
}

.mmc-product-info {
	margin-bottom: 12px;
	flex-grow: 1;
}

.mmc-product-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.88rem;
	font-weight: 600;
	color: #262626;
	text-decoration: none;
	line-height: 1.35;
	margin-bottom: 6px;
}

.mmc-product-title:hover {
	color: var(--theme-palette-color-1, #1890ff);
}

.mmc-product-price {
	font-size: 0.95rem;
	font-weight: 700;
	color: #1f1f1f;
}

.mmc-product-price del {
	font-size: 0.82rem;
	opacity: 0.6;
	margin-right: 4px;
}

.mmc-product-action {
	margin-top: auto;
}

.mmc-btn-add-cart {
	width: 100%;
	padding: 8px 12px;
	background: var(--theme-button-initial-color, #1890ff);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.mmc-btn-add-cart:hover {
	background: var(--theme-button-hover-color, #096dd9);
	opacity: 0.95;
}

.mmc-btn-add-cart:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.mmc-out-of-stock {
	display: block;
	text-align: center;
	font-size: 0.82rem;
	color: #ff4d4f;
	font-weight: 600;
	padding: 6px;
}

/* Disabled Checkout Button Override */
.button.checkout-button.mmc-checkout-disabled,
.button.checkout-button.mmc-checkout-disabled:hover,
#place_order.mmc-checkout-disabled,
#place_order.mmc-checkout-disabled:hover {
	background-color: #d9d9d9 !important;
	border-color: #d9d9d9 !important;
	color: #8c8c8c !important;
	cursor: not-allowed !important;
	pointer-events: auto !important;
	opacity: 0.7 !important;
	box-shadow: none !important;
}

@media (max-width: 600px) {
	.mmc-cart-notice-container {
		padding: 16px;
	}
	.mmc-notice-header {
		flex-direction: column;
		gap: 10px;
	}
	.mmc-suggested-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
}
