/* ============================================================
   PDP — Technical drawings card + lightbox modal
   ============================================================ */

:root {
	--es-tech-orange: #F57C00;
	--es-tech-orange-hover: #E65100;
	--es-tech-border: #e6e9ef;
	--es-tech-border-strong: #d1d6df;
	--es-tech-text: #1a1a1a;
	--es-tech-text-muted: #6b7280;
	--es-tech-bg-soft: #fafbfc;
	--es-tech-radius: 12px;
}

/* ===== Card ===== */
.es-tech-drawing {
	margin: 0;
}
.es-tech-drawing__open {
	display: grid;
	grid-template-columns: 132px 1fr;
	gap: 18px;
	width: 100%;
	background: linear-gradient(180deg, #f7f8fa 0%, #fff 100%);
	border: 1px solid var(--es-tech-border);
	border-radius: var(--es-tech-radius);
	padding: 16px 18px;
	cursor: pointer;
	text-align: left;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color .15s, box-shadow .2s, transform .15s;
	position: relative;
	overflow: hidden;
}
/* subtle blueprint grid pattern in background */
.es-tech-drawing__open::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(15,23,42,0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(15,23,42,0.025) 1px, transparent 1px);
	background-size: 16px 16px;
	pointer-events: none;
	opacity: .5;
}
.es-tech-drawing__open > * { position: relative; z-index: 1; }

.es-tech-drawing__open:hover {
	border-color: var(--es-tech-orange);
	box-shadow: 0 10px 24px rgba(245,124,0,0.16);
	transform: translateY(-2px);
}
.es-tech-drawing__open:focus-visible {
	outline: 2px solid var(--es-tech-orange);
	outline-offset: 2px;
}

.es-tech-drawing__thumb {
	width: 132px;
	height: 132px;
	background: #fff;
	border: 1px solid var(--es-tech-border);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-shadow: inset 0 0 0 1px rgba(15,23,42,0.03);
}
.es-tech-drawing__thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	padding: 8px;
}
.es-tech-drawing__thumb::after {
	content: '';
	position: absolute;
	inset: auto 6px 6px auto;
	width: 28px;
	height: 28px;
	background: var(--es-tech-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3Cline x1='11' y1='8.5' x2='11' y2='13.5'/%3E%3Cline x1='8.5' y1='11' x2='13.5' y2='11'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(245,124,0,0.35);
}
.es-tech-drawing__thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	padding: 6px;
}

.es-tech-drawing__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	min-width: 0;
}
.es-tech-drawing__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--es-tech-orange);
}
.es-tech-drawing__eyebrow::before {
	content: '';
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F57C00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18M9 3v18'/%3E%3C/svg%3E") no-repeat center / contain;
}
.es-tech-drawing__title {
	font-size: 18px;
	font-weight: 800;
	color: var(--es-tech-text);
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.es-tech-drawing__desc {
	font-size: 13px;
	color: var(--es-tech-text-muted);
	line-height: 1.45;
	max-width: 95%;
}
.es-tech-drawing__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding: 9px 16px;
	background: var(--es-tech-orange);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 8px;
	align-self: flex-start;
	box-shadow: 0 4px 10px rgba(245,124,0,0.28);
	transition: box-shadow .15s, transform .15s;
}
.es-tech-drawing__open:hover .es-tech-drawing__cta {
	background: var(--es-tech-orange-hover);
	box-shadow: 0 6px 14px rgba(245,124,0,0.40);
}

@media (max-width: 767px) {
	.es-tech-drawing__open {
		grid-template-columns: 88px 1fr;
		gap: 12px;
		padding: 12px 14px;
	}
	.es-tech-drawing__thumb { width: 88px; height: 88px; }
	.es-tech-drawing__thumb::after { width: 24px; height: 24px; inset: auto 4px 4px auto; }
	.es-tech-drawing__title { font-size: 15px; }
	.es-tech-drawing__desc { font-size: 12px; }
	.es-tech-drawing__cta { padding: 8px 12px; font-size: 11px; }
}

/* ===== Lightbox modal ===== */
.es-tech-modal {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 2147483000;  /* above all known stacking contexts */
	background: rgba(8, 12, 22, 0.96);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.es-tech-modal.is-open {
	display: block;
	animation: esTechFade .18s ease;
}
@keyframes esTechFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

body.es-tech-modal-open { overflow: hidden; }

.es-tech-modal__backdrop {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	cursor: zoom-out;
}

.es-tech-modal__inner {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"header"
		"stage"
		"thumbs";
	width: 100%;
	height: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 18px 24px 24px;
	box-sizing: border-box;
	pointer-events: none;
}
.es-tech-modal__inner > * {
	pointer-events: auto;
}

/* Header bar — title + close */
.es-tech-modal__header {
	grid-area: header;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: #fff;
	margin-bottom: 14px;
}
.es-tech-modal__title {
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.es-tech-modal__title-counter {
	font-size: 12px;
	font-weight: 500;
	color: rgba(255,255,255,0.55);
	letter-spacing: 0.06em;
}

.es-tech-modal__close,
.es-tech-modal__prev,
.es-tech-modal__next {
	background: rgba(255,255,255,0.10);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, border-color .15s, transform .15s;
}
.es-tech-modal__close:hover,
.es-tech-modal__prev:hover,
.es-tech-modal__next:hover {
	background: rgba(255,255,255,0.22);
	border-color: rgba(255,255,255,0.20);
}
.es-tech-modal__close { width: 38px; height: 38px; }
.es-tech-modal__prev,
.es-tech-modal__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	z-index: 2;
}
.es-tech-modal__prev { left: 24px; }
.es-tech-modal__next { right: 24px; }
.es-tech-modal__prev:hover { transform: translateY(-50%) translateX(-2px); }
.es-tech-modal__next:hover { transform: translateY(-50%) translateX(2px); }

.es-tech-modal__close svg,
.es-tech-modal__prev svg,
.es-tech-modal__next svg { width: 22px; height: 22px; }

/* Stage — image area */
.es-tech-modal__figure {
	grid-area: stage;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	min-height: 0;
	position: relative;
}
.es-tech-modal__img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
}
.es-tech-modal__img {
	max-width: 100%;
	max-height: 100%;
	background: #fff;
	border-radius: 12px;
	object-fit: contain;
	user-select: none;
	box-shadow: 0 30px 80px rgba(0,0,0,0.6);
	padding: 16px;
	box-sizing: border-box;
}
.es-tech-modal__caption {
	margin-top: 14px;
	color: rgba(255,255,255,0.65);
	font-size: 12px;
	text-align: center;
	max-width: 80%;
}

/* Thumb strip */
.es-tech-modal__thumbs {
	grid-area: thumbs;
	list-style: none;
	margin: 18px 0 0;
	padding: 8px;
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: nowrap;
	overflow-x: auto;
	background: rgba(255,255,255,0.04);
	border-radius: 12px;
	scrollbar-width: thin;
}
.es-tech-modal__thumbs::-webkit-scrollbar { height: 6px; }
.es-tech-modal__thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }
.es-tech-modal__thumbs li { margin: 0; flex: 0 0 auto; }
.es-tech-modal__thumbs button {
	background: #fff;
	border: 2px solid transparent;
	border-radius: 8px;
	padding: 0;
	cursor: pointer;
	width: 64px;
	height: 64px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .15s, transform .15s;
}
.es-tech-modal__thumbs button:hover {
	border-color: rgba(245,124,0,0.5);
	transform: translateY(-2px);
}
.es-tech-modal__thumbs button.is-active {
	border-color: var(--es-tech-orange);
	box-shadow: 0 4px 12px rgba(245,124,0,0.4);
}
.es-tech-modal__thumbs img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	padding: 4px;
}

@media (max-width: 767px) {
	.es-tech-modal__inner { padding: 14px 16px 18px; }
	.es-tech-modal__title { font-size: 13px; }
	.es-tech-modal__title-counter { font-size: 11px; }
	.es-tech-modal__close { width: 34px; height: 34px; }
	.es-tech-modal__prev,
	.es-tech-modal__next { width: 40px; height: 40px; }
	.es-tech-modal__prev { left: 8px; }
	.es-tech-modal__next { right: 8px; }
	.es-tech-modal__img { padding: 8px; border-radius: 8px; }
	.es-tech-modal__thumbs button { width: 52px; height: 52px; }
}
