/* WebTersano - Estilos Principales */

/* Configuración base del body con gradientes y efectos de fondo */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.1), transparent),
        linear-gradient(to bottom, #020617 0%, #0f172a 50%, #020617 100%);
    color: #cbd5e1;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Mejorar tap targets en móvil */
@media (max-width: 768px) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Mejorar área de toque para productos */
    .product-card {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
        touch-action: manipulation;
    }

    /* Optimizar scroll en móvil */
    #cart-items {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir zoom en inputs en iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Menú móvil */
    #mobile-menu {
        animation: slideDown 0.3s ease-out;
    }

    #mobile-menu a {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }

    /* Hacer modales más amigables para móvil */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Botones más grandes en móvil */
    button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Inputs más grandes y fáciles de tocar */
    input[type="number"],
    input[type="text"],
    input[type="email"] {
        padding: 1rem;
        font-size: 1.125rem;
        min-height: 48px;
    }

    /* Mejorar accesibilidad táctil de tarjetas */
    .glass-morphism {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }
}

/* Animación para menú móvil */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimizaciones táctiles globales */
button, a, .clickable {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    touch-action: manipulation;
    cursor: pointer;
}

/* Mejorar experiencia de toque en todos los dispositivos */
* {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
}

/* Smooth scrolling para toda la página */
html {
    scroll-behavior: smooth;
}

/* Ocultar scrollbar en elementos específicos */
.hide-scroll::-webkit-scrollbar {
    display: none;
}

.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ruido sutil de fondo */
.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Líneas diagonales sutiles de fondo */
.bg-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 80px,
        rgba(59, 130, 246, 0.02) 80px,
        rgba(59, 130, 246, 0.02) 81px
    );
    pointer-events: none;
    z-index: 1;
}

/* Partículas flotantes sutiles */
.particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat 20s linear infinite;
}

/* Línea de escaneo sutil animada */
.scan-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    animation: scan 8s linear infinite;
}

/* Toast de notificaciones */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: #1e293b;
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-align: center;
    border-radius: 12px;
    padding: 12px;
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Header flotante con efecto glassmorphism */
.header-floating {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Grid tecnológico con perspectiva 3D */
.tech-perspective-grid {
    background-image:
        linear-gradient(to bottom, transparent 0%, rgba(59, 130, 246, 0.05) 100%),
        linear-gradient(rgba(71, 85, 105, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 85, 105, 0.15) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    transform: perspective(1000px) rotateX(60deg) scale(2);
    transform-origin: top center;
}

/* Texto con acento azul elegante */
.text-accent {
    color: #60a5fa;
}

/* Glassmorphism elegante */
.glass-morphism {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(71, 85, 105, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
