/*
Theme Name: MVS Child
Template: hello-elementor
Description: Child theme de Hello Elementor para la web de MVS Representaciones. El diseño vive en Elementor (Global Colors/Fonts + Theme Builder); aquí solo van ajustes puntuales de CSS/PHP.
Author: DevelopHouse
Version: 0.2.0
Text Domain: mvs-child
*/

/* ═══════════════════════════════════════════════════════════════════
   Tokens — alineados con el Global Kit de Elementor y el Manual de Marca.
   Usar var(--mvs-*) en vez de hex sueltos para no acumular drift.
   ═══════════════════════════════════════════════════════════════════ */
:root {
	--mvs-red: #FF0000;          /* rojo primario (Manual V.2) */
	--mvs-red-dark: #CB151A;     /* acento */
	--mvs-ink: #111111;          /* títulos */
	--mvs-body: #333333;         /* cuerpo */
	--mvs-muted: #666666;        /* texto secundario */
	--mvs-line: #e6e6e6;         /* bordes */
	--mvs-line-soft: #f0f0f0;
	--mvs-surface: #fafafa;      /* fondo de imagen en tarjetas */
	--mvs-grey-bar: #EDEDED;     /* barra breadcrumb */
	--mvs-radius: 10px;
	--mvs-shadow-hover: 0 10px 26px rgba(0, 0, 0, .08);
	--mvs-ease: .18s ease;
	--mvs-tap: 44px;             /* área táctil mínima */
}

/* ── Accesibilidad global ─────────────────────────────────────── */
.mvs-sr-only {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--mvs-red);
	outline-offset: 2px;
	border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
	* { transition-duration: .01ms !important; animation-duration: .01ms !important; }
	*:hover, *:focus-within { transform: none !important; }
}

/* ── Encabezado ───────────────────────────────────────────────── */
.mvs-topbar { display: none; padding-block: 5px; }
.mvs-topbar .elementor-widget-text-editor { font-size: 11.5px; letter-spacing: .01em; }
.mvs-topbar p { margin: 0; }
.mvs-topbar a { color: #fff; text-decoration: none; }
.mvs-topbar a:hover, .mvs-topbar a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* En móvil el buscador ocupa una segunda línea completa. */
.mvs-header-row1 { min-height: 64px; flex-wrap: wrap; }
.mvs-header-logo { flex: 0 0 auto; }
.mvs-header-logo img { display: block; max-height: 48px; width: auto; }

.mvs-header-search { flex: 1 0 100%; max-width: none; order: 3; }
.mvs-header-search .elementor-search-form__container,
.mvs-header-search .elementor-search-form__input,
.mvs-header-search .elementor-search-form__submit { min-height: var(--mvs-tap); }

.mvs-header-nav { border-top: 1px solid var(--mvs-line-soft); }
.mvs-header-nav .elementor-widget-nav-menu { width: 100%; }
.mvs-header-nav .elementor-menu-toggle { width: var(--mvs-tap); height: var(--mvs-tap); margin-left: auto; }
.mvs-header-nav .elementor-nav-menu--dropdown a { min-height: 48px; display: flex; align-items: center; }
.mvs-header-nav .elementor-nav-menu > li > a.elementor-item {
	min-height: var(--mvs-tap); padding: 10px 12px; font-size: 13px; letter-spacing: .02em;
}

@media (min-width: 768px) {
	.mvs-topbar { display: flex; }
	.mvs-header-row1 { min-height: 68px; flex-wrap: nowrap; }
	.mvs-header-logo img { max-height: 54px; }
	.mvs-header-search { flex: 0 1 420px; max-width: 420px; order: initial; }
}
@media (min-width: 1025px) {
	.mvs-header-logo img { max-height: 58px; }
	.mvs-header-nav .elementor-nav-menu > li > a.elementor-item { padding: 12px 16px 12px 0; font-size: 12.5px; }
	.mvs-header-nav .elementor-nav-menu > li:not(:last-child) > a.elementor-item { margin-right: 6px; }
}

/* ── Barra gris de ubicación (breadcrumb) ─────────────────────── */
.mvs-breadcrumb { color: var(--mvs-muted); font-size: 11px; line-height: 1.45; text-transform: uppercase; letter-spacing: .03em; }
.mvs-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.mvs-breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.mvs-breadcrumb li + li::before { content: "/"; margin-inline: 8px; color: #999; }
.mvs-breadcrumb a { color: var(--mvs-muted); text-decoration: none; }
.mvs-breadcrumb a:hover { color: var(--mvs-red-dark); text-decoration: underline; text-underline-offset: 3px; }
.mvs-breadcrumb [aria-current="page"] { color: var(--mvs-body); }
@media (min-width: 768px) { .mvs-breadcrumb { font-size: 12px; } }

/* ── Archivo de productos: filtro progresivo + contenido ──────── */
.mvs-archive-row { align-items: flex-start; gap: 20px; }
.mvs-archive-sidebar { flex: 1 1 100%; width: 100%; }
.mvs-archive-main { flex: 1 1 0; min-width: 0; }
.mvs-marcas-filter { width: 100%; border: 1px solid var(--mvs-line); border-radius: 8px; background: #fff; }
.mvs-marcas-filter summary {
	display: flex; align-items: center; justify-content: space-between; min-height: var(--mvs-tap);
	padding: 10px 14px; color: var(--mvs-ink); font-size: 13px; font-weight: 700; text-transform: uppercase;
	cursor: pointer; list-style: none;
}
.mvs-marcas-filter summary::-webkit-details-marker { display: none; }
.mvs-marcas-filter summary::after {
	content: ""; width: 9px; height: 9px; margin-right: 3px;
	border-right: 2px solid var(--mvs-red-dark); border-bottom: 2px solid var(--mvs-red-dark);
	transform: rotate(45deg) translateY(-2px); transition: transform var(--mvs-ease);
}
.mvs-marcas-filter[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.mvs-marcas-filter:not([open]) .mvs-marcas-nav { display: none; }
.mvs-marcas-nav { border-top: 1px solid var(--mvs-line); padding: 8px 14px 12px; }

@media (min-width: 1025px) {
	.mvs-archive-row { flex-direction: row; gap: 32px; }
	.mvs-archive-sidebar { flex: 0 0 190px; width: 190px; border-right: 1px solid var(--mvs-line); padding-right: 18px; }
	.mvs-marcas-filter { border: 0; border-radius: 0; }
	.mvs-marcas-filter summary { display: none; }
	.mvs-marcas-filter:not([open]) .mvs-marcas-nav, .mvs-marcas-nav { display: block; border-top: 0; padding: 0; }
}

/* toolbar: título del archivo + selector de orden */
.mvs-archive-toolbar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mvs-archive-title {
	margin: 0; color: var(--mvs-ink); font-family: "Sequel 100 Black", Poppins, sans-serif;
	font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.08; text-transform: uppercase; overflow-wrap: anywhere;
}

/* ── Sidebar de marcas del archivo ────────────────────────────── */
.mvs-marcas-nav ul { list-style: none; margin: 0; padding: 0; }
.mvs-marcas-nav > ul > li { margin-bottom: 4px; }
.mvs-marcas-nav ul ul { margin: 2px 0 8px 12px; }
.mvs-marcas-nav a {
	display: flex; align-items: center; min-height: var(--mvs-tap); text-decoration: none; color: var(--mvs-body); font-size: 13px;
	padding: 7px 0; text-transform: uppercase; line-height: 1.3; letter-spacing: .01em;
}
.mvs-marcas-nav a.lvl-1 { font-weight: 600; }
.mvs-marcas-nav a.lvl-1::before,
.mvs-marcas-nav a.lvl-2::before { content: "\203A"; color: #b0b0b0; margin-right: 6px; }
.mvs-marcas-nav a.lvl-2::before { color: #cfcfcf; margin-right: 5px; }
.mvs-marcas-nav a:hover { color: var(--mvs-red-dark); }
.mvs-marcas-nav a[aria-current="page"],
.mvs-marcas-nav a.is-active { color: var(--mvs-red-dark); font-weight: 700; }

/* ── Selector de orden A–Z ────────────────────────────────────── */
.mvs-sort { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mvs-muted); text-transform: uppercase; }
.mvs-sort select { border: 1px solid #ccc; border-radius: 6px; padding: 8px 32px 8px 12px; color: var(--mvs-body); font: inherit; background: #fff; min-height: var(--mvs-tap); }

/* ── Grilla de productos: Loop Grid + tarjeta ─────────────────── */
.mvs-product-grid .elementor-grid,
.mvs-product-grid .elementor-loop-container { gap: 22px; }

.mvs-product-grid .e-loop-item { height: 100%; }
.mvs-product-grid .mvs-card {
	position: relative; height: 100%; display: flex; flex-direction: column;
	background: #fff; border: 1px solid #ececec; border-radius: var(--mvs-radius);
	overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	transition: box-shadow var(--mvs-ease), transform var(--mvs-ease), border-color var(--mvs-ease);
}
.mvs-product-grid .mvs-card:hover,
.mvs-product-grid .mvs-card:focus-within {
	border-color: #f3c9cc; box-shadow: 0 10px 26px rgba(255, 0, 0, .10);
}

.mvs-product-grid .mvs-card__img a,
.mvs-product-grid .mvs-card__img .elementor-widget-container { display: block; }
.mvs-product-grid .mvs-card__img img {
	display: block; width: 100%; height: 150px;
	object-fit: contain; object-position: center;
	padding: 18px; background: var(--mvs-surface);
	border-bottom: 1px solid var(--mvs-line-soft);
}

/* nombre — SIEMPRE 2 líneas fijas para alinear todas las tarjetas */
.mvs-product-grid .mvs-card__name { margin-top: auto; }
.mvs-product-grid .mvs-card__name .elementor-widget-container { padding: 12px 12px 16px; }
.mvs-product-grid .mvs-card__name .elementor-heading-title {
	color: var(--mvs-red-dark); font-size: 14px; font-weight: 600; line-height: 1.35;
	text-align: center; text-transform: none; margin: 0;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden; height: calc(1.3em * 2);
}
.mvs-product-grid .mvs-card__name .elementor-heading-title a { color: inherit; text-decoration: none; }
.mvs-product-grid .mvs-card__name .elementor-heading-title a::after { content: ""; position: absolute; inset: 0; }
.mvs-product-grid .mvs-card:focus-within { outline: 2px solid var(--mvs-red-dark); outline-offset: 3px; }
.mvs-product-grid .mvs-card:focus-within .elementor-heading-title a { outline: 0; }
@media (min-width: 768px) { .mvs-product-grid .mvs-card__img img { height: 180px; } }
@media (max-width: 359px) { .mvs-product-grid .elementor-grid, .mvs-product-grid .elementor-loop-container { grid-template-columns: 1fr !important; } }

/* paginación (compartida producto/proyecto/búsqueda) */
.mvs-product-grid .elementor-pagination,
.mvs-product-grid .e-loop-nav,
.mvs-proy-grid .elementor-pagination { text-align: center; margin-top: 30px; }
.elementor-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: var(--mvs-tap); min-height: var(--mvs-tap); padding: 6px 12px; margin: 3px;
	border: 1px solid #e0e0e0; border-radius: 6px; text-decoration: none; color: #444; font-size: 13px;
}
.elementor-pagination .page-numbers.current,
.elementor-pagination a.page-numbers:hover { background: var(--mvs-red-dark); border-color: var(--mvs-red-dark); color: #fff; }

/* ── Ficha de producto ───────────────────────────────────────── */
.mvs-product-featured img {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
	padding: 20px; background: var(--mvs-surface);
}
.mvs-product-description { color: var(--mvs-body); font-size: 16px; line-height: 1.7; }
.mvs-product-description :last-child { margin-bottom: 0; }
.mvs-marca { display: block; font-size: 14px; }
.mvs-marca a { color: var(--mvs-red-dark); text-decoration: none; font-weight: 600; }
.mvs-marca a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mvs-product-details { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 4px; }
.mvs-product-pack { width: 100%; padding-top: 18px; border-top: 1px solid var(--mvs-line); }
.mvs-product-pack h2 { margin: 0 0 8px; color: var(--mvs-ink); font-family: Poppins, sans-serif; font-size: 15px; line-height: 1.35; text-transform: uppercase; }
.mvs-product-pack p { margin: 0; color: var(--mvs-body); line-height: 1.6; }
.mvs-download {
	display: inline-flex; align-items: center; justify-content: center; min-height: var(--mvs-tap);
	padding: 12px 18px; border-radius: 6px; background: var(--mvs-red-dark); color: #fff;
	font-weight: 700; text-decoration: none;
}
.elementor .mvs-download { color: #fff; }
.mvs-download:hover, .mvs-download:focus-visible { background: var(--mvs-ink); color: #fff; }
.mvs-related-products { border-top: 1px solid var(--mvs-line-soft); }

/* ── Nosotros ────────────────────────────────────────────────── */
.mvs-nosotros-text, .mvs-nosotros-img { flex: 1 1 0; min-width: 0; }
.mvs-logos { align-items: center; }
.mvs-logos .mvs-logo img {
	max-height: 46px; width: auto; object-fit: contain;
	filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s;
}
.mvs-logos .mvs-logo:hover img { filter: none; opacity: 1; }

/* ── Soluciones y Servicios ──────────────────────────────────── */
.mvs-servicios { align-items: stretch; }
.mvs-servicio { flex: 1 1 0; min-width: 0; }
.mvs-servicio img { border-radius: var(--mvs-radius); }

/* ── Contacto ────────────────────────────────────────────────── */
.mvs-contacto-datos { flex: 0 0 38%; }
.mvs-contacto-form { flex: 1 1 0; min-width: 0; }
.mvs-contacto-datos p { margin: 0 0 12px; line-height: 1.6; }
.mvs-contacto-datos a { color: var(--mvs-red); }

@media (max-width: 900px) {
	.mvs-nosotros-row, .mvs-servicios, .mvs-contacto-row { flex-direction: column; }
	.mvs-contacto-datos, .mvs-contacto-form,
	.mvs-nosotros-text, .mvs-nosotros-img, .mvs-servicio { flex-basis: 100%; }
}

/* ── Proyectos y Capacitaciones ──────────────────────────────── */
.mvs-proy-grid .elementor-grid,
.mvs-proy-grid .elementor-loop-container { gap: 28px; }
.mvs-proy-card {
	position: relative; height: 100%; display: flex; flex-direction: column;
	background: #fff; border: 1px solid #ececec; border-radius: var(--mvs-radius); overflow: hidden;
	transition: box-shadow var(--mvs-ease), transform var(--mvs-ease);
}
.mvs-proy-card:hover, .mvs-proy-card:focus-within { box-shadow: 0 12px 30px rgba(0, 0, 0, .09); }
.mvs-proy-card__img img { display: block; width: 100%; height: 190px; object-fit: cover; }
.mvs-proy-card__name { margin-top: auto; padding: 16px 18px 22px; }
.mvs-proy-card__name .elementor-heading-title,
.mvs-proy-card__name .elementor-heading-title a { color: var(--mvs-ink); text-decoration: none; font-size: 17px; line-height: 1.25; }
.mvs-proy-card__name .elementor-heading-title a::after { content: ""; position: absolute; inset: 0; }
.mvs-proy-card:focus-within { outline: 2px solid var(--mvs-red-dark); outline-offset: 3px; }
.mvs-proy-card:focus-within .elementor-heading-title a { outline: 0; }
.mvs-proy-card:hover .mvs-proy-card__name a { color: var(--mvs-red-dark); }

.mvs-proy-featured img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.mvs-project-meta { display: grid; grid-template-columns: 1fr; gap: 12px; padding-block: 16px; border-block: 1px solid var(--mvs-line); }
.mvs-project-meta span { color: var(--mvs-body); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.mvs-project-meta strong { display: block; margin-bottom: 2px; color: var(--mvs-muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.mvs-proy-single .elementor-widget-theme-post-content > .elementor-widget-container { max-width: 75ch; }
.mvs-proy-single .elementor-widget-theme-post-content { color: var(--mvs-body); overflow-wrap: anywhere; }
.mvs-proy-single .elementor-widget-theme-post-content p { margin-bottom: 1em; line-height: 1.75; }
.mvs-proy-single .elementor-widget-theme-post-content :where(img, video, iframe) { max-width: 100%; height: auto; }
.mvs-proy-single .elementor-widget-theme-post-content table { display: block; max-width: 100%; overflow-x: auto; }

@media (min-width: 640px) { .mvs-project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .mvs-proy-card__img img { height: 240px; } }

/* ── Buscador / Libro de Reclamaciones ───────────────────────── */
.mvs-search-header h1 { font-family: "Sequel 100 Black", Poppins, sans-serif; font-size: 26px; color: var(--mvs-ink); text-transform: uppercase; margin: 0 0 4px; }
.mvs-search-header h1 { overflow-wrap: anywhere; }
.mvs-search-header h1 span { color: var(--mvs-red-dark); }
.mvs-search-header p { color: #777; font-size: 13px; margin: 0; }
.mvs-empty { max-width: 620px; padding: 28px 24px; border: 1px solid var(--mvs-line); border-radius: var(--mvs-radius); background: var(--mvs-surface); }
.mvs-empty h2 { margin: 0 0 8px; color: var(--mvs-ink); font-size: 22px; }
.mvs-empty p { margin: 0 0 18px; color: var(--mvs-body); }
.mvs-empty a { display: inline-flex; align-items: center; min-height: var(--mvs-tap); color: var(--mvs-red-dark); font-weight: 700; text-underline-offset: 3px; }
.mvs-libro .elementor-form .elementor-field-group { margin-bottom: 10px; }
.mvs-libro .elementor-field-type-html p { color: var(--mvs-ink); }

/* ── Home ────────────────────────────────────────────────────── */
.mvs-home-hero {
	position: relative; isolation: isolate; display: grid; min-height: 460px;
	overflow: hidden; background: #241d1b var(--mvs-hero-poster) center 45% / cover no-repeat;
}
.mvs-home-hero__video,
.mvs-home-hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.mvs-home-hero__video {
	z-index: -2; object-fit: cover; object-position: center 45%; opacity: 0;
	transition: opacity .65s cubic-bezier(.16, 1, .3, 1);
}
.mvs-home-hero.is-playing .mvs-home-hero__video { opacity: 1; }
.mvs-home-hero__shade {
	z-index: -1;
	background: linear-gradient(90deg, rgba(12, 10, 9, .84) 0%, rgba(12, 10, 9, .62) 42%, rgba(12, 10, 9, .16) 76%, rgba(12, 10, 9, .08) 100%);
}
.mvs-home-hero__content {
	width: min(calc(100% - 48px), 1140px); min-height: inherit; margin-inline: auto;
	display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
	padding-block: 56px; color: #fff;
}
.mvs-home-hero h1 {
	max-width: 720px; margin: 0 0 18px; color: #fff;
	font-family: "Sequel 100 Black", Poppins, sans-serif;
	font-size: clamp(2.35rem, 5vw, 4.4rem); line-height: .98; letter-spacing: -.025em;
	text-transform: uppercase; text-wrap: balance;
}
.mvs-home-hero p {
	max-width: 600px; margin: 0 0 28px; color: rgba(255, 255, 255, .92);
	font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.6; text-wrap: pretty;
}
.mvs-home-hero__cta {
	display: inline-flex; align-items: center; justify-content: center; min-height: var(--mvs-tap);
	padding: 12px 22px; border: 2px solid var(--mvs-red-dark); border-radius: 6px;
	background: var(--mvs-red-dark); color: #fff; font-weight: 700; text-decoration: none;
	transition: background-color var(--mvs-ease), border-color var(--mvs-ease), color var(--mvs-ease);
}
.mvs-home-hero__cta:hover { border-color: #fff; background: #fff; color: var(--mvs-ink); }
.mvs-home-hero__cta:focus-visible { outline-color: #fff; outline-offset: 4px; }

.mvs-estrella-carousel .mvs-card { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.mvs-estrella-carousel .swiper-slide { height: auto; }

.mvs-accesos { align-items: stretch; }
.mvs-acceso {
	flex: 1 1 0; text-align: center; align-items: center;
	border: 1px solid #ececec; border-radius: var(--mvs-radius); padding: 28px 22px;
	transition: box-shadow var(--mvs-ease), transform var(--mvs-ease);
}
.mvs-acceso:hover, .mvs-acceso:focus-within { box-shadow: var(--mvs-shadow-hover); transform: translateY(-3px); }
.mvs-acceso .elementor-widget-button { margin-top: 6px; }

@media (max-width: 767px) {
	.mvs-accesos { flex-direction: column; }
	.mvs-home-hero { min-height: 400px; background-position: 58% center; }
	.mvs-home-hero__video { display: none; }
	.mvs-home-hero__shade { background: linear-gradient(90deg, rgba(12, 10, 9, .84), rgba(12, 10, 9, .42)); }
	.mvs-home-hero__content { width: min(calc(100% - 36px), 1140px); padding-block: 44px; }
	.mvs-home-hero h1 { max-width: 12ch; font-size: clamp(2.15rem, 11vw, 3.2rem); }
	.mvs-home-hero p { max-width: 32ch; }
}

@media (prefers-reduced-motion: reduce) {
	.mvs-home-hero__video { display: none; }
}

/* ── Footer ───────────────────────────────────────────────────── */
.mvs-footer-main { display: flex; flex-wrap: wrap; }
.mvs-footer-main .mvs-footer-col { --width: 100%; flex: 1 1 100%; width: 100%; min-width: 0; }
.mvs-footer-col h2 { margin: 0; }
.mvs-footer-col address { font-style: normal; }
.mvs-footer-col p { margin: 0 0 12px; line-height: 1.65; overflow-wrap: anywhere; }
.mvs-footer-col a:not(.elementor-button) { color: #fff; text-decoration-color: rgba(255, 255, 255, .55); text-underline-offset: 3px; }
.mvs-footer-col a:not(.elementor-button):hover { text-decoration-color: #fff; }
.mvs-footer-col .elementor-button { min-height: var(--mvs-tap); }

@media (min-width: 640px) {
	.mvs-footer-main .mvs-footer-contact, .mvs-footer-main .mvs-footer-claims { --width: calc(50% - 14px); flex: 1 1 calc(50% - 14px); width: calc(50% - 14px); }
	.mvs-footer-main .mvs-footer-location { --width: 100%; flex: 1 1 100%; width: 100%; }
}
@media (min-width: 1025px) {
	.mvs-footer-main .mvs-footer-col { --width: calc((100% - 80px) / 3); flex: 1 1 0; width: calc((100% - 80px) / 3); }
}

@media (hover: hover) and (pointer: fine) {
	.mvs-product-grid .mvs-card:hover,
	.mvs-proy-card:hover,
	.mvs-acceso:hover { transform: translateY(-3px); }
}
