﻿:root {
    /* Identidad ZR: negro dominante, blanco/gris claro de fondo, dorado como
       acento moderado (ver design-system.css). Estas variables heredadas se
       mantienen por compatibilidad con archivos aún no migrados a los tokens
       --color-*, pero sus valores ya son los de ZR. */
    --primary-color: #000000; /* negro — color primario ZR */
    --primary-light: #2a2a2a; /* variante clara de primario (sin uso actual) */
    --primary-soft: #f2f2f2; /* fondo suave neutro (sin uso actual) */

    --secondary-color: #5c5c5c; /* gris — texto secundario, AA sobre blanco */
    --secondary-light: #f9f9f9; /* fondo gris claro ZR */
    --secondary-muted: #cfcabf; /* gris cálido — bordes */

    --accent-color: #1a1a1a; /* negro suave — énfasis/hover, nunca dorado (texto) */
    --accent-soft: #f2f2f2; /* (sin uso actual) */
    --accent-dark: #000000; /* negro puro — hover/estado intensificado */

    --color-olive-dark: #000000; /* antes verde oliva oscuro — ahora negro ZR */
    --color-olive: #1a1a1a; /* antes verde oliva medio — ahora negro suave ZR */
    --color-olive-light: #cfcabf; /* (sin uso actual) */

    --neutral-white: #ffffff;
    --neutral-light: #f9f9f9; /* fondo claro ZR */
    --neutral-gray: #5c5c5c; /* antes #9e9e9e, no pasaba AA como texto */
    --neutral-dark: #000000;

    --color-charcoal: #000000; /* antes verde oscuro — ahora negro ZR */
    --color-graphite: #000000; /* antes verde oscuro medio — ahora negro ZR */

    /* Sombreada por design-system.css (carga después); alineada al mismo valor
       para no tener dos fuentes de verdad. */
    --color-border: #e4e1da;

    --gray-100: #f2f2f2;
    --gray-200: #e1e1e1;
    --gray-300: #c7c7c7;
    --gray-400: #9a9a9a;
    --gray-500: #6e6e6e;
    --gray-600: #4a4a4a;
    --gray-700: #2e2e2e;
    --gray-800: #1e1e1e;
    --gray-900: #121212;

    --font-family-title: "GoogleSans", sans-serif;
    --font-family-body: "GoogleSans", sans-serif;

    /* BASE */
    --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8rem);
    --text-sm: clamp(0.85rem, 0.8rem + 0.3vw, 0.95rem);
    --text-base: clamp(1rem, 0.95rem + 0.4vw, 1.1rem);

    /* HEADINGS */
    --text-md: clamp(1.2rem, 1.1rem + 0.6vw, 1.4rem);
    --text-lg: clamp(1.5rem, 1.3rem + 1vw, 1.8rem);
    --text-xl: clamp(1.8rem, 1.5rem + 1.5vw, 2rem);
    --text-xxl: clamp(2.2rem, 1.8rem + 2vw, 2.5rem);

    --border-radius: 0.875rem;
    --border-radius-full: 2rem;

    /* Touch targets mínimos (WCAG 2.5.5) */
    --touch-min: 44px;
    --touch-comfortable: 48px;

    /* Safe areas (notch / home indicator en iOS) */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);

    --svg-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 189.334 133.799' preserveAspectRatio='none'%3E%3Cpath d='M142,27.04c-20.252,0-37.914-5.443-47.333-13.52S67.585,0,47.333,0C27.082,0,9.42,5.443,0,13.52v119.869h94.667h94.667V13.52C179.914,21.597,162.252,27.04,142,27.04z'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    font-family: "GoogleSans", sans-serif;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    box-sizing: border-box;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* overflow-x:hidden vive en <html>, no en <body>: si se declara en body,
   body pasa a actuar como contenedor de scroll propio y rompe el cálculo de
   position:sticky de sus descendientes (el Middle Header, por ejemplo) en
   varios navegadores — bug conocido de la combinación overflow-x + sticky. */
html {
    overflow-x: hidden;
}

body {
    background-color: var(--neutral-white);
    color: var(--neutral-dark);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "GoogleSans", sans-serif;
    font-size: var(--font-size-base);

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
}

a {
    color: var(--neutral-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.bodyPag.scrollnone {
    overflow: hidden;
}

/* Previene zoom automático en iOS al enfocar inputs (requiere font-size >= 16px) */
input,
select,
textarea {
    font-size: 1rem;
}

/* elimina flechitas del input tipo numero/cantidad */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* oculta icono de cerrar del input tipo buscador */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
    -webkit-appearance: none;
}

iframe {
    border-radius: var(--border-radius);
}

/* =====================================================
   BTN-PRIMARY
   ===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    background-color: var(--primary-color);
    color: var(--neutral-white);
    font-family: var(--font-family-title);
    font-size: var(--text-sm);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    min-height: 48px;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    white-space: nowrap;
}
.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--neutral-white);
}
.btn-primary:active {
    transform: scale(0.97);
    opacity: 0.92;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    background-color: transparent;
    color: var(--primary-color);
    font-family: var(--font-family-title);
    font-size: var(--text-sm);
    font-weight: 600;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-full);
    cursor: pointer;
    min-height: 48px;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--neutral-white);
}
.btn-secondary:active {
    transform: scale(0.97);
    opacity: 0.92;
}

/* =====================================================
   UTILIDADES
   ===================================================== */

.main-padding {
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.last-section-padding {
    padding-top: 3rem;
    padding-bottom: 6rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header__title {
    font-family: var(--font-family-title);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--accent-dark);
    margin: 0;
    line-height: 1.2;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.section-header__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        gap 0.2s ease,
        color 0.2s ease;
}
.section-header__cta:hover {
    gap: 0.55rem;
    color: var(--accent-dark);
}

.section-header__nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Page Hero */
.page-hero {
    background-color: var(--neutral-light);
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
}

.page-hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 680px;
    text-align: center;
}

.page-hero__title {
    font-family: var(--font-family-title);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-charcoal);
    margin: 0 0 0.65rem;
    line-height: 1.2;
}

.page-hero__desc {
    font-family: var(--font-family-body);
    font-size: var(--text-sm);
    color: #5e6e7e;
    margin: 0;
    line-height: 1.65;
    max-width: 50ch;
    margin: 0 auto;
}

.toggle-password {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.eye-open-icon {
    display: none;
    width: 24px;
    height: 24px;
}
.eye-closed-icon {
    display: inline;
    width: 24px;
    height: 24px;
}

.site-header {
    position: relative;
}

/* Top Header, Middle Header y Bottom Header (heredados) migrados a
   public/assets_front/css/header.css bajo el namespace .zr-header__*.
   El Bottom Header (categorías/megamenú por hover) fue eliminado: la
   navegación de categorías vive en #mobileMenu, disparado por el botón
   "Menú" en todos los breakpoints. */

/* =====================================================
   SHARED OVERLAY
   ===================================================== */
.hdr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1px);
}
.hdr-overlay.is-visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* =====================================================
   INICIO PRODUCTS SECTION
   ===================================================== */
.products-section {
    background-color: transparent;
}

/* Swiper */
.productsSwiper {
    width: 100%;
    position: relative;
}

/* Botones posicionados sobre el swiper */
.products-nav__btn--prev,
.products-nav__btn--next {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 10;
}

.products-nav__btn--prev {
    left: 0;
}

.products-nav__btn--next {
    right: 0;
}

/* =====================================================
   INICIO TERMS PAGE
   ===================================================== */

.terms-section {
    background-color: var(--neutral-white);
}

.terms-body {
    max-width: 780px;
    margin: 0 auto;
}

/* ---- Meta ---- */
.terms-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--secondary-muted);
}

.terms-meta__item {
    font-family: var(--font-family-body);
    font-size: 0.8rem;
    color: var(--neutral-gray);
    font-weight: 500;
}

.terms-meta__sep {
    color: #c0ccd6;
    font-size: 0.8rem;
}

/* ---- Intro ---- */
.terms-intro {
    margin-bottom: 2.5rem;
}

.terms-intro p {
    font-family: var(--font-family-body);
    font-size: var(--text-sm);
    color: #3a4a5a;
    line-height: 1.75;
    margin: 0 0 0.875rem;
}

.terms-intro p:last-child {
    margin-bottom: 0;
}

/* ---- Block ---- */
.terms-block {
    padding: 2rem 0;
    border-bottom: 1px solid #eef2f6;
}

.terms-block--last {
    border-bottom: none;
    padding-bottom: 0;
}

.terms-block h2,
.terms-block__title {
    font-family: var(--font-family-title);
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-charcoal);
    margin: 0 0 1.1rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    line-height: 1.3;
}

.terms-block p {
    font-family: var(--font-family-body);
    font-size: var(--text-sm);
    color: #3a4a5a;
    line-height: 1.75;
    margin: 0 0 0.875rem;
}

.terms-block p:last-child {
    margin-bottom: 0;
}

/* ---- Lists ---- */
.terms-block ul,
.terms-list {
    margin: 0.5rem 0 0.875rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.terms-block li,
.terms-list li {
    font-family: var(--font-family-body);
    font-size: var(--text-sm);
    color: #3a4a5a;
    line-height: 1.65;
    padding-left: 1.375rem;
    position: relative;
}

.terms-block li::before,
.terms-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    flex-shrink: 0;
}

/* ---- Link ---- */
.terms-body a,
.terms-link {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.18s ease;
}

.terms-body a:hover,
.terms-link:hover {
    color: var(--accent-dark);
}

/* ==== FIN TERMS PAGE ==== */

/* =====================================================
   SWIPER NAV — CLASE REUTILIZABLE
   ===================================================== */
.swiper-nav__btn {
    min-width: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-graphite);
    background-color: var(--neutral-white);
    color: var(--color-graphite);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease,
        opacity 0.22s ease;
    padding: 0;
}

.swiper-nav__btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--neutral-white);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.swiper-nav__btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.swiper-nav__btn svg {
    height: 22px;
    width: 22px;
}

/* =====================================================
   WHATSAPP FLOAT BUTTON
   ===================================================== */
.wa-float {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: max(16px, calc(16px + var(--safe-right)));
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

/* Panel */
.wa-float__panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: min(288px, calc(100vw - 32px));
    overflow: hidden;
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.2s ease;
    transform-origin: bottom right;
}

.wa-float.is-open .wa-float__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Panel header */
.wa-float__header {
    background: #25d366;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-float__header-icon {
    flex-shrink: 0;
    color: #fff;
    opacity: 0.9;
}

.wa-float__header-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wa-float__header-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.wa-float__header-sub {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.82);
}

/* Contacts list */
.wa-float__contacts {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wa-float__contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.wa-float__contact:hover,
.wa-float__contact:focus-visible {
    background: #f0fdf4;
    outline: none;
}

.wa-float__contact + .wa-float__contact {
    border-top: 1px solid #f3f4f6;
}

/* Avatar */
.wa-float__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #25d366;
}

.wa-float__avatar img {
    border-radius: 50%;
    width: 22px;
    height: 22px;
}

/* Info */
.wa-float__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-float__name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--neutral-dark);
    line-height: 1.3;
}

.wa-float__role {
    font-size: var(--text-xs);
    color: #6b7280;
}

/* CTA icon */
.wa-float__cta {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.wa-float__contact:hover .wa-float__cta {
    background: #128c7e;
    transform: scale(1.08);
}

/* Main button */
.wa-float__btn {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: max(16px, calc(16px + var(--safe-right)));
    z-index: 500;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.48);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    color: #fff;
    text-decoration: none;
}

.wa-float__btn:hover {
    background: #1fba59;
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
    color: #fff;
}

/* Pulse ring */
.wa-float__btn::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.5);
    animation: waPulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* =====================================================
   FIN WHATSAPP FLOAT
   ===================================================== */

/* ================================================================
   PG-HERO — generic internal page hero (reusable: trabaja, contacto, etc.)
   ================================================================ */

.pg-hero {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 3rem 0 2.5rem;
}

.pg-hero__bg {
    position: absolute;
    inset: 0;
}

.pg-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.pg-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.pg-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pg-hero__inner--center {
    align-items: center;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}

.pg-hero__title {
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    font-weight: 700;
    color: var(--neutral-white);
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}

.pg-hero__desc {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
    max-width: 520px;
    margin-bottom: 0;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%) scale(1);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes badgePulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 1px 4px rgba(255, 213, 79, 0.4);
    }
    50% {
        transform: scale(1.14);
        box-shadow: 0 2px 8px rgba(255, 213, 79, 0.55);
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@media screen and (min-width: 768px) {
    /* ==== INICIO COMPONENTES GLOBALES ==== */
    .wa-float__btn {
        bottom: 28px;
        right: 28px;
        width: 58px;
        height: 58px;
    }
    /* ==== FIN COMPONENTES GLOBALES ==== */

    /* ==== INICIO UTILIDADES ==== */
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .last-section-padding {
        padding-top: 4rem;
        padding-bottom: 6rem;
    }

    .section-header__title {
        font-size: var(--text-xl);
    }

    .page-hero {
        padding: 4rem 0 3.5rem;
    }

    .page-hero__title {
        font-size: var(--text-xxl);
    }

    .swiper-nav__btn {
        min-width: 46px;
        width: 46px;
        height: 46px;
    }

    .swiper-nav__btn svg {
        height: 28px;
        width: 28px;
    }

    .terms-section {
        padding-top: 3rem;
        padding-bottom: 4rem;
    }
    /* ==== FIN UTILIDADES ==== */
}

@media screen and (min-width: 992px) {
    .pg-hero {
        min-height: 320px;
        padding: 4rem 0 3.5rem;
    }
}


@media screen and (min-width: 1100px) {
    .container-fluid {
        --bs-gutter-x: 6rem;
    }
}

@media screen and (min-width: 1280px) {
    .wa-float__btn {
        bottom: 16px;
        right: 16px;
    }
}


@media screen and (min-width: 1600px) {
    .container-fluid {
        max-width: 1600px;
    }
}


/* =====================================================
   ACCESSIBILITY — REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hdr-badge {
        animation: none;
    }
}
