/* ==========================================================================
   Guía Construcción · Mega menú de categorías  [gc_megamenu]
   ========================================================================== */
.gcm {
	--gcm-primary: #ff7438;
	--gcm-dark: #1f1f1f;
	--gcm-border: #e7e8ec;
	--gcm-muted: #9aa0a8;
	--gcm-soft: #f6f7f9;
	position: relative;
	display: inline-block;
	font-family: inherit;
}
.gcm *, .gcm *::before, .gcm *::after { box-sizing: border-box; }

/* Botón */
.gcm__btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: var(--gcm-primary);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 11px 16px;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1;
	transition: background .15s, box-shadow .15s;
}
.gcm__btn:hover { background: #f0651f; }
.gcm__btn-ic { width: 18px; height: 18px; flex: none; }
.gcm__btn-caret { width: 16px; height: 16px; flex: none; transition: transform .2s; }
.gcm[data-open] .gcm__btn-caret { transform: rotate(180deg); }

/* Panel */
.gcm__panel[hidden] { display: none; }
.gcm__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 40;
	display: flex;
	width: min(var(--gcm-w, 1340px), 96vw);
	max-height: 72vh;
	background: #fff;
	border: 1px solid var(--gcm-border);
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(16, 24, 40, .16);
	overflow: hidden;
}
/* Puente invisible para que el hover no se corte al pasar del botón al panel */
.gcm__panel::before {
	content: '';
	position: absolute;
	top: -8px;
	left: 0;
	right: 0;
	height: 8px;
}

/* Columna izquierda: lista de categorías */
.gcm__list {
	width: 300px;
	flex: none;
	border-right: 1px solid var(--gcm-border);
	padding: 12px;
	overflow-y: auto;
}
.gcm__section + .gcm__section { margin-top: 10px; }
.gcm__section-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--gcm-muted);
	font-weight: 700;
	margin: 8px 10px 6px;
}
.gcm__cat {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	text-align: left;
	color: var(--gcm-dark);
	font-size: 14px;
}
.gcm__cat:hover { background: var(--gcm-soft); }
.gcm__cat.is-active { background: rgba(255, 116, 56, .1); color: var(--gcm-primary); font-weight: 600; }
.gcm__cat-ic { width: 20px; height: 20px; color: var(--gcm-muted); flex: none; display: inline-flex; }
.gcm__cat.is-active .gcm__cat-ic { color: var(--gcm-primary); }
.gcm__cat-ic svg { width: 20px; height: 20px; }
.gcm__cat-name { flex: 1 1 auto; }
.gcm__cat-arrow { width: 16px; height: 16px; opacity: 0; color: var(--gcm-primary); flex: none; transition: opacity .15s; }
.gcm__cat.is-active .gcm__cat-arrow { opacity: 1; }

/* Columna derecha: detalle de la categoría */
.gcm__detail { flex: 1 1 auto; padding: 22px 24px; overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.gcm__pane { display: none; }
.gcm__pane.is-active { display: flex; flex-direction: column; flex: 1 1 auto; animation: gcm-fade .18s ease; }
@keyframes gcm-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.gcm__pane-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--gcm-border); margin-bottom: 16px; }
.gcm__pane-ic {
	width: 46px; height: 46px;
	border-radius: 999px;
	background: var(--gcm-soft);
	color: var(--gcm-primary);
	display: inline-flex; align-items: center; justify-content: center;
	flex: none;
}
.gcm__pane-ic svg { width: 22px; height: 22px; }
.gcm__pane-title { flex: 1 1 auto; }
.gcm__pane-title h3 { margin: 0; font-size: 19px; color: var(--gcm-dark); }
.gcm__pane-title span { font-size: 13px; color: var(--gcm-muted); }
.gcm__seeall {
	display: inline-flex; align-items: center; gap: 6px;
	color: var(--gcm-primary);
	font-weight: 600; font-size: 13.5px; text-decoration: none;
	white-space: nowrap;
}
.gcm__seeall svg { width: 15px; height: 15px; }
.gcm__seeall:hover { text-decoration: underline; }

.gcm__subs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 4px 18px;
	margin-bottom: 18px;
}
.gcm__sub {
	display: block;
	padding: 8px 4px;
	color: #3a3f47;
	text-decoration: none;
	font-size: 14px;
	border-radius: 6px;
}
.gcm__sub:hover { color: var(--gcm-primary); }

/* CTA inferior */
.gcm__cta {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	background: var(--gcm-soft);
	border: 1px solid var(--gcm-border);
	border-radius: 12px;
	padding: 14px 18px;
	margin-top: auto;
}
.gcm__cta-text span { display: block; font-size: 12.5px; color: var(--gcm-primary); font-weight: 600; }
.gcm__cta-text strong { display: block; font-size: 15px; color: var(--gcm-dark); }
.gcm__cta-btn {
	background: var(--gcm-primary); color: #fff;
	text-decoration: none; font-weight: 600; font-size: 14px;
	padding: 10px 18px; border-radius: 9px; white-space: nowrap;
	transition: background .15s;
}
.gcm__cta-btn:hover { background: #f0651f; }

/* Responsive */
@media (max-width: 820px) {
	.gcm__panel { flex-direction: column; width: min(440px, 92vw); max-height: 80vh; }
	.gcm__list { width: 100%; border-right: 0; border-bottom: 1px solid var(--gcm-border); max-height: 220px; }
	.gcm__cat-arrow { display: none; }
}
