/* ===================================
   STUART-TECH — GLOBAL STYLES
   Estilos compartidos en todas las páginas
   =================================== */

/* ===== Variables CSS ===== */
:root {
    /* Colores Principales */
    --color-fondo: #0b0b0f;
    --color-fondo-secundario: #12121a;
    --color-superficie: #1a1a2e;
    --color-superficie-hover: #222240;
    --color-acento: #00d4ff;
    --color-acento-secundario: #7b2fff;
    --color-acento-terciario: #ff2daa;
    --color-texto: #f0f0f5;
    --color-texto-secundario: #a0a0b8;
    --color-borde: rgba(255, 255, 255, 0.06);

    /* Gradientes */
    --gradiente-principal: linear-gradient(135deg, #00d4ff, #7b2fff);
    --gradiente-boton: linear-gradient(135deg, #7b2fff, #ff2daa);
    --gradiente-boton-hover: linear-gradient(135deg, #ff2daa, #7b2fff);
    --gradiente-tarjeta: linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(18, 18, 26, 0.95));
    --gradiente-glass: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));

    /* Sombras */
    --sombra-glow: 0 0 20px rgba(0, 212, 255, 0.15);
    --sombra-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --sombra-elevada: 0 16px 48px rgba(0, 0, 0, 0.5);

    /* Fuentes */
    --fuente-principal: 'Poppins', sans-serif;
    --fuente-titulo: 'Orbitron', sans-serif;

    /* Bordes */
    --radio-sm: 8px;
    --radio-md: 12px;
    --radio-lg: 20px;
    --radio-xl: 28px;

    /* Transiciones */
    --transicion: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset y Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--color-fondo);
    color: var(--color-texto);
    font-family: var(--fuente-principal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fuente-titulo);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 11, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-borde);
    transition: var(--transicion);
}

.encabezado.scrolled {
    padding: 8px 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.imagen-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-acento);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
    transition: var(--transicion);
}

.imagen-logo:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-texto);
    letter-spacing: 1px;
}

.logo-text h1 span {
    background: var(--gradiente-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* Buscador */
.buscar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
    margin: 0 24px;
    position: relative;
}

.barra-busqueda {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-xl) 0 0 var(--radio-xl);
    padding: 10px 18px;
    width: 100%;
    color: var(--color-texto);
    font-size: 0.9rem;
    font-family: var(--fuente-principal);
    outline: none;
    transition: var(--transicion);
}

.barra-busqueda::placeholder {
    color: var(--color-texto-secundario);
}

.barra-busqueda:focus {
    border-color: var(--color-acento);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: var(--color-superficie-hover);
}

.boton-buscar {
    background: var(--gradiente-boton);
    border: none;
    border-radius: 0 var(--radio-xl) var(--radio-xl) 0;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--fuente-principal);
    padding: 11px 22px;
    white-space: nowrap;
    transition: var(--transicion);
}

.boton-buscar:hover {
    background: var(--gradiente-boton-hover);
    box-shadow: 0 4px 20px rgba(123, 47, 255, 0.4);
    transform: translateY(-1px);
}

/* Carrito */
.carrodecompras {
    position: relative;
}

.boton-carrito {
    background: transparent;
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-md);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transicion);
    color: var(--color-texto);
}

.boton-carrito:hover {
    border-color: var(--color-acento);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: var(--sombra-glow);
}

.imagen-carrito {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.contador-carrito {
    background: var(--gradiente-boton);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -4px;
    right: -4px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(123, 47, 255, 0.4);
}

/* ===== NAVEGACIÓN ===== */
.barra-navegacion {
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0;
    text-align: center;
    position: sticky;
    top: 69px;
    z-index: 900;
    border-bottom: 1px solid var(--color-borde);
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    list-style: none;
}

.nav-links a {
    display: inline-block;
    padding: 8px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    border-radius: var(--radio-xl);
    transition: var(--transicion);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradiente-principal);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--color-acento);
    background: rgba(0, 212, 255, 0.06);
}

.nav-links a:hover::after {
    width: 60%;
}

.nav-links a.active {
    color: var(--color-acento);
    background: rgba(0, 212, 255, 0.08);
}

.nav-links a.active::after {
    width: 60%;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-sm);
    padding: 8px 10px;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transicion);
}

.hamburger:hover {
    border-color: var(--color-acento);
    background: rgba(0, 212, 255, 0.05);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-texto);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay Mobile Menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 12px 30px;
    background: var(--color-fondo-secundario);
    border-bottom: 1px solid var(--color-borde);
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--color-acento);
    transition: var(--transicion);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--color-texto-secundario);
    margin: 0 8px;
}

.breadcrumb .actual {
    color: var(--color-texto);
    font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-fondo-secundario);
    color: var(--color-texto);
    padding: 60px 0 20px;
    margin-top: auto;
    border-top: 1px solid var(--color-borde);
}

.footer-contenido {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-columna {
    display: flex;
    flex-direction: column;
}

.footer-columna .logo-text h1 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.footer-columna > p {
    color: var(--color-texto-secundario);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-titulo {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--color-acento);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--fuente-titulo);
}

.redes-sociales {
    display: flex;
    gap: 12px;
}

.icono-redes {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-borde);
    transition: var(--transicion);
    filter: grayscale(20%);
}

.icono-redes:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
    border-color: var(--color-acento);
    filter: grayscale(0%);
}

.contactanos p {
    margin-bottom: 8px;
    color: var(--color-texto-secundario);
    font-size: 0.9rem;
}

.ciudad {
    font-weight: 700;
    font-size: 1rem !important;
    color: var(--color-texto) !important;
    margin-bottom: 12px !important;
}

.contenedor-mapa {
    border-radius: var(--radio-md);
    overflow: hidden;
    box-shadow: var(--sombra-card);
    height: 180px;
    border: 1px solid var(--color-borde);
}

.mapa {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(80%) brightness(0.7) contrast(1.2);
    transition: var(--transicion);
}

.mapa:hover {
    filter: grayscale(30%) brightness(0.85) contrast(1.1);
}

.footer-copy {
    text-align: center;
    padding-top: 24px;
    margin-top: 40px;
    border-top: 1px solid var(--color-borde);
    color: var(--color-texto-secundario);
    font-size: 0.8rem;
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-flotante {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transicion);
    animation: floatPulse 3s ease-in-out infinite;
}

.whatsapp-flotante:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-flotante img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

@keyframes floatPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ===== BOTÓN VOLVER ARRIBA ===== */
.volver-arriba {
    position: fixed;
    bottom: 96px;
    right: 32px;
    background: var(--color-superficie);
    color: var(--color-acento);
    border: 1px solid var(--color-borde);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transicion);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.volver-arriba.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.volver-arriba:hover {
    background: var(--color-acento);
    color: var(--color-fondo);
    box-shadow: var(--sombra-glow);
    border-color: var(--color-acento);
}

/* ===== SECTION TITLES ===== */
.titulo-seccion {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 12px;
    background: var(--gradiente-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitulo-seccion {
    text-align: center;
    color: var(--color-texto-secundario);
    font-size: 1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== ANIMACIONES DE SCROLL ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== UTILIDADES ===== */
.glass {
    background: var(--gradiente-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-borde);
}

.glow-border {
    border: 1px solid transparent;
    transition: var(--transicion);
}

.glow-border:hover {
    border-color: var(--color-acento);
    box-shadow: var(--sombra-glow);
}

/* ===== RESPONSIVE ===== */

/* TABLET (≤ 992px) */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .encabezado {
        padding: 10px 20px;
    }

    .buscar {
        max-width: 320px;
        margin: 0 16px;
    }

    .barra-navegacion {
        position: relative;
        z-index: 999;
        width: 100%;
        height: auto;
        flex-direction: column;
        background: rgba(18, 18, 26, 0.95);
        padding: 0;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        border: none;
    }

    .barra-navegacion.active {
        max-height: 500px;
        padding: 20px 0;
        border-bottom: 1px solid var(--color-borde);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-links a {
        padding: 14px 20px;
        border-radius: var(--radio-md);
        font-size: 1rem;
        display: block;
    }

    .nav-links a:hover {
        background: rgba(0, 212, 255, 0.1);
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-overlay.active {
        pointer-events: auto;
    }

    .footer-contenido {
        grid-template-columns: 1fr 1fr;
    }
}

/* MOBILE (≤ 768px) */
@media (max-width: 768px) {
    .encabezado {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 12px 10px;
        align-items: center;
        padding: 12px 16px;
    }

    .logo-container {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .carrodecompras {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .hamburger {
        grid-column: 1;
        grid-row: 2;
        /* Restablecer display por defecto que viene del tablet */
    }

    .buscar {
        grid-column: 2 / 4;
        grid-row: 2;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }

    .footer-contenido {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .titulo-seccion {
        font-size: 1.6rem;
    }
}

/* MOBILE SMALL (≤ 480px) */
@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.1rem;
    }

    .boton-buscar {
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .titulo-seccion {
        font-size: 1.4rem;
    }

    .whatsapp-flotante {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .volver-arriba {
        width: 40px;
        height: 40px;
        bottom: 80px;
        right: 24px;
    }
}
