/* ============================================================
   Solicită ofertă – stiluri buton + modal + formular
   ============================================================ */

/* ── Utility ───────────────────────────────────────────────── */
.so-hidden {
	display: none !important;
}

body.so-overflow-hidden {
	overflow: hidden;
}

/* ── Buton "Solicită ofertă" ───────────────────────────────── */
.so-wrap {
	margin-top: 12px;
}

a.so-btn.button,
button.so-btn.button {
	display: inline-block;
	background-color: #e63946;
	border-color: #e63946;
	color: #fff;
	cursor: pointer;
	text-decoration: none;
	font-weight: 600;
}

a.so-btn.button:hover,
a.so-btn.button:focus,
button.so-btn.button:hover,
button.so-btn.button:focus {
	background-color: #c1121f;
	border-color: #c1121f;
	color: #fff;
}

/* Butonul dinamic (variable/composite) – fără wrapper div */
a#so-dynamic-btn.so-btn.button {
	display: inline-block;
	margin-top: 10px;
}

/* În loop/arhive – eliminăm margin suplimentar */
.woocommerce ul.products li.product .so-wrap {
	margin-top: 0;
}

/* ── Overlay ───────────────────────────────────────────────── */
#so-overlay.so-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.60);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

/* ── Modal box ─────────────────────────────────────────────── */
.so-modal {
	background: #fff;
	border-radius: 10px;
	padding: 36px 32px 28px;
	max-width: 460px;
	width: 100%;
	position: relative;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
	max-height: 92vh;
	overflow-y: auto;
	box-sizing: border-box;
}

.so-modal-heading {
	margin: 0 0 4px;
	font-size: 1.35rem;
	line-height: 1.3;
	color: #111;
}

.so-modal-subheading {
	color: #666;
	margin: 0 0 22px;
	font-size: 0.92rem;
	font-style: italic;
}

/* ── Buton închidere ───────────────────────────────────────── */
.so-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	color: #999;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.so-close:hover,
.so-close:focus {
	color: #222;
	background: #f0f0f0;
	outline: none;
}

/* ── Sumar produs în modal ─────────────────────────────────── */
.so-product-summary {
	background: #f8f8f8;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	padding: 12px 14px;
	margin-bottom: 20px;
	font-size: 0.92rem;
}

.so-product-summary__row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.so-product-summary__row:last-child {
	margin-bottom: 0;
}

.so-product-summary__label {
	font-weight: 600;
	color: #555;
	min-width: 70px;
	flex-shrink: 0;
}

/* Câmp cantitate în sumar */
.so-qty-input {
	width: 68px;
	padding: 4px 8px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	font-size: 0.95rem;
	text-align: center;
	background: #fff;
}

.so-qty-input:focus {
	border-color: #e63946;
	outline: none;
	box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.12);
}

/* ── Câmpuri formular ──────────────────────────────────────── */
.so-field {
	margin-bottom: 16px;
}

.so-field label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	margin-bottom: 5px;
	color: #333;
}

.so-field label span[aria-hidden] {
	color: #e63946;
	margin-left: 2px;
}

.so-field input[type="text"],
.so-field input[type="email"],
.so-field input[type="tel"] {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid #d0d0d0;
	border-radius: 5px;
	font-size: 1rem;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
	background: #fafafa;
	color: #222;
}

.so-field input:focus {
	border-color: #e63946;
	background: #fff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.14);
}

/* ── Buton submit ──────────────────────────────────────────── */
.so-submit.button {
	width: 100%;
	margin-top: 6px;
	padding: 13px;
	font-size: 1rem;
	font-weight: 600;
	background-color: #e63946;
	border-color: #e63946;
	color: #fff;
	cursor: pointer;
	border-radius: 5px;
	transition: background-color 0.15s, border-color 0.15s;
}

.so-submit.button:hover,
.so-submit.button:focus {
	background-color: #c1121f;
	border-color: #c1121f;
	color: #fff;
}

.so-submit.button:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ── Mesaje feedback ───────────────────────────────────────── */
#so-msg.so-msg {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 5px;
	font-size: 0.95rem;
	line-height: 1.45;
}

#so-msg.so-msg--success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

#so-msg.so-msg--error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* ── Responsiv ─────────────────────────────────────────────── */
@media (max-width: 520px) {
	.so-modal {
		padding: 24px 16px 20px;
	}

	.so-modal-heading {
		font-size: 1.15rem;
	}
}
