/*
 * EVNM Smart Product Combinations — Frontend Styles
 * Card UI matching EV Nexo Mart product card design language.
 */

:root {
	--evnm-primary:    #0073aa;
	--evnm-border:     #e8e8e8;
	--evnm-text:       #1a1a1a;
	--evnm-muted:      #767676;
	--evnm-bg:         #f8f9fa;
	--evnm-current-bg: #edf4ff;
	--evnm-current-border: #4299e1;
	--evnm-radius:     10px;
	--evnm-shadow:     0 2px 8px rgba(0,0,0,.07);
}

/* ── Section wrapper ──────────────────────────────────────────────────────── */
.evnm-combinations {
	margin: 2.5rem 0;
	font-family: inherit;
}

.evnm-combinations-heading {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--evnm-text);
	margin: 0 0 1.25rem;
	padding-left: 0.875rem;
	border-left: 4px solid var(--evnm-primary);
}

/* ── Combination block ────────────────────────────────────────────────────── */
.evnm-combination {
	background: #fff;
	border: 1px solid var(--evnm-border);
	border-radius: var(--evnm-radius);
	overflow: hidden;
	box-shadow: var(--evnm-shadow);
	margin-bottom: 2rem;
}

.evnm-combination-name {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	padding: 0.875rem 1.25rem;
	border-bottom: 1px solid var(--evnm-border);
	background: var(--evnm-bg);
	color: var(--evnm-text);
}

/* ── Step card — matches Image 1 layout ───────────────────────────────────── */
.evnm-step {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--evnm-border);
	background: #fff;
	transition: background 0.15s;
}
.evnm-step:last-of-type { border-bottom: none; }
.evnm-step:hover        { background: #fafafa; }
.evnm-step.evnm-step-current {
	background: var(--evnm-current-bg);
	border-left: 3px solid var(--evnm-current-border);
}

/* Image — same proportions as product cards in Image 1 */
.evnm-step-image {
	flex-shrink: 0;
	width: 90px;
	height: 90px;
}
.evnm-step-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 6px;
	background: #f5f5f5;
	padding: 4px;
}

/* Info column */
.evnm-step-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.evnm-step-category {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--evnm-muted);
}

.evnm-step-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--evnm-text);
	text-decoration: none;
	line-height: 1.35;
	display: block;
}
.evnm-step-name:hover { color: var(--evnm-primary); }

/* Price — prominent like Image 1 */
.evnm-step-price {
	font-size: 1rem;
	font-weight: 700;
	color: var(--evnm-text);
	margin-top: 2px;
}
.evnm-step-price .woocommerce-Price-amount { font-weight: 700; }

.evnm-step-sku    { font-size: 0.75rem; color: var(--evnm-muted); }
.evnm-step-vendor { font-size: 0.75rem; color: var(--evnm-muted); }

/* Buttons column — right-aligned like Image 1 */
.evnm-step-actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	align-items: flex-end;
	min-width: 130px;
}

/* Add to Cart — mirrors the blue button from Image 1 */
.evnm-step-actions .evnm-btn-cart,
.evnm-step-actions .add_to_cart_button {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 1rem !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	background: var(--evnm-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, opacity 0.15s;
	width: 100%;
	justify-content: center;
}
.evnm-step-actions .evnm-btn-cart:hover,
.evnm-step-actions .add_to_cart_button:hover {
	background: #005f8e !important;
	color: #fff !important;
}
/* WC's "added" state */
.evnm-step-actions .added_to_cart,
.evnm-step-actions .add_to_cart_button.added {
	background: #276749 !important;
}

/* View Product — secondary outline style */
.evnm-step-actions .evnm-btn-view {
	display: inline-block;
	padding: 0.45rem 1rem !important;
	font-size: 0.78rem !important;
	font-weight: 500 !important;
	color: var(--evnm-primary) !important;
	background: transparent !important;
	border: 1px solid var(--evnm-primary) !important;
	border-radius: 6px !important;
	text-decoration: none;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
	transition: background 0.15s, color 0.15s;
}
.evnm-step-actions .evnm-btn-view:hover {
	background: var(--evnm-primary) !important;
	color: #fff !important;
}

/* ── Arrow between steps ─────────────────────────────────────────────────── */
.evnm-step-arrow {
	text-align: center;
	padding: 0.1rem 0;
	color: var(--evnm-primary);
	font-size: 1.1rem;
	background: #fff;
	border-bottom: 1px solid var(--evnm-border);
}

/* ── Footer: total + Add All ─────────────────────────────────────────────── */
.evnm-combination-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.25rem;
	padding: 1rem 1.25rem;
	background: var(--evnm-bg);
	border-top: 2px solid var(--evnm-border);
	flex-wrap: wrap;
}

.evnm-combination-total {
	font-size: 1rem;
	color: var(--evnm-text);
}
.evnm-total-label { font-weight: 600; }
.evnm-total-price {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--evnm-text);
	margin-left: 0.35rem;
}
.evnm-total-price .woocommerce-Price-amount { font-weight: 800; font-size: 1.15rem; }

/* Add All to Cart — prominent blue button */
.evnm-btn-add-all {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	background: var(--evnm-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
	text-decoration: none;
	white-space: nowrap;
}
.evnm-btn-add-all:hover {
	background: #005f8e;
	transform: translateY(-1px);
	color: #fff;
}
.evnm-btn-add-all:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}
.evnm-btn-add-all.evnm-adding {
	background: #4a5568;
}
.evnm-btn-add-all.evnm-added {
	background: #276749;
}

/* Footer buttons group — Add All + View Cart side by side */
.evnm-footer-buttons {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* View Cart link — always visible, clear font, transparent background, no hover change */
.evnm-view-cart-link {
	display: inline-flex !important;
	align-items: center;
	padding: 0.7rem 1.25rem !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	color: var(--evnm-primary) !important;
	background: transparent !important;
	border: 2px solid var(--evnm-primary) !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	white-space: nowrap;
	transition: none !important;
	box-shadow: none !important;
}
.evnm-view-cart-link:hover,
.evnm-view-cart-link:focus,
.evnm-view-cart-link:active {
	color: var(--evnm-primary) !important;
	background: transparent !important;
	border-color: var(--evnm-primary) !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transform: none !important;
	outline: none !important;
}
.evnm-loop-next {
	margin-top: 0.75rem;
	padding: 0.625rem 0.75rem;
	background: var(--evnm-bg);
	border: 1px solid var(--evnm-border);
	border-radius: 6px;
	font-size: 0.82rem;
	overflow: hidden;
}
.evnm-loop-next-label {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--evnm-muted);
	margin-bottom: 0.35rem;
}
.evnm-loop-next-img {
	width: 34px;
	height: 34px;
	object-fit: cover;
	border-radius: 4px;
	float: left;
	margin-right: 0.5rem;
}
.evnm-loop-next-name {
	display: block;
	font-weight: 600;
	color: var(--evnm-text);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.82rem;
}
.evnm-loop-next-name:hover { color: var(--evnm-primary); }
.evnm-loop-next-price      { display: block; font-weight: 700; margin: 2px 0; clear: left; }
.evnm-loop-view-btn        { font-size: 0.72rem !important; margin-top: 0.35rem; }

/* ── Elementor editor placeholder ────────────────────────────────────────── */
.evnm-elementor-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: #f0f4f8;
	border: 2px dashed #cbd5e0;
	border-radius: 8px;
	color: #718096;
	text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.evnm-step {
		flex-wrap: wrap;
	}
	.evnm-step-image { width: 70px; height: 70px; }
	.evnm-step-actions {
		min-width: 0;
		width: 100%;
		flex-direction: row;
		align-items: center;
	}
	.evnm-step-actions .evnm-btn-cart,
	.evnm-step-actions .evnm-btn-view {
		width: auto;
		flex: 1;
	}
	.evnm-combination-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.evnm-btn-add-all { width: 100%; justify-content: center; }
}
