/* ShipFree Nudge — banner, card, and progress styles */

/* ── Banner wrapper ─────────────────────────────────────────── */
.sfn-banner {
	background: linear-gradient(135deg, #fff7ed 0%, #fff3e8 100%);
	border: 1px solid #fcd9b0;
	border-radius: 14px;
	padding: 18px 20px 14px;
	margin-bottom: 24px;
	font-family: inherit;
	box-sizing: border-box;
	box-shadow: 0 2px 12px rgba(234, 88, 12, 0.08);
}

/* ── Success state ──────────────────────────────────────────── */
.sfn-banner--success {
	background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
	border-color: #6ee7b7;
	padding: 13px 18px;
	box-shadow: 0 2px 12px rgba(22, 163, 74, 0.08);
}

.sfn-banner--success p {
	margin: 0;
	color: #065f46;
	font-size: 15px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sfn-banner--success .sfn-icon {
	flex-shrink: 0;
	color: #10b981;
}

/* ── Header row ─────────────────────────────────────────────── */
.sfn-banner__header {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 14px;
}

.sfn-banner__icon {
	flex-shrink: 0;
	color: #ea580c;
	margin-top: 2px;
	filter: drop-shadow(0 1px 2px rgba(234, 88, 12, 0.2));
}

.sfn-banner__text {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #7c2d12;
	line-height: 1.45;
}

/* ── Progress bar ───────────────────────────────────────────── */
.sfn-banner__progress {
	width: 100%;
	height: 9px;
	background: #fed7aa;
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 16px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.sfn-banner__progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #f97316 0%, #fb923c 60%, #fbbf24 100%);
	border-radius: 99px;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 6px rgba(249, 115, 22, 0.4);
}

/* ── Product cards grid ─────────────────────────────────────── */
.sfn-banner__products {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.sfn-product-card {
	background: #ffffff;
	border: 1px solid #fde8d0;
	border-radius: 12px;
	padding: 12px 10px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 148px;
	text-align: center;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sfn-product-card:hover {
	box-shadow: 0 4px 16px rgba(234, 88, 12, 0.14);
	border-color: #fdba74;
	transform: translateY(-2px);
}

/* ── Product image ──────────────────────────────────────────── */
.sfn-product-card__image {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

.sfn-product-card__image img {
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 8px;
	transition: opacity 0.2s ease;
}

.sfn-product-card:hover .sfn-product-card__image img {
	opacity: 0.92;
}

/* ── Product info ───────────────────────────────────────────── */
.sfn-product-card__info {
	margin: 10px 0 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
}

.sfn-product-card__title {
	font-size: 12px;
	color: #374151;
	text-decoration: none;
	line-height: 1.35;
	max-height: 34px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-weight: 500;
}

.sfn-product-card__title:hover {
	color: #ea580c;
}

.sfn-product-card__price {
	font-size: 14px;
	font-weight: 700;
	color: #ea580c;
	letter-spacing: -0.01em;
}

/* ── Add to cart button ─────────────────────────────────────── */
.sfn-product-card__add {
	font-size: 12px;
	font-weight: 600;
	padding: 7px 10px;
	width: 100%;
	background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
	color: #fff !important;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
	text-decoration: none !important;
	display: block;
	box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
	letter-spacing: 0.01em;
}

.sfn-product-card__add:hover {
	background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
	box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
	transform: translateY(-1px);
	color: #fff !important;
}

.sfn-product-card__add:active {
	transform: translateY(0);
	box-shadow: 0 1px 4px rgba(234, 88, 12, 0.3);
}

.sfn-product-card__add.is-loading {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
	pointer-events: none;
}

/* Loading spinner */
.sfn-product-card__add.is-loading::after {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sfn-spin 0.65s linear infinite;
	margin-left: 6px;
	vertical-align: middle;
}

@keyframes sfn-spin {
	to { transform: rotate(360deg); }
}

/* ── Inline error (replaces alert()) ────────────────────────── */
.sfn-inline-error {
	color: #dc2626;
	font-size: 11px;
	margin: 5px 0 0;
	line-height: 1.3;
}

/* ── Upsell hint (free → PRO nudge) ────────────────────────── */
.sfn-banner__upsell-hint {
	margin: 14px 0 0;
	font-size: 11.5px;
	color: #92400e;
	line-height: 1.4;
}

.sfn-banner__upsell-hint a {
	color: #ea580c;
	font-weight: 600;
	text-decoration: none;
}

.sfn-banner__upsell-hint a:hover {
	text-decoration: underline;
}

/* ── Powered by badge ───────────────────────────────────────── */
.sfn-banner__powered-by {
	margin: 10px 0 0;
	font-size: 10px;
	text-align: right;
}

.sfn-banner__powered-by a {
	color: #d1a87a;
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: color 0.15s ease;
}

.sfn-banner__powered-by a:hover {
	color: #ea580c;
}

/* ── Mini-cart variant ──────────────────────────────────────── */
.sfn-banner__products--mini {
	flex-direction: column;
}

.sfn-banner__products--mini .sfn-product-card {
	width: 100%;
	flex-direction: row;
	text-align: left;
	gap: 10px;
	padding: 10px;
}

.sfn-banner__products--mini .sfn-product-card__image img {
	width: 56px;
	height: 56px;
}

.sfn-banner__products--mini .sfn-product-card__info {
	flex: 1;
	margin: 0;
}

.sfn-banner__products--mini .sfn-product-card__add {
	width: auto;
	white-space: nowrap;
	align-self: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
	.sfn-banner {
		padding: 14px 14px 12px;
		border-radius: 12px;
	}

	.sfn-banner__products {
		flex-direction: column;
	}

	.sfn-product-card {
		width: 100%;
		flex-direction: row;
		text-align: left;
		gap: 12px;
		padding: 10px;
	}

	.sfn-product-card:hover {
		transform: none;
	}

	.sfn-product-card__image img {
		width: 68px;
		height: 68px;
	}

	.sfn-product-card__info {
		flex: 1;
		margin: 0;
	}

	.sfn-product-card__add {
		width: auto;
		white-space: nowrap;
		align-self: center;
	}
}

@media (max-width: 360px) {
	.sfn-banner__text {
		font-size: 13.5px;
	}

	.sfn-product-card {
		flex-wrap: wrap;
	}

	.sfn-product-card__add {
		width: 100%;
	}
}
