/* ===================== XEND Control de Plagas — estilos base ===================== */
/* Paleta inspirada en control de plagas: navy profesional + verde "seguro/ecológico" + ámbar de acento. */

:root {
    --pest-navy: #12283a;
    --pest-navy-2: #0c1c22;
    --pest-navy-light: #1c3a4f;
    --pest-green: #2f9e5b;
    --pest-green-dark: #1f7a44;
    --pest-green-light: #7fd9a0;
    --pest-amber: #e8a33d;
    --pest-teal: #2f7d7d;
    --text-light: #f2f7f5;
    --text-muted: #b9c8ca;
    --white: #ffffff;
    --error: #ff6b6b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 45px rgba(10, 25, 20, .18);
    --gradient-accent: linear-gradient(135deg, var(--pest-green), var(--pest-green-dark));
    --gradient-hero: linear-gradient(160deg, var(--pest-navy), var(--pest-navy-2));
    --font-main: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-main);
    background: #f6f9f8;
    color: #1c2b27;
    line-height: 1.55;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(31, 122, 68, .28);
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-outline {
    background: transparent;
    border-color: var(--pest-green);
    color: var(--pest-green-dark);
}
.btn-ghost {
    background: transparent;
    border-color: #d9e3df;
    color: #5c6f6a;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pest-navy-light);
    color: var(--pest-green-light);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: var(--pest-navy);
    border-bottom: 3px solid var(--pest-green);
    transition: transform .4s cubic-bezier(.22, .8, .24, 1), box-shadow .3s ease;
}
/* Se esconde al bajar, vuelve al subir (main.js). En el expediente del inicio queda bloqueado arriba. */
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.site-header.is-hidden,
body.header-locked .site-header { transform: translateY(-105%); box-shadow: none; }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; max-width: 180px; object-fit: contain; display: block; }
/* Logo de X Plagas en el header: un poco más alto en escritorio para que se lea el lema */
@media (min-width: 641px) { .site-header .logo-img { height: 54px; max-width: 200px; } }
.logo-badge {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--gradient-accent);
    color: var(--white);
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { color: var(--text-light); font-size: 18px; letter-spacing: .5px; }
.logo-text small { color: var(--pest-green-light); font-size: 11px; }

.main-nav { display: flex; gap: 26px; }
.main-nav a { position: relative; color: var(--text-muted); font-weight: 600; font-size: 15px; padding: 6px 2px; transition: color .2s ease; }
.main-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--pest-green); border-radius: 2px;
    transform: scaleX(0); transition: transform .3s cubic-bezier(.22, .8, .24, 1);
}
.main-nav a:hover, .main-nav a.active { color: var(--text-light); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

/* Entrada escalonada de los links del menú al cargar la página (escritorio) */
@media (min-width: 641px) and (prefers-reduced-motion: no-preference) {
    .main-nav a { animation: nav-in .5s cubic-bezier(.22, .8, .24, 1) backwards; }
    .main-nav a:nth-child(2) { animation-delay: .06s; }
    .main-nav a:nth-child(3) { animation-delay: .12s; }
    .main-nav a:nth-child(4) { animation-delay: .18s; }
    .main-nav a:nth-child(5) { animation-delay: .24s; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } }

.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-toggle {
    position: relative;
    background: transparent; border: none; color: var(--text-light);
    cursor: pointer; padding: 8px;
}
.cart-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--pest-amber); color: var(--pest-navy-2);
    font-size: 11px; font-weight: 800;
    min-width: 18px; height: 18px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-light); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--gradient-hero);
    color: var(--text-light);
    padding: 100px 0 90px;
    overflow: hidden;
    text-align: center;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(10, 22, 26, .92), rgba(10, 22, 26, .68) 55%, rgba(10, 22, 26, .92));
}
.hero-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 25%, rgba(47, 158, 91, .22), transparent 55%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.eyebrow {
    display: inline-block;
    background: rgba(127, 217, 160, .12);
    color: var(--pest-green-light);
    border: 1px solid rgba(127, 217, 160, .35);
    padding: 6px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 700; letter-spacing: .5px;
    margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 20px; line-height: 1.15; font-weight: 800; }
.hero-word {
    display: inline-block;
    background: linear-gradient(90deg, var(--pest-green-light), var(--pest-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity .25s ease;
}
.hero-subtitle { color: var(--text-muted); font-size: 17px; max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
    position: relative;
    background: var(--gradient-hero);
    color: var(--text-light);
    padding: 70px 0 60px;
    text-align: center;
    overflow: hidden;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); margin: 14px 0; }
.page-hero p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.page-hero .container { position: relative; z-index: 2; }
/* Banner con foto de los archivos + filtro oscuro (sobre nosotros, contacto) */
.page-hero.has-photo { padding: 110px 0 100px; background: var(--pest-navy-2); }
.page-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    animation: hero-zoom 16s ease-out forwards;
}
.page-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(18, 40, 58, .93), rgba(12, 28, 34, .8) 55%, rgba(31, 122, 68, .55));
}
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .page-hero-bg { animation: none; } }
@media (max-width: 640px) { .page-hero.has-photo { padding: 80px 0 70px; } }

/* Botón blanco para fondos de color (buen contraste) */
.btn-white { background: #fff; color: var(--pest-green-dark); box-shadow: 0 10px 25px rgba(0, 0, 0, .18); }
.btn-white:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }

.products-hero.has-photo { padding-bottom: 120px; }   /* las tarjetas Hogar/Empresa suben 44px sobre el banner */

/* ---------- Decoración vectorial de plagas: bichos con forma reconocible
   (ratón, cucaracha) que recorren libremente toda la sección, no una franja recta ---------- */
.pest-roam {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.pest-roam-light { opacity: .16; }
.pest-roam-dark { opacity: .09; }

.pest-bug {
    position: absolute;
    width: 34px; height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    will-change: transform, left, top;
}

/* Ratón (perfil, con orejas, cola y patas) */
.pest-bug-mouse {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='26' viewBox='0 0 40 26'%3E%3Cg fill='none' stroke='%237fd9a0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M33,15 Q40,10 37,3'/%3E%3Cellipse cx='20' cy='16' rx='11' ry='6.5'/%3E%3Ccircle cx='9' cy='13' r='4.3'/%3E%3Ccircle cx='6' cy='8' r='2.3'/%3E%3Cline x1='14' y1='21' x2='12' y2='25'/%3E%3Cline x1='25' y1='21' x2='27' y2='25'/%3E%3C/g%3E%3C/svg%3E");
}
.pest-roam-dark .pest-bug-mouse {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='26' viewBox='0 0 40 26'%3E%3Cg fill='none' stroke='%2312283a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M33,15 Q40,10 37,3'/%3E%3Cellipse cx='20' cy='16' rx='11' ry='6.5'/%3E%3Ccircle cx='9' cy='13' r='4.3'/%3E%3Ccircle cx='6' cy='8' r='2.3'/%3E%3Cline x1='14' y1='21' x2='12' y2='25'/%3E%3Cline x1='25' y1='21' x2='27' y2='25'/%3E%3C/g%3E%3C/svg%3E");
}

/* Cucaracha (vista superior, con antenas, cuerpo ovalado y 3 pares de patas) */
.pest-bug-roach {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='28' viewBox='0 0 40 28'%3E%3Cg fill='none' stroke='%237fd9a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='22' cy='14' rx='13' ry='6.5'/%3E%3Cellipse cx='9' cy='14' rx='4' ry='3.5'/%3E%3Cline x1='6' y1='11' x2='0' y2='4'/%3E%3Cline x1='6' y1='17' x2='0' y2='24'/%3E%3Cline x1='14' y1='9' x2='6' y2='2'/%3E%3Cline x1='20' y1='8' x2='14' y2='0'/%3E%3Cline x1='27' y1='9' x2='24' y2='1'/%3E%3Cline x1='14' y1='19' x2='6' y2='26'/%3E%3Cline x1='20' y1='20' x2='14' y2='28'/%3E%3Cline x1='27' y1='19' x2='24' y2='27'/%3E%3C/g%3E%3C/svg%3E");
}
.pest-roam-dark .pest-bug-roach {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='28' viewBox='0 0 40 28'%3E%3Cg fill='none' stroke='%2312283a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='22' cy='14' rx='13' ry='6.5'/%3E%3Cellipse cx='9' cy='14' rx='4' ry='3.5'/%3E%3Cline x1='6' y1='11' x2='0' y2='4'/%3E%3Cline x1='6' y1='17' x2='0' y2='24'/%3E%3Cline x1='14' y1='9' x2='6' y2='2'/%3E%3Cline x1='20' y1='8' x2='14' y2='0'/%3E%3Cline x1='27' y1='9' x2='24' y2='1'/%3E%3Cline x1='14' y1='19' x2='6' y2='26'/%3E%3Cline x1='20' y1='20' x2='14' y2='28'/%3E%3Cline x1='27' y1='19' x2='24' y2='27'/%3E%3C/g%3E%3C/svg%3E");
}

.roam-a { animation: roam-a 24s ease-in-out infinite; }
.roam-b { animation: roam-b 29s ease-in-out infinite 4s; }
.roam-c { animation: roam-c 21s ease-in-out infinite 9s; }
.roam-d { animation: roam-d 26s ease-in-out infinite 2s; }

@keyframes roam-a {
    0%   { left: -6%;  top: 78%; transform: rotate(-4deg); }
    18%  { left: 20%;  top: 38%; transform: rotate(10deg); }
    36%  { left: 42%;  top: 62%; transform: rotate(-8deg) scaleX(-1); }
    54%  { left: 65%;  top: 22%; transform: rotate(6deg) scaleX(-1); }
    72%  { left: 85%;  top: 55%; transform: rotate(-6deg) scaleX(-1); }
    100% { left: 108%; top: 15%; transform: rotate(4deg) scaleX(-1); }
}
@keyframes roam-b {
    0%   { left: 106%; top: 20%; transform: rotate(2deg) scaleX(-1); }
    22%  { left: 78%;  top: 68%; transform: rotate(-10deg) scaleX(-1); }
    40%  { left: 52%;  top: 30%; transform: rotate(8deg); }
    60%  { left: 30%;  top: 75%; transform: rotate(-6deg); }
    80%  { left: 8%;   top: 42%; transform: rotate(5deg); }
    100% { left: -8%;  top: 60%; transform: rotate(0deg); }
}
@keyframes roam-c {
    0%   { left: -6%;  top: 25%; transform: rotate(6deg); }
    20%  { left: 24%;  top: 82%; transform: rotate(-6deg); }
    45%  { left: 50%;  top: 45%; transform: rotate(9deg) scaleX(-1); }
    65%  { left: 74%;  top: 78%; transform: rotate(-4deg) scaleX(-1); }
    85%  { left: 92%;  top: 30%; transform: rotate(5deg) scaleX(-1); }
    100% { left: 108%; top: 48%; transform: rotate(0deg) scaleX(-1); }
}
@keyframes roam-d {
    0%   { left: 105%; top: 82%; transform: rotate(-3deg) scaleX(-1); }
    24%  { left: 76%;  top: 32%; transform: rotate(8deg) scaleX(-1); }
    48%  { left: 48%;  top: 70%; transform: rotate(-9deg); }
    68%  { left: 22%;  top: 25%; transform: rotate(6deg); }
    86%  { left: 4%;   top: 60%; transform: rotate(-4deg); }
    100% { left: -8%;  top: 40%; transform: rotate(0deg); }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; position: relative; }
.section-title { font-size: 30px; margin: 0 0 30px; font-weight: 800; color: var(--pest-navy); }
.section-cta { text-align: center; margin-top: 34px; }

/* ---------- Split (Casa / Empresa) ---------- */
.split-section { padding-top: 0; margin-top: -44px; position: relative; z-index: 5; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.split-card {
    border-radius: var(--radius);
    padding: 34px 30px;
    color: var(--white);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .2s ease;
    display: block;
}
.split-card:hover { transform: translateY(-4px); }
.split-icon { font-size: 34px; }
.split-card h3 { font-size: 24px; margin: 14px 0 10px; }
.split-card p { color: rgba(255,255,255,.85); margin: 0 0 16px; font-size: 14.5px; }
.split-cta { font-weight: 700; font-size: 14px; }
.split-hogar { background: linear-gradient(135deg, var(--pest-green-dark), #123a24); }
.split-empresa { background: linear-gradient(135deg, var(--pest-navy-light), var(--pest-navy-2)); border: 1px solid rgba(127, 217, 160, .2); }

/* Foto de fondo a la derecha; el color de cada tarjeta cubre la mitad izquierda
   (sólido hasta el 50 % y se desvanece) y el texto no pasa del 44 % */
.split-card { position: relative; overflow: hidden; isolation: isolate; }
.split-bg {
    position: absolute; inset: 0 0 0 30%; z-index: -2;
    background-size: cover; background-position: center;
    transition: transform .7s cubic-bezier(.22, .8, .24, 1);
}
.split-card::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.split-hogar::after { background: linear-gradient(90deg, #1f7a44 0%, #185f36 50%, rgba(24, 95, 54, 0) 78%); }
.split-empresa::after { background: linear-gradient(90deg, #1c3a4f 0%, #12283a 50%, rgba(18, 40, 58, 0) 78%); }
.split-card:hover .split-bg { transform: scale(1.06); }
.split-card h3, .split-card p, .split-cta { max-width: 44%; }
.split-cta { display: inline-block; }
@media (max-width: 900px) {
    .split-card h3, .split-card p, .split-cta { max-width: 60%; }
    .split-bg { left: 40%; }
    .split-hogar::after { background: linear-gradient(90deg, #1f7a44 0%, #185f36 62%, rgba(24, 95, 54, 0) 88%); }
    .split-empresa::after { background: linear-gradient(90deg, #1c3a4f 0%, #12283a 62%, rgba(18, 40, 58, 0) 88%); }
}

.filter-panel.active { outline: 3px solid var(--pest-amber); outline-offset: 3px; }

/* ---------- Filter bar (Productos) ---------- */
.filter-bar { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn {
    padding: 10px 20px; border-radius: 999px;
    border: 2px solid #dbe6e1; background: #fff;
    font-weight: 700; cursor: pointer; color: #5c6f6a;
}
.filter-btn.active { background: var(--gradient-accent); color: #fff; border-color: transparent; }

/* ---------- Product cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 22px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(10, 25, 20, .08);
    display: flex; flex-direction: column;
    overflow: hidden;
    border: 1px solid #e7efe9;
    position: relative;
}
.product-badge {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    padding: 5px 12px; border-radius: 999px; color: #fff;
    letter-spacing: .4px;
}
.badge-hogar { background: var(--pest-green-dark); }
.badge-empresa { background: var(--pest-navy); }

/* Contenedor de imagen con relación de aspecto fija: cualquier foto,
   sin importar su tamaño original, se recorta y centra sin deformarse. */
.product-media {
    position: relative;
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
    background: var(--gradient-hero);
}
.product-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.product-body { padding: 18px 20px 6px; flex: 1; }
.product-body h3 { font-size: 17px; margin: 0 0 8px; color: var(--pest-navy); }
.product-body p { font-size: 13.5px; color: #62756f; margin: 0; }
.product-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 20px; gap: 10px;
}
.product-price { font-weight: 800; font-size: 17px; color: var(--pest-green-dark); }
.product-price small { display: block; font-weight: 500; font-size: 11px; color: #8a9a94; }

/* ---------- Servicio a cotizar: tarjeta que gira (frente / reverso) ---------- */
.product-flip {
    min-height: 440px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
    perspective: 1400px;
    cursor: pointer;
    outline: none;
}
.flip-inner {
    position: relative;
    flex: 1;
    transform-style: preserve-3d;
    transition: transform .75s cubic-bezier(.3, .8, .25, 1);
}
@media (hover: hover) {
    .product-flip:hover .flip-inner { transform: rotateY(180deg); }
}
.product-flip.is-flipped .flip-inner,
.product-flip:focus-visible .flip-inner,
.product-flip:has(:focus-visible) .flip-inner { transform: rotateY(180deg); }
.product-flip:focus-visible .flip-face { box-shadow: 0 0 0 3px var(--pest-amber); }

.flip-face {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: 0 14px 30px rgba(10, 25, 20, .16);
}
.flip-front { background: var(--gradient-hero); }
.flip-front img { width: 100%; height: 100%; object-fit: cover; }
/* Franja oscura para resaltar el título */
.flip-band {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 60px 22px 22px;
    background: linear-gradient(180deg, transparent, rgba(8, 20, 26, .86) 42%, rgba(8, 20, 26, .96));
    color: #fff;
}
.flip-band h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; color: #fff; }
.flip-hint { font-size: 12.5px; font-weight: 700; color: var(--pest-green-light); }

.flip-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding: 26px 22px 22px;
    color: #fff;
    background: var(--pest-navy-2);
    isolation: isolate;
}
.flip-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.flip-back::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 20, 26, .5), rgba(8, 20, 26, .93) 55%); }
.flip-kicker {
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(127, 217, 160, .16);
    color: var(--pest-green-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
}
.flip-back h3 { margin: 0; font-size: 22px; line-height: 1.2; color: #fff; }
.flip-back p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .88); }
.flip-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.flip-actions .btn { width: 100%; }

.btn-light-outline { background: transparent; border-color: rgba(255, 255, 255, .8); color: #fff; }
.btn-light-outline:hover { background: #fff; color: var(--pest-navy); }

@media (max-width: 640px) {
    .product-grid .product-flip { grid-column: 1 / -1; min-height: 400px; }
}

/* ---------- Services (index: mazo de fotos que se despliega) ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px;
}
.service-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.service-card:focus-visible { outline: 3px solid var(--pest-green); outline-offset: 6px; border-radius: var(--radius); }
.service-deck-card,
.service-overlay {
    position: absolute; inset: 0;
    border-radius: var(--radius);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.service-deck-card {
    overflow: hidden;
    background: var(--pest-navy-light);
    box-shadow: 0 10px 25px rgba(10, 25, 20, .16);
}
.service-deck-card img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.service-deck-card.deck-0 { z-index: 3; }
.service-deck-card.deck-1 { z-index: 2; transform: rotate(-4deg) translate(-6px, 4px); }
.service-deck-card.deck-2 { z-index: 1; transform: rotate(4deg) translate(6px, 4px); }
.service-card:hover .deck-0 { transform: translateY(-6px); }
.service-card:hover .deck-1 { transform: rotate(-9deg) translate(-22px, 2px); }
.service-card:hover .deck-2 { transform: rotate(9deg) translate(22px, 2px); }
.service-deck-empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 54px;
}
.service-overlay {
    z-index: 4;
    background: linear-gradient(180deg, rgba(10, 25, 20, 0) 45%, rgba(10, 25, 20, .88) 100%);
    pointer-events: none;
}
.service-name,
.service-count {
    position: absolute; z-index: 5;
    color: #fff;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.service-name {
    left: 0; right: 0; bottom: 0;
    margin: 0; padding: 16px 18px;
    font-size: 15.5px; font-weight: 800; line-height: 1.3;
}
.service-count {
    top: 12px; right: 12px;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(10, 25, 20, .7);
    font-size: 11.5px; font-weight: 700;
}
.service-card:hover .service-overlay,
.service-card:hover .service-name,
.service-card:hover .service-count { transform: translateY(-6px); }

/* Abanico: al tocar la tarjeta, las fotos se despliegan a los lados */
.fan-stage {
    position: fixed; inset: 0; z-index: 90;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 34px; padding: 60px 16px 30px;
    overflow-y: auto;
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear .4s;
}
.fan-stage.open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.fan-backdrop {
    position: fixed; inset: 0;
    background: rgba(8, 20, 26, .92);
    opacity: 0; transition: opacity .3s ease;
}
.fan-stage.open .fan-backdrop { opacity: 1; }
.fan-close {
    position: fixed; top: 16px; right: 18px; z-index: 30;
    width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .14); color: #fff;
    font-size: 28px; line-height: 1; cursor: pointer;
}
.fan-close:hover { background: rgba(255, 255, 255, .26); }
.fan-row {
    --w: min(250px, 56vw);
    --gap: min(190px, calc((100vw - var(--w) - 40px) / max(1, var(--n) - 1)));
    position: relative; z-index: 1;
    flex-shrink: 0;
    width: 100%;
    height: calc(var(--w) * 4 / 3 + 30px);
}
.fan-photo {
    position: absolute; left: 50%; top: 0;
    width: var(--w); aspect-ratio: 3 / 4;
    margin-left: calc(var(--w) / -2);
    padding: 0; border: 4px solid #fff; border-radius: 14px;
    overflow: hidden; background: var(--pest-navy-light);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    cursor: pointer;
    z-index: calc(10 - var(--i));
    transform: scale(.6);
    opacity: 0;
    transition: transform .55s cubic-bezier(.2, .9, .25, 1.15), opacity .3s ease;
}
.fan-photo img { width: 100%; height: 100%; object-fit: cover; }
.fan-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 64px; cursor: default; }
.fan-stage.open .fan-photo {
    opacity: 1;
    transform: translateX(calc(var(--o) * var(--gap))) translateY(calc(var(--o) * var(--o) * 5px)) rotate(calc(var(--o) * 4deg));
    transition-delay: calc(var(--i) * 45ms);
}
.fan-stage.open .fan-photo:hover,
.fan-stage.open .fan-photo.focused {
    z-index: 20;
    transform: translateX(calc(var(--o) * var(--gap))) translateY(-10px) scale(1.12);
    transition-delay: 0s;
}
.fan-info {
    position: relative; z-index: 1;
    max-width: 640px; text-align: center; color: var(--text-light);
    opacity: 0; transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease;
}
.fan-stage.open .fan-info { opacity: 1; transform: none; transition-delay: .2s; }
.fan-info h3 { margin: 0 0 8px; font-size: 24px; color: #fff; }
.fan-info p { margin: 0 0 18px; color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }
.fan-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fan-actions .btn-outline { color: var(--pest-green-light); border-color: var(--pest-green-light); }
body.fan-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
    .fan-photo, .fan-info, .service-deck-card, .carousel-track { transition: none !important; }
}

/* ---------- Services (página de servicios: detalle) ---------- */
.service-detail-list { display: flex; flex-direction: column; gap: 26px; }
.service-detail-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e7efe9;
    box-shadow: 0 10px 25px rgba(10, 25, 20, .06);
    scroll-margin-top: 90px;
}
.service-detail-media { position: relative; aspect-ratio: 4 / 3; background: var(--pest-navy-light); }

/* Carrusel de fotos con flechas */
.carousel { position: absolute; inset: 0; overflow: hidden; }
.carousel-track {
    display: flex; height: 100%;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.carousel-track img {
    flex: 0 0 100%;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .92); color: var(--pest-navy);
    font-size: 16px; font-weight: 800; cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    transition: background .2s ease, transform .2s ease;
}
.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
    position: absolute; left: 0; right: 0; bottom: 12px;
    display: flex; justify-content: center; gap: 7px;
}
.carousel-dot {
    width: 9px; height: 9px; padding: 0; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .55); cursor: pointer;
    transition: width .2s ease, background .2s ease;
}
.carousel-dot.active { width: 22px; border-radius: 5px; background: #fff; }
.carousel-counter {
    position: absolute; top: 12px; right: 12px;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(10, 25, 20, .7); color: #fff;
    font-size: 12px; font-weight: 700;
}
.service-detail-body {
    padding: 26px 30px;
    display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.service-detail-body .service-icon { font-size: 30px; }
.service-detail-body h2 { margin: 0; color: var(--pest-navy); font-size: 21px; }
.service-detail-body p { margin: 0; color: #62756f; font-size: 14.5px; line-height: 1.65; }
.service-detail-cta { margin-top: 8px; }

/* ---------- Inicio: galería "Nuestros servicios" (foto grande + miniaturas, sin recortes) ---------- */
.home-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    height: 460px;
}
.home-gallery-stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--pest-navy-2);
    box-shadow: var(--shadow);
}
.home-gallery-blur {
    position: absolute; inset: -20px;
    width: calc(100% + 40px); height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(22px) brightness(.55);
}
.home-gallery-main {
    position: relative;
    width: 100%; height: 100%;
    object-fit: contain;
    transition: opacity .35s ease;
}
.home-gallery-main.fading { opacity: 0; }
.home-gallery-caption {
    position: absolute; left: 14px; bottom: 14px;
    padding: 5px 14px; border-radius: 999px;
    background: rgba(10, 25, 20, .75); color: #fff;
    font-size: 13px; font-weight: 700;
}
.home-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 92px;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}
.home-gallery-thumb {
    padding: 0;
    border: 3px solid transparent; border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--pest-navy-light);
    cursor: pointer;
    opacity: .6;
    transition: opacity .2s ease, border-color .2s ease;
}
.home-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.home-gallery-thumb:hover { opacity: .9; }
.home-gallery-thumb.active { opacity: 1; border-color: var(--pest-green); }

@media (max-width: 760px) {
    .home-gallery { grid-template-columns: 1fr; height: auto; }
    .home-gallery-stage { height: 320px; }
    .home-gallery-thumbs {
        grid-template-columns: none;
        grid-auto-flow: column; grid-auto-columns: 84px; grid-auto-rows: 84px;
        overflow-x: auto; overflow-y: hidden;
        padding: 0 0 6px;
    }
}

/* ---------- Pest strip (franja) ---------- */
.pest-strip { padding: 0; }
.pest-strip-inner {
    display: grid; grid-template-columns: repeat(4, 1fr);
}
.pest-item {
    display: flex; align-items: center; justify-content: center;
    padding: 26px 10px;
    color: #fff; text-align: center;
}
.pest-item span { font-size: 34px; line-height: 1; display: inline-block; width: 48px; height: 48px; }
.pest-item .pest-svg { width: 44px; height: 44px; display: block; margin: 2px auto 0; }
.pest-1 { background: var(--pest-navy); }
.pest-2 { background: var(--pest-amber); color: var(--pest-navy-2); }
.pest-3 { background: var(--pest-green-dark); }
.pest-4 { background: var(--pest-navy-2); }

/* ---------- Why us ---------- */
.why-us { background: linear-gradient(180deg, #eef6f1, #e6f1eb); overflow: hidden; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 2; }
.why-item { text-align: center; }
.why-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.why-item h4 { margin: 0 0 8px; font-size: 16px; }
.why-item p { font-size: 13.5px; color: #62756f; margin: 0; }

/* ---------- Sobre nosotros ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item { background: var(--pest-navy); color: #fff; border-radius: var(--radius); padding: 28px 10px; }
.stat-item strong { display: block; font-size: 30px; color: var(--pest-green-light); }
.stat-item span { font-size: 13px; color: var(--text-muted); }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mission-card { background: #fff; border: 1px solid #e7efe9; border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: 0 10px 25px rgba(10,25,20,.06); }
.mission-card h3 { margin: 10px 0; }
.cta-section .cta-box {
    background: var(--gradient-accent); border-radius: var(--radius);
    padding: 50px 30px; text-align: center; color: #fff;
}
.cta-box h2 { margin: 0 0 24px; font-size: 26px; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.contact-info { background: var(--pest-navy); color: #fff; border-radius: var(--radius); padding: 30px; }
.contact-info h3 { margin-top: 0; color: var(--pest-green-light); }
.contact-info p { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }
.contact-info p strong { color: #fff; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; color: #38473f; }
.contact-form input, .contact-form textarea {
    padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid #dbe6e1;
    font-family: inherit; font-size: 14px; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--pest-green); }
.field-error { border-color: var(--error) !important; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.alert-success { background: #e6f9ec; color: #1c7a3c; border: 1px solid #b6e9c5; }
.alert-error { background: #fdecec; color: #b3261e; border: 1px solid #f5c2bf; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pest-navy-2); color: var(--text-muted); padding: 50px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 34px; }
.footer-logo { margin-bottom: 14px; }
.footer-logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; max-width: 100%; }
.footer-logo-row .footer-logo { margin-bottom: 0; max-width: 100%; }
.footer-logo-row .logo-img { height: clamp(30px, 8vw, 42px); max-width: min(45vw, 160px); }
.footer-logo-label { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text-muted); max-width: 110px; }
.footer-logo2-img { height: clamp(26px, 7vw, 36px); width: auto; max-width: min(35vw, 120px); object-fit: contain; }
.footer-col h4 { color: #fff; margin: 0 0 14px; font-size: 15px; }
.footer-col a, .footer-col p { display: block; margin-bottom: 10px; font-size: 13.5px; color: var(--text-muted); }
.footer-col a:hover { color: var(--pest-green-light); }
.footer-virtual-badge { color: var(--pest-green-light); font-weight: 700; }
.contact-wa { display: flex; flex-direction: column; gap: 10px; }
.footer-legal-title { margin-top: 18px; }
.footer-legal-link { cursor: pointer; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 12.5px; color: #6f827c; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; text-align: left; }
.dev-credit { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(185, 200, 202, .28); white-space: nowrap; transition: color .2s ease; }
.dev-credit:hover { color: rgba(185, 200, 202, .7); }
.dev-credit img { height: 26px; width: auto; opacity: .3; transition: opacity .2s ease; }
.dev-credit:hover img { opacity: .75; }

/* ---------- Modales legales ---------- */
body.modal-open { overflow: hidden; }
.legal-modal-overlay {
    position: fixed; inset: 0; background: rgba(6,14,17,.6);
    opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 190;
}
.legal-modal-overlay.open { opacity: 1; pointer-events: auto; }
.legal-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.legal-modal.open { opacity: 1; pointer-events: auto; }
.legal-modal-box {
    background: #fff; color: #1c2b27; border-radius: var(--radius);
    width: min(560px, 100%); max-height: 82vh; overflow-y: auto;
    box-shadow: var(--shadow); transform: translateY(14px); transition: transform .2s ease;
}
.legal-modal.open .legal-modal-box { transform: translateY(0); }
.legal-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; }
.legal-modal-header h3 { margin: 0; color: var(--pest-navy); }
.legal-modal-close { background: none; border: none; font-size: 26px; cursor: pointer; color: #999; line-height: 1; }
.legal-modal-body { padding: 20px 24px 28px; }
.legal-modal-body h4 { color: var(--pest-navy); margin: 18px 0 8px; font-size: 14.5px; }
.legal-modal-body h4:first-child { margin-top: 0; }
.legal-modal-body p { margin: 0 0 10px; font-size: 14px; color: #4b5a56; line-height: 1.6; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
    position: fixed; inset: 0; background: rgba(6,14,17,.55);
    opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 90;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%);
    background: #fff; z-index: 100; box-shadow: -10px 0 30px rgba(0,0,0,.2);
    transform: translateX(100%); transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid #eee; }
.cart-drawer-header h3 { margin: 0; }
.cart-close { background: none; border: none; font-size: 26px; cursor: pointer; color: #999; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty { color: #999; text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f2f2f2; }
.cart-item-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--pest-navy); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
/* Con foto del producto: miniatura clara con borde, en vez del ícono sobre fondo oscuro */
.cart-item-icon.has-img { width: 56px; height: 56px; background: #f3f6f5; border: 1px solid #e3ebe7; overflow: hidden; }
.cart-item-icon.has-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h5 { margin: 0 0 4px; font-size: 14px; }
.cart-item-info span { font-size: 12px; color: #8a9a94; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-weight: 700; }
.cart-item-remove { background: none; border: none; color: var(--error); cursor: pointer; font-size: 12px; margin-left: auto; }
.cart-item-subtotal { font-weight: 800; font-size: 13px; white-space: nowrap; }
.cart-drawer-footer { padding: 18px 20px 22px; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 6px; }

.empty-state { color: #8a9a94; text-align: center; grid-column: 1/-1; padding: 40px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .split-grid, .why-grid, .stats-grid, .mission-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .pest-strip-inner { grid-template-columns: 1fr 1fr; }
    .service-detail-card { grid-template-columns: 1fr; }
    .service-detail-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
    .main-nav {
        position: fixed; top: 66px; left: 0; right: 0; background: var(--pest-navy);
        flex-direction: column; padding: 16px 20px; gap: 14px;
        transform: translateY(-130%); transition: transform .2s ease; z-index: 55;
        border-bottom: 3px solid var(--pest-green);
    }
    .main-nav.open { transform: translateY(0); }
    .nav-toggle { display: flex; }
    .why-grid, .stats-grid, .mission-grid, .footer-grid, .pest-strip-inner { grid-template-columns: 1fr; }
    .split-grid { grid-template-columns: 1fr; }
    .hero { padding: 80px 0 70px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .service-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}

/* =====================================================================
   Juego de plagas (plagas.js): cucarachas y mosquitos que se aplastan
   y atacan letras (inicio y sobre nosotros)
   ===================================================================== */
.plaga-layer {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    overflow: hidden;
}
.plaga-sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.plaga-w { display: inline-block; white-space: nowrap; }
.plaga-l {
    display: inline-block;
    transition: opacity 2s ease, filter 2s ease, transform .6s ease;
}
.plaga-l.is-sucking { animation: plaga-suck .45s ease-in-out infinite alternate; }
.plaga-l.is-sucked { opacity: .3; filter: saturate(.25); transform: scaleY(.75); }
.plaga-l.is-eating { animation: plaga-bite .16s steps(2) infinite; }
.plaga-l.is-eaten { opacity: 0; transform: scale(.15) rotate(25deg); transition: opacity .35s ease, transform .35s ease; }
@keyframes plaga-suck { to { opacity: .65; transform: scaleY(.9); } }
@keyframes plaga-bite { 50% { transform: translateX(1.5px) rotate(-6deg) scale(.9); } }

/* Cucaracha */
.plaga-roach {
    position: absolute; left: 0; top: 0;
    width: 56px; height: 34px; margin: -17px 0 0 -28px;
    pointer-events: auto; cursor: pointer;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: opacity .6s ease;
}
.plaga-roach::before { content: ''; position: absolute; inset: -12px; } /* zona de toque más grande */
.plaga-roach svg { width: 100%; height: 100%; overflow: visible; display: block; }
.plaga-roach .roach-legs { animation: roach-legs .14s steps(2) infinite; transform-origin: 30px 20px; }
.plaga-roach .roach-antenna { animation: roach-antenna .5s ease-in-out infinite alternate; transform-origin: 56px 20px; }
.plaga-roach.is-still .roach-legs { animation: none; }
.plaga-roach .roach-body { transition: transform .12s ease-out; transform-origin: 34px 20px; }
.plaga-roach .roach-splat { opacity: 0; transform: scale(.3); transform-origin: 34px 20px; transition: opacity .12s ease, transform .18s ease-out; }
.plaga-roach.is-squashed { cursor: default; pointer-events: none; }
.plaga-roach.is-squashed .roach-body { transform: scale(1.2, .38); }
.plaga-roach.is-squashed .roach-legs,
.plaga-roach.is-squashed .roach-antenna { animation: none; }
.plaga-roach.is-squashed .roach-splat { opacity: 1; transform: scale(1); }
@keyframes roach-legs { 50% { transform: skewX(14deg); } }
@keyframes roach-antenna { to { transform: rotate(6deg); } }

/* Mosquito (el punto x, y es la punta de la trompa) */
.plaga-mosquito {
    position: absolute; left: 0; top: 0;
    width: 46px; height: 48px; margin: -48px 0 0 -23px;
    pointer-events: auto; cursor: pointer;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: opacity .6s ease;
}
.plaga-mosquito::before { content: ''; position: absolute; inset: -14px; }
.plaga-mosquito svg { width: 100%; height: 100%; overflow: visible; display: block; }
.plaga-mosquito .mq-flip { transform-origin: 23px 48px; transition: transform .15s ease; }
.plaga-mosquito.face-right .mq-flip { transform: scaleX(-1); }
.plaga-mosquito .mq-wings { transform-origin: 26px 17px; animation: mq-wings .05s linear infinite alternate; }
.plaga-mosquito .mq-belly { transform-origin: 34px 23px; transition: fill .6s ease, transform .6s ease; }
.plaga-mosquito .mq-splat { opacity: 0; transform: scale(.3); transform-origin: 23px 30px; transition: opacity .12s ease, transform .18s ease-out; }
.plaga-mosquito.is-squashed { cursor: default; pointer-events: none; }
.plaga-mosquito.is-squashed .mq-wings { animation: none; }
.plaga-mosquito.is-squashed .mq-body { transform: scale(1.1, .45) rotate(8deg); transform-origin: 23px 30px; transition: transform .12s ease-out; }
.plaga-mosquito.is-squashed .mq-splat { opacity: 1; transform: scale(1); }
@keyframes mq-wings { from { transform: scaleY(1); } to { transform: scaleY(.25); } }

.plaga-roach.is-gone,
.plaga-mosquito.is-gone { opacity: 0; }

@media (max-width: 760px) {
    .plaga-roach { width: 44px; height: 27px; margin: -13px 0 0 -22px; }
}

.plaga-plaf {
    position: absolute; left: 0; top: 0;
    color: #fff; font-weight: 900; font-size: 18px;
    text-shadow: 0 2px 0 #b3261e, 0 0 10px rgba(0, 0, 0, .5);
    pointer-events: none; white-space: nowrap;
    animation: plaga-plaf .9s ease-out forwards;
}
@keyframes plaga-plaf {
    from { opacity: 1; transform: translate(-50%, -40px) scale(.6); }
    30%  { transform: translate(-50%, -52px) scale(1.15); }
    to   { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}

.plaga-toast {
    position: absolute; left: 50%; top: 14px;
    max-width: calc(100% - 32px);
    padding: 9px 18px; border-radius: 999px;
    background: #b3261e; color: #fff;
    font-size: 14px; font-weight: 800; text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    pointer-events: none;
    animation: plaga-toast 3.2s ease forwards;
}
.plaga-toast.is-green { background: var(--pest-green-dark); }
@keyframes plaga-toast {
    from { opacity: 0; transform: translate(-50%, -16px); }
    10%, 85% { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -8px); }
}
