/* ==========================================================================
   HEC Cotizador — Full-page 2-column layout v2.0
   BEM prefix: hec-cot__
   ========================================================================== */

:root {
	--cot-red:       #D90429;
	--cot-red-dk:    #b50220;
	--cot-slate:     #1e293b;
	--cot-slate-dk:  #111827;
	--cot-amber:     #f59e0b;
	--cot-border:    #e2e8f0;
	--cot-bg:        #f8fafc;
	--cot-white:     #ffffff;
	--cot-text:      #1e293b;
	--cot-muted:     #64748b;
	--cot-success:   #16a34a;
	--cot-whatsapp:  #25d366;
	--cot-radius:    12px;
	--cot-shadow:    0 4px 24px rgba(15,23,42,.09);
}

/* ── Wrapper ───────────────────────────────────────────────────────────── */
.hec-cot {
	max-width: 1400px;
	margin: 0 auto;
	padding: 32px 24px;
	box-sizing: border-box;
}

/* ── Notice bar ────────────────────────────────────────────────────────── */
.hec-cot__notice {
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 500;
	margin-bottom: 16px;
	line-height: 1.4;
}
.hec-cot__notice[hidden] { display: none; }
.hec-cot__notice.is-success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}
.hec-cot__notice.is-error {
	background: #fff1f2;
	color: #be123c;
	border: 1px solid #fecdd3;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.hec-cot__layout {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 32px;
	align-items: start;
}

/* ── LEFT ──────────────────────────────────────────────────────────────── */
.hec-cot__left {
	min-width: 0;
}

/* ── RIGHT (sticky) ────────────────────────────────────────────────────── */
.hec-cot__right {
	position: sticky;
	top: 88px;
}

/* ── Search header ─────────────────────────────────────────────────────── */
.hec-cot__search-header {
	margin-bottom: 20px;
}

.hec-cot__panel-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--cot-slate-dk);
	margin: 0 0 6px;
	display: flex;
	align-items: center;
	gap: 10px;
	line-height: 1.2;
}
.hec-cot__panel-title svg {
	flex-shrink: 0;
	color: var(--cot-red);
}

.hec-cot__search-hint {
	font-size: 13px;
	color: var(--cot-muted);
	margin: 0 0 16px;
	line-height: 1.5;
}

/* ── Search bar ────────────────────────────────────────────────────────── */
.hec-cot__search-bar {
	position: relative;
	margin-bottom: 20px;
}

.hec-cot__search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cot-muted);
	pointer-events: none;
	flex-shrink: 0;
}

.hec-cot__search-bar input[type="search"] {
	width: 100%;
	height: 52px;
	border: 2px solid var(--cot-border);
	border-radius: 10px;
	padding: 0 16px 0 44px;
	font-size: 15px;
	font-family: inherit;
	color: var(--cot-text);
	background: var(--cot-white);
	box-sizing: border-box;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
	-webkit-appearance: none;
	appearance: none;
}
.hec-cot__search-bar input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.hec-cot__search-bar input[type="search"]:focus {
	border-color: var(--cot-red);
	box-shadow: 0 0 0 3px rgba(217,4,41,.1);
}
.hec-cot__search-bar input[type="search"]::placeholder {
	color: var(--cot-muted);
}

/* ── Results container ─────────────────────────────────────────────────── */
.hec-cot__results {
	margin-top: 0;
}

/* ── Result item ───────────────────────────────────────────────────────── */
.hec-cot__result-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	background: var(--cot-white);
	border: 1.5px solid var(--cot-border);
	border-radius: 10px;
	margin-bottom: 8px;
	transition: border-color .2s, box-shadow .2s;
	cursor: default;
}
.hec-cot__result-item:last-child { margin-bottom: 0; }
.hec-cot__result-item:hover {
	border-color: var(--cot-red);
	box-shadow: 0 2px 12px rgba(217,4,41,.1);
}

.hec-cot__result-img {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--cot-border);
	flex-shrink: 0;
	background: var(--cot-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}
.hec-cot__result-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hec-cot__result-info {
	flex: 1;
	min-width: 0;
}

.hec-cot__result-cat {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	background: linear-gradient(135deg, #06b6d4, #0891b2);
	color: #fff;
	border-radius: 4px;
	padding: 2px 7px;
	margin-bottom: 5px;
	line-height: 1.4;
}

.hec-cot__result-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--cot-slate);
	line-height: 1.4;
	margin: 0 0 3px;
}

.hec-cot__result-price {
	font-size: 13px;
	font-weight: 700;
	color: var(--cot-amber);
	display: block;
}
.hec-cot__result-price del {
	opacity: .6;
	font-weight: 400;
	margin-right: 4px;
}

/* Add button */
.hec-cot__add-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: var(--cot-red);
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .2s, transform .18s, box-shadow .2s;
	box-shadow: 0 2px 8px rgba(217,4,41,.4);
	font-family: Arial, sans-serif;
	font-weight: 300;
}
.hec-cot__add-btn:hover {
	background: var(--cot-red-dk);
	transform: scale(1.12);
	box-shadow: 0 4px 14px rgba(217,4,41,.5);
}
.hec-cot__add-btn.is-added {
	background: var(--cot-success);
	box-shadow: 0 2px 8px rgba(22,163,74,.35);
	transform: none;
	font-size: 16px;
	font-weight: 700;
}
.hec-cot__add-btn.is-added:hover {
	background: #15803d;
	transform: scale(1.06);
}

/* ── Search states ─────────────────────────────────────────────────────── */
.hec-cot__search-placeholder,
.hec-cot__searching,
.hec-cot__no-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	color: var(--cot-muted);
	text-align: center;
	gap: 10px;
}
.hec-cot__search-placeholder svg { opacity: .25; }
.hec-cot__search-placeholder p,
.hec-cot__searching,
.hec-cot__no-results { font-size: 13.5px; margin: 0; }

.hec-cot__searching {
	flex-direction: row;
	gap: 10px;
	padding: 24px;
	justify-content: center;
}

/* Spinner */
@keyframes cotSpin { to { transform: rotate(360deg); } }
.hec-cot__spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(100,116,139,.2);
	border-top-color: var(--cot-muted);
	border-radius: 50%;
	animation: cotSpin .7s linear infinite;
	flex-shrink: 0;
}

/* ── RIGHT PANEL ───────────────────────────────────────────────────────── */
.hec-cot__panel {
	background: var(--cot-white);
	border-radius: var(--cot-radius);
	box-shadow: var(--cot-shadow);
	border: 1.5px solid var(--cot-border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
}

.hec-cot__panel-head {
	background: var(--cot-slate-dk);
	padding: 16px 20px;
	color: #fff;
	flex-shrink: 0;
}

.hec-cot__panel-head-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

/* Override title color inside panel head */
.hec-cot__panel-head .hec-cot__panel-title {
	color: #fff;
	font-size: 15px;
	margin: 0;
}
.hec-cot__panel-head .hec-cot__panel-title svg {
	color: rgba(255,255,255,.7);
}

.hec-cot__count {
	background: rgba(255,255,255,.12);
	color: rgba(255,255,255,.85);
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Items wrap ────────────────────────────────────────────────────────── */
.hec-cot__items-wrap {
	padding: 12px 16px;
	min-height: 80px;
	flex-shrink: 0;
}

/* ── Item row ──────────────────────────────────────────────────────────── */
.hec-cot__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--cot-border);
	animation: cotFadeIn .2s ease;
}
.hec-cot__item:last-child { border-bottom: none; }

.hec-cot__item__img {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--cot-bg);
	border: 1px solid var(--cot-border);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hec-cot__item__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hec-cot__item__info {
	flex: 1;
	min-width: 0;
}
.hec-cot__item__name {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cot-slate);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
	margin-bottom: 2px;
}
.hec-cot__item__price {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--cot-amber);
	line-height: 1.2;
}

/* Qty controls */
.hec-cot__item__qty {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.cot-qty-btn {
	width: 22px;
	height: 22px;
	border-radius: 4px;
	border: 1.5px solid var(--cot-border);
	background: var(--cot-white);
	color: var(--cot-slate);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .2s, background .2s, color .2s;
	line-height: 1;
	padding: 0;
	font-family: Arial, sans-serif;
}
.cot-qty-btn:hover {
	border-color: var(--cot-red);
	color: var(--cot-red);
	background: #fff5f5;
}
.cot-qty-num {
	min-width: 20px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--cot-slate);
}

/* Remove button */
.cot-remove-btn {
	width: 28px;
	height: 28px;
	border: none;
	background: var(--cot-red);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	flex-shrink: 0;
	transition: background .2s, transform .15s, box-shadow .2s;
	box-shadow: 0 1px 4px rgba(217,4,41,.3);
	padding: 0;
}
.cot-remove-btn:hover {
	background: var(--cot-red-dk);
	transform: scale(1.1);
	box-shadow: 0 3px 10px rgba(217,4,41,.4);
}
.cot-remove-btn svg {
	pointer-events: none;
	flex-shrink: 0;
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.hec-cot__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 28px 16px;
	text-align: center;
	gap: 8px;
	color: var(--cot-muted);
}
.hec-cot__empty svg { opacity: .2; }
.hec-cot__empty p {
	margin: 0;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--cot-slate);
}
.hec-cot__empty small { font-size: 12px; }

/* ── Form section ──────────────────────────────────────────────────────── */
.hec-cot__form-section {
	padding: 16px;
	border-top: 1px solid var(--cot-border);
	flex-shrink: 0;
}

.hec-cot__form-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	color: var(--cot-muted);
	margin: 0 0 14px;
}

.hec-cot__form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.hec-cot__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.hec-cot__field--full {
	grid-column: 1 / -1;
}
.hec-cot__field label {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--cot-slate);
}
.hec-cot__field input,
.hec-cot__field textarea {
	border: 1.5px solid var(--cot-border);
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--cot-text);
	background: var(--cot-white);
	width: 100%;
	box-sizing: border-box;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
}
.hec-cot__field input:focus,
.hec-cot__field textarea:focus {
	border-color: var(--cot-red);
	box-shadow: 0 0 0 3px rgba(217,4,41,.1);
}
.hec-cot__field input::placeholder,
.hec-cot__field textarea::placeholder {
	color: #b0bec5;
	font-size: 12.5px;
}
.hec-cot__field textarea {
	resize: vertical;
	min-height: 64px;
}

/* ── Action buttons ────────────────────────────────────────────────────── */
.hec-cot__actions {
	padding: 16px;
	border-top: 1px solid var(--cot-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-shrink: 0;
}

.hec-cot__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	border: none;
	transition: all .2s;
	text-align: center;
	line-height: 1.2;
}
.hec-cot__btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}
.hec-cot__btn svg { flex-shrink: 0; pointer-events: none; }

.hec-cot__btn--primary {
	background: linear-gradient(135deg, var(--cot-red), var(--cot-red-dk));
	color: var(--cot-white);
	box-shadow: 0 4px 14px rgba(217,4,41,.35);
}
.hec-cot__btn--primary:hover:not(:disabled) {
	background: linear-gradient(135deg, var(--cot-red-dk), #9b011a);
	box-shadow: 0 6px 18px rgba(217,4,41,.45);
	transform: translateY(-1px);
}

.hec-cot__btn-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.hec-cot__btn--secondary {
	background: var(--cot-slate-dk);
	color: var(--cot-white);
}
.hec-cot__btn--secondary:hover:not(:disabled) {
	background: var(--cot-slate);
	transform: translateY(-1px);
}

.hec-cot__btn--whatsapp {
	background: linear-gradient(135deg, #128c7e, #25d366);
	color: var(--cot-white);
}
.hec-cot__btn--whatsapp:hover:not(:disabled) {
	background: linear-gradient(135deg, #0d7268, #1aad52);
	transform: translateY(-1px);
}

.hec-cot__clear {
	background: transparent;
	color: var(--cot-red);
	border: 1.5px solid var(--cot-red);
	border-radius: var(--cot-radius);
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	padding: 8px 14px;
	align-self: center;
	display: flex;
	align-items: center;
	gap: 6px;
	letter-spacing: .03em;
	transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.hec-cot__clear:hover {
	background: var(--cot-red);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(217,4,41,.35);
}
.hec-cot__clear svg { flex-shrink: 0; pointer-events: none; }

/* ── No-image placeholder in results ───────────────────────────────────── */
.hec-cot__no-img {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Badge on COTIZAR header button ────────────────────────────────────── */
.hec-btn-cotizar { position: relative; }
.cot-badge {
	display: none;
	position: absolute;
	top: -8px;
	right: -8px;
	background: #D90429;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
	line-height: 1;
	border: 2px solid #fff;
	box-sizing: border-box;
}
.cot-badge.is-visible { display: flex; }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes cotFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Tablet ≤ 1024px ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.hec-cot__layout {
		grid-template-columns: 1fr 360px;
		gap: 24px;
	}
}

/* ── Mobile ≤ 767px ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.hec-cot {
		padding: 20px 16px;
	}
	.hec-cot__layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.hec-cot__right {
		position: static;
	}
	.hec-cot__panel {
		max-height: none;
		overflow-y: visible;
	}
	.hec-cot__form-grid {
		grid-template-columns: 1fr;
	}
	.hec-cot__btn-row {
		grid-template-columns: 1fr;
	}
	.hec-cot__search-bar input[type="search"] {
		height: 48px;
		font-size: 14px;
	}
	.hec-cot__panel-title {
		font-size: 16px;
	}
}

/* ── Heading de lista de productos por defecto ──────────────────────── */
.hec-cot__results-heading {
	font-size: 11px;
	font-weight: 600;
	color: var(--cot-muted);
	text-transform: uppercase;
	letter-spacing: .06em;
	margin: 0 0 8px;
	padding: 0 2px;
}

/* ── Grid de resultados en el cotizador ─────────────────────────────── */
.cot-results-grid {
	grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 900px)  { .cot-results-grid { grid-template-columns: repeat(2, 1fr) !important; } }

/* ── Botón agregar sobre la card de producto ────────────────────────── */
#hec-cot .srd-prod-card__thumb .hec-cot__add-btn {
	position: absolute;
	bottom: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--cot-red);
	border: 2.5px solid #fff;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 10px rgba(217,4,41,.45);
	transition: background .2s ease, transform .18s ease, box-shadow .2s ease;
	padding: 0;
	line-height: 1;
}
#hec-cot .srd-prod-card__thumb .hec-cot__add-btn span {
	font-size: 18px;
	font-weight: 300;
	color: #fff;
	line-height: 1;
	pointer-events: none;
	display: block;
}
#hec-cot .srd-prod-card__thumb .hec-cot__add-btn:hover {
	transform: scale(1.12);
	box-shadow: 0 5px 16px rgba(217,4,41,.55);
}
#hec-cot .srd-prod-card__thumb .hec-cot__add-btn.is-added {
	background: var(--cot-success);
	box-shadow: 0 3px 10px rgba(22,163,74,.4);
}
#hec-cot .srd-prod-card__thumb .hec-cot__add-btn.is-added span {
	font-size: 14px;
	font-weight: 700;
}

/* ── Plantilla single1: columna de imagen destacada oculta en /cotizar/ ── */
body.page-id-8905 .elementor-element-7b43ac6 {
	display: none !important;
}
body.page-id-8905 .elementor-element-7b43ac6 ~ .elementor-column,
body.page-id-8905 .elementor-column:has(+ .elementor-element-7b43ac6) {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}
