/* =========================================================
   Kamax Gallery Widget — v1.4.0
   v1.4.0 — especificidad elevada en .kamax-nav-btn y
            .kamax-slider-container para evitar overrides de tema
   v1.3.0 — editor estático con anchos CSS; flechas generales
            reubicadas debajo del slider en mobile; flechas
            de navegación añadidas a la galería interna de cada card
   v1.2.0 — breakpoint móvil ≤480px: specs colapsadas a 2 columnas,
            tipografía y espaciados ajustados
   ========================================================= */

.kamax-gallery-widget *,
.kamax-gallery-widget *::before,
.kamax-gallery-widget *::after { box-sizing: border-box; }

.kamax-gallery-widget {
	background-color: #0d0d0d;
	padding: 60px 40px;
	overflow: hidden;
	position: relative;
}

/* ── Título sección ───────────────────────────────────────── */
.kamax-gallery-section-title {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 56px;
	font-weight: 400;
	color: #e63946;
	margin: 0 0 40px;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1;
}

/* ── Slider ───────────────────────────────────────────────── */
.kamax-gallery-widget .kamax-slider-container { position: relative; }

.kamax-slider-overflow {
	overflow: hidden;
}

.kamax-slider-track {
	display: flex;
	align-items: stretch;
	will-change: transform;
	transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}

/* Editor: estático, sin transform */
.kamax-editor-static .kamax-slider-track {
	flex-wrap: wrap;
	gap: 24px;
	transform: none !important;
	transition: none !important;
}

/* En el editor el JS no corre, así que los anchos y alturas van por CSS */
.kamax-editor-static .kamax-slide { width: calc(50% - 12px); }
.kamax-editor-static .kamax-card  { height: auto; }

/* ── Slide ────────────────────────────────────────────────── */
.kamax-slide { flex: 0 0 auto; min-width: 0; overflow: hidden; }

/* ── Card ─────────────────────────────────────────────────── */
.kamax-card {
	background-color: #1a1a1a;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden; /* evita desborde de imágenes */
}

/* ── Card header ──────────────────────────────────────────── */
.kamax-card-header { padding: 24px 24px 16px; }

.kamax-card-title {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 32px;
	font-weight: 400;
	color: #fff;
	margin: 0 0 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 1;
}

.kamax-card-description {
	font-size: 13px;
	color: #ccc;
	line-height: 1.65;
	margin: 0;
}

/* ── Galería de imágenes con loop ─────────────────────────── */
/*
  El contenedor es el único positioned ancestor de las imágenes.
  overflow:hidden garantiza que nada se salga hacia slides vecinos.
*/
.kamax-card-gallery {
	position: relative;
	width: 100%;
	height: 240px;
	background-color: #ffffff;  /* FONDO BLANCO del producto */
	flex-shrink: 0;
	overflow: hidden;           /* recorta TODO — imágenes no se filtran */
}

/*
  Cada imagen ocupa todo el área del contenedor con padding interno.
  position:absolute + inset = NO ocupa espacio en el flujo,
  pero sí está recortada por overflow:hidden del padre.
*/
.kamax-gimg {
	position: absolute;
	top: 12px;
	right: 20px;
	bottom: 12px;
	left: 20px;
	width: calc(100% - 40px);
	height: calc(100% - 24px);
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.kamax-gimg--active { opacity: 1; }

/* dots indicadores de foto */
.kamax-gimg-dots {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 5px;
	z-index: 2;
}

.kamax-gimg-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(0,0,0,0.2);
	transition: background 0.3s;
}

.kamax-gimg-dot--active { background: rgba(0,0,0,0.65); }

/* ── Flechas galería interna ──────────────────────────────── */
.kamax-gimg-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.35);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	padding: 0;
	opacity: 0;
	transition: opacity .2s, background .2s;
	outline: none;
}
.kamax-card-gallery:hover .kamax-gimg-btn,
.kamax-gimg-btn:focus { opacity: 1; }
.kamax-gimg-btn:hover  { background: rgba(0,0,0,.6); }
.kamax-gimg-prev { left: 6px; }
.kamax-gimg-next { right: 6px; }

/* ── Specs grid ───────────────────────────────────────────── */
.kamax-card-specs { flex-shrink: 0; }

/*
  6 columnas:
  Fila 1 — 3 celdas × span 2  (AÑO · COLOR · MODELO)
  Fila 2/3 — 2 celdas × span 3 (MOTOR·FRENOS, ILUM·ARR)
*/
.kamax-specs-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	border-top:  1px solid #3a3a3a;
	border-left: 1px solid #3a3a3a;
}

.kamax-specs-grid .kamax-spec-cell:nth-child(-n+3) { grid-column: span 2; }
.kamax-specs-grid .kamax-spec-cell--half            { grid-column: span 3; }

.kamax-spec-cell {
	padding: 14px;
	border-right:  1px solid #3a3a3a;
	border-bottom: 1px solid #3a3a3a;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.kamax-spec-label {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: .5px;
	line-height: 1;
	display: block;
}

.kamax-spec-value {
	font-size: 11px;
	color: #aaa;
	text-transform: uppercase;
	line-height: 1.35;
	display: block;
}

/* ── Botón de descarga ────────────────────────────────────── */
.kamax-card-cta { padding: 0; }

.kamax-btn-download {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 20px;
	background-color: #e63946;
	color: #fff;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease;
	line-height: 1;
}

.kamax-btn-download:hover,
.kamax-btn-download:focus {
	background-color: #c1121f;
	color: #fff;
	text-decoration: none;
	outline: none;
}

.kamax-btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Flechas ──────────────────────────────────────────────── */
.kamax-gallery-widget .kamax-nav-btn {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.25);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background .25s, border-color .25s;
	padding: 0;
	outline: none;
	flex-shrink: 0;
}

.kamax-gallery-widget .kamax-nav-btn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }
.kamax-gallery-widget .kamax-prev { left: -22px; }
.kamax-gallery-widget .kamax-next { right: -22px; }

/* ── Dots paginación ──────────────────────────────────────── */
.kamax-dots-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
}

.kamax-dot {
	width: 10px; height: 10px;
	border-radius: 50%;
	background: rgba(255,255,255,.3);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background .3s, transform .3s;
	outline: none;
}

.kamax-dot--active { background: #e63946; transform: scale(1.3); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
	.kamax-gallery-widget { padding: 50px 24px; }
	.kamax-gallery-section-title { font-size: 44px; }
	.kamax-gallery-widget .kamax-prev { left: -16px; }
	.kamax-gallery-widget .kamax-next { right: -16px; }
}

@media (max-width: 768px) {
	.kamax-gallery-widget { padding: 40px 16px; }
	.kamax-gallery-section-title { font-size: 36px; }
	.kamax-card-title { font-size: 26px; }
	.kamax-gallery-widget .kamax-prev { left: 4px; }
	.kamax-gallery-widget .kamax-next { right: 4px; }
	.kamax-spec-label { font-size: 12px; }
	.kamax-spec-value { font-size: 10px; }
}

@media (max-width: 480px) {
	.kamax-gallery-widget { padding: 28px 12px; }
	.kamax-gallery-section-title { font-size: 28px; margin-bottom: 24px; }

	.kamax-card-header  { padding: 16px 16px 12px; }
	.kamax-card-title   { font-size: 20px; }
	.kamax-card-gallery { height: 200px; }

	/* Flechas galería general: debajo del slider, centradas */
	.kamax-gallery-widget .kamax-slider-container { padding-bottom: 52px; }
	.kamax-gallery-widget .kamax-nav-btn {
		top: auto;
		bottom: 0;
		transform: none;
		width: 40px;
		height: 40px;
	}
	.kamax-gallery-widget .kamax-prev { left: calc(50% - 44px); }
	.kamax-gallery-widget .kamax-next { right: calc(50% - 44px); left: auto; }

	/* Flechas galería interna: siempre visibles en touch */
	.kamax-gimg-btn { opacity: 1; }

	/* Specs: de 6 columnas a 2 */
	.kamax-specs-grid { grid-template-columns: repeat(2, 1fr); }
	.kamax-specs-grid .kamax-spec-cell:nth-child(-n+3) { grid-column: span 1; }
	.kamax-specs-grid .kamax-spec-cell--half            { grid-column: span 1; }

	.kamax-spec-cell  { padding: 10px 12px; }
	.kamax-spec-label { font-size: 11px; }
	.kamax-spec-value { font-size: 10px; }

	.kamax-dots-container { margin-top: 20px; gap: 6px; }
	.kamax-dot { width: 8px; height: 8px; }

	.kamax-btn-download { font-size: 15px; padding: 13px 16px; }
}
