/**
 * PCWare -- Footer (2026-10-26). Piel navy sobre el Footer Builder de Kadence.
 *
 * Contrastes medidos (sobre navy #0F172A): blanco 17,86:1 · #F1F5F9 16,30:1 · #94A3B8 6,96:1 ·
 * naranja #FF6B00 6,25:1 · #E66000 5,13:1. NO usar #64748B (3,75:1, falla AA).
 * Barra «Ir al inicio»: #1E293B (slate-800) con texto #F1F5F9 (13,5:1). Hover de la barra #334155.
 *
 * Estructura (administrable en Personalizador > Pie de pagina):
 *   fila superior  = widgets 1-4 (Quienes somos, Contactenos, Informacion legal, Ayuda Compras)
 *   fila media     = widgets 5-6 (Informacion, Eventos) + columna Redes (navegacion + social)
 *   fila inferior  = HTML (datos de la empresa + copyright)
 * Mejora progresiva: assets/js/footer-pcware.js (acordeon <=1024 px y enlaces ofuscados).
 */

/* ── Variables locales ───────────────────────────────────── */
#colophon {
    --pcw-ft-bg: var(--pcw-brand-dark, #0F172A);
    --pcw-ft-text: #F1F5F9;
    --pcw-ft-title: #FFFFFF;
    --pcw-ft-muted: #94A3B8;
    --pcw-ft-line: #1E293B;
    --pcw-ft-accent: var(--pcw-primary, #FF6B00);
    --pcw-ft-accent-hover: var(--pcw-primary-hover, #E66000);
    background: var(--pcw-ft-bg);
    color: var(--pcw-ft-muted);
}

#colophon .site-top-footer-wrap,
#colophon .site-middle-footer-wrap,
#colophon .site-bottom-footer-wrap {
    background: var(--pcw-ft-bg);
}

/* ── Titulos de columna ──────────────────────────────────── */
#colophon .widget-title,
#colophon .widgettitle {
    margin: 0 0 var(--pcw-space-2, 8px);
    color: var(--pcw-ft-title);
    font-size: 0.9375rem;      /* 15 px */
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

/* ── Listas de enlaces ───────────────────────────────────── */
#colophon .widget_nav_menu ul,
#colophon .footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#colophon .widget_nav_menu li,
#colophon .footer-navigation li {
    margin: 0;
}

/* Objetivo tactil >= 44 px en movil/tablet. Aplica a <a href> y a los ofuscados (<a role=link>). */
#colophon .widget_nav_menu li a,
#colophon .footer-navigation .footer-menu-container > ul li a,
#colophon .footer-social-inner a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 2px;
    color: var(--pcw-ft-text);
    font-size: 0.9375rem;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;                 /* los ofuscados no tienen href: sin esto el cursor no seria de enlace */
    transition: color 0.15s ease;
}

#colophon .widget_nav_menu li a:hover,
#colophon .footer-navigation .footer-menu-container > ul li a:hover,
#colophon .footer-social-inner a:hover {
    color: var(--pcw-ft-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Foco visible 3:1 (naranja sobre navy = 6,25:1). Cubre enlaces, ofuscados, botones del acordeon y la barra. */
#colophon a:focus-visible,
#colophon button:focus-visible,
.pcw-backtop:focus-visible {
    outline: 3px solid var(--pcw-ft-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Sin JS el enlace ofuscado (sin href) no funciona: se oculta y se muestra el <noscript> con el href real. */
.no-js #colophon .pcw-link-ofuscado {
    display: none;
}

/* ── Redes y comunicacion (navegacion + social) ──────────── */
#colophon .footer-social-inner .footer-social-inner-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

/* Movil/tablet: dos columnas para no alargar el footer (5 enlaces x 44 px). */
@media (max-width: 1024px) {
    #colophon .footer-social-inner .footer-social-inner-wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
    }
}

#colophon .footer-social-inner a {
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    width: auto;
    height: auto;
    box-shadow: none;
}

#colophon .footer-social-inner a svg {
    flex: 0 0 auto;
    fill: currentColor;
}

/* ── Datos de la empresa y copyright ─────────────────────── */
#colophon .footer-html,
#colophon .footer-html .footer-html-inner {
    color: var(--pcw-ft-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

#colophon .footer-html address {
    font-style: normal;
    margin: 0;
}

#colophon .footer-html a {
    color: var(--pcw-ft-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#colophon .site-bottom-footer-wrap {
    border-top: 1px solid var(--pcw-ft-line);
}

/* ── Barra «Ir al inicio» (elemento Kadence Pro en kadence_before_footer) ── */
.pcw-backtop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 8px 16px;
    background: #1E293B;
    color: #F1F5F9;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pcw-backtop:hover {
    background: #334155;
    color: #FFFFFF;
}

.pcw-backtop svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pcw-backtop:focus-visible {
    outline-offset: -3px;
}

/* El desplazamiento suave de «Ir al inicio» lo hace footer-pcware.js (con prefers-reduced-motion); no se
   activa `scroll-behavior` global para no alterar los scrollTo del resto del sitio (paginacion, facetas). */
@media (prefers-reduced-motion: reduce) {
    #colophon a,
    .pcw-backtop {
        transition: none;
    }
}

/* El destino del salto recibe foco por JS (tabindex -1): sin anillo, no es interactivo. */
#wrapper:focus {
    outline: none;
}

/* ── Movil y tablet (<= 1024 px): acordeon ───────────────── */
@media (max-width: 1024px) {
    #colophon .site-footer-row {
        row-gap: 0;
    }

    #colophon .site-top-footer-wrap .site-footer-row-container-inner,
    #colophon .site-middle-footer-wrap .site-footer-row-container-inner {
        padding-top: 0;
        padding-bottom: 0;
    }

    #colophon .site-top-footer-wrap .site-footer-row,
    #colophon .site-middle-footer-wrap .site-footer-row {
        padding-top: var(--pcw-space-2, 8px);
        padding-bottom: var(--pcw-space-2, 8px);
    }

    /* Cada grupo con menu: separador fino; el titulo pasa a ser el boton del acordeon. */
    #colophon .footer-widget-area.widget-area {
        border-bottom: 1px solid var(--pcw-ft-line);
    }

    #colophon .widget_nav_menu .widget-title,
    #colophon .widget_nav_menu .widgettitle {
        margin: 0;
    }

    #colophon .pcw-ft-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 0 2px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        color: var(--pcw-ft-title);
        font: inherit;
        font-weight: 700;
        line-height: 1.3;
        text-align: left;
        text-transform: none;
        cursor: pointer;
    }

    #colophon .pcw-ft-toggle::after {
        content: "";
        flex: 0 0 auto;
        width: 8px;
        height: 8px;
        margin: 0 4px 3px 12px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    #colophon .pcw-ft-toggle[aria-expanded="true"]::after {
        margin-bottom: -3px;
        transform: rotate(-135deg);
    }

    #colophon .pcw-ft-panel[hidden] {
        display: none !important;
    }

    #colophon .pcw-ft-panel {
        padding-bottom: var(--pcw-space-2, 8px);
    }

    #colophon .footer-social,
    #colophon .footer-navigation {
        padding-top: var(--pcw-space-2, 8px);
    }

    /* Fila legal: siempre visible, pero compacta (identificacion del comerciante). */
    #colophon .site-bottom-footer-wrap .site-footer-row-container-inner {
        padding-top: 0;
        padding-bottom: 0;
    }

    #colophon .site-bottom-footer-wrap .site-footer-row {
        padding-top: var(--pcw-space-4, 16px);
        padding-bottom: var(--pcw-space-4, 16px);
    }

    #colophon .footer-html p {
        margin: var(--pcw-space-2, 8px) 0 0;
    }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
    #colophon .pcw-ft-toggle::after {
        transition: none;
    }
}

/* ── Escritorio (>= 1025 px) ─────────────────────────────── */
@media (min-width: 1025px) {
    #colophon .widget_nav_menu li a,
    #colophon .footer-navigation .footer-menu-container > ul li a,
    #colophon .footer-social-inner a {
        min-height: 32px;
    }

    #colophon .site-top-footer-wrap .site-footer-row-container-inner {
        padding-top: var(--pcw-space-7, 48px);
    }
}
