/*
 * EVNM Smart Product Combinations — Frontend Styles
 * All classes prefixed with evnm- to prevent conflicts.
 */

:root {
	--evnm-primary:    #0073aa;
	--evnm-secondary:  #005177;
	--evnm-border:     #e2e8f0;
	--evnm-text:       #1a202c;
	--evnm-muted:      #718096;
	--evnm-bg:         #f7fafc;
	--evnm-success:    #38a169;
	--evnm-radius:     8px;
	--evnm-transition: 0.2s ease;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.evnm-combinations {
	margin: 2rem 0;
	font-family: inherit;
}

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

/* ── Combination block ──────────────────────────────────────────────────── */
.evnm-combination {
	background: #fff;
	border: 1px solid var(--evnm-border);
	border-radius: var(--evnm-radius);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.evnm-combination-name {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--evnm-text);
	margin: 0 0 1rem;
}

/* ── Step ─────────────────────────────────────────────────────────────────── */
.evnm-step {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 0.875rem;
	border: 1px solid var(--evnm-border);
	border-radius: var(--evnm-radius);
	background: var(--evnm-bg);
	margin-bottom: 0;
	transition: box-shadow var(--evnm-transition);
}
.evnm-step:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.evnm-step-current {
	border-color: var(--evnm-primary);
	background: #edf4ff;
}

.evnm-step-image {
	flex-shrink: 0;
}
.evnm-step-image img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid var(--evnm-border);
}

.evnm-step-info {
	flex: 1;
	min-width: 0;
}

.evnm-step-name {
	display: block;
	font-weight: 600;
	font-size: 1rem;
	color: var(--evnm-text);
	text-decoration: none;
	margin-bottom: 0.25rem;
}
.evnm-step-name:hover { color: var(--evnm-primary); }

.evnm-step-price {
	display: block;
	color: var(--evnm-primary);
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.evnm-step-sku,
.evnm-step-vendor {
	display: block;
	font-size: 0.8rem;
	color: var(--evnm-muted);
}

.evnm-step-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
	flex-wrap: wrap;
}

.evnm-btn-cart,
.evnm-btn-view {
	font-size: 0.8rem !important;
	padding: 0.3rem 0.75rem !important;
}

/* ── Arrow connector ─────────────────────────────────────────────────────── */
.evnm-step-arrow {
	text-align: center;
	font-size: 1.4rem;
	color: var(--evnm-primary);
	margin: 0.25rem 0;
	line-height: 1;
}

/* ── Total ───────────────────────────────────────────────────────────────── */
.evnm-combination-total {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 2px solid var(--evnm-border);
	font-size: 1.05rem;
	text-align: right;
}

/* ── Horizontal style ────────────────────────────────────────────────────── */
.evnm-style-horizontal .evnm-combination {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	align-items: center;
}
.evnm-style-horizontal .evnm-step {
	flex: 1;
	min-width: 140px;
}
.evnm-style-horizontal .evnm-step-arrow {
	font-size: 1.6rem;
	margin: 0 0.25rem;
	align-self: center;
}

/* ── Cards style ─────────────────────────────────────────────────────────── */
.evnm-style-cards .evnm-combination {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}
.evnm-style-cards .evnm-step {
	flex: 0 0 calc(50% - 0.5rem);
	flex-direction: column;
	text-align: center;
}
.evnm-style-cards .evnm-step-image img {
	width: 100%;
	height: auto;
}

/* ── Shop/Category loop preview ─────────────────────────────────────────── */
.evnm-loop-next {
	margin-top: 0.75rem;
	padding: 0.625rem;
	background: var(--evnm-bg);
	border: 1px solid var(--evnm-border);
	border-radius: 6px;
	font-size: 0.82rem;
}

.evnm-loop-next-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--evnm-muted);
	margin-bottom: 0.35rem;
}

.evnm-loop-next-img {
	width: 36px;
	height: 36px;
	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;
}
.evnm-loop-next-name:hover { color: var(--evnm-primary); }

.evnm-loop-next-price {
	display: block;
	color: var(--evnm-primary);
	font-weight: 600;
	margin: 0.2rem 0;
	clear: left;
}

.evnm-loop-view-btn {
	display: inline-block;
	margin-top: 0.4rem;
	font-size: 0.75rem !important;
	padding: 0.2rem 0.6rem !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.evnm-step {
		flex-direction: column;
	}
	.evnm-style-horizontal .evnm-combination {
		flex-direction: column;
	}
	.evnm-style-cards .evnm-step {
		flex: 0 0 100%;
	}
}

/* ── Elementor 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;
}
.evnm-elementor-placeholder .dashicons {
	font-size: 2.5rem;
	margin-bottom: 0.75rem;
}
