/* ============================================
   MEDICALNNABIS - RESPONSIVE CSS COMPLETO
   Mínimo: 375px | Máximo: 100%
============================================ */

/* ============================================
   VARIABLES Y RESET MÓVIL
============================================ */
@media screen and (max-width: 1024px) {
    /* Evitar overflow horizontal */
    * {
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    .container {
        padding: 0 15px !important;
        max-width: 100% !important;
    }
}

/* ============================================
   TABLET (768px - 1024px)
============================================ */
@media screen and (max-width: 1024px) {
    /* Header */
    .header-container {
        padding: 0 20px !important;
    }
    
    /* Navegación */
    .nav-menu {
        gap: 1rem !important;
    }
    
    .nav-menu a {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.8rem !important;
    }
    
    /* Hero Section */
    .neon-title {
        font-size: 3.5rem !important;
    }
    
    .subtitle-neon {
        font-size: 1.3rem !important;
    }
    
    /* Cards */
    .info-cards {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
}

/* ============================================
   MÓVIL GRANDE (576px - 768px)
============================================ */
@media screen and (max-width: 768px) {
    /* HEADER MÓVIL */
    .site-header {
        position: relative !important;
        padding: 0.8rem 0 !important;
    }
    
    .header-container {
        padding: 0 15px !important;
        min-height: 50px !important;
    }
    
    /* Logo móvil */
    .site-logo-text {
        font-size: 1.2rem !important;
    }
    
    .logo-text {
        display: none !important;
    }
    
    .logo-icon {
        font-size: 1.3rem !important;
    }
    
    /* Navegación desktop oculta */
    .main-navigation {
        display: none !important;
    }
    
    /* Botón hamburguesa visible */
    .menu-toggle,
    #mobile-menu-toggle {
        display: block !important;
        background: transparent !important;
        border: 2px solid var(--neon-green) !important;
        border-radius: 4px !important;
        width: 35px !important;
        height: 35px !important;
        padding: 0 !important;
        cursor: pointer !important;
        position: relative !important;
    }
    
    .menu-toggle span {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 18px !important;
        height: 2px !important;
        background: var(--neon-green) !important;
        display: block !important;
        transition: all 0.3s ease !important;
    }
    
    .menu-toggle span:nth-child(1) {
        top: 9px !important;
    }
    
    .menu-toggle span:nth-child(2) {
        top: 50% !important;
        transform: translateX(-50%) translateY(-50%) !important;
    }
    
    .menu-toggle span:nth-child(3) {
        bottom: 9px !important;
    }
    
    /* Menú móvil desplegable */
    #mobile-navigation {
        display: none;
        position: relative !important;
        width: 100% !important;
        background: #000 !important;
        border-bottom: 2px solid var(--neon-green) !important;
    }
    
    #mobile-navigation.active,
    #mobile-navigation.show {
        display: block !important;
    }
    
    #mobile-navigation .nav-menu {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #mobile-navigation .nav-menu li {
        border-bottom: 1px solid rgba(0, 255, 136, 0.1) !important;
    }
    
    #mobile-navigation .nav-menu li a {
        display: block !important;
        padding: 12px 20px !important;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 0.95rem !important;
    }
    
    #mobile-navigation .nav-menu li a:hover {
        background: rgba(0, 255, 136, 0.1) !important;
        color: var(--neon-green) !important;
    }
    
    /* Mini cart mobile */
    .mini-cart-toggle {
        padding: 0.5rem !important;
        font-size: 1.1rem !important;
    }
    
    .cart-count {
        width: 16px !important;
        height: 16px !important;
        font-size: 0.65rem !important;
    }
    
    .mini-cart-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }
    
    /* User account mobile */
    .user-account-toggle {
        font-size: 1.2rem !important;
        padding: 0.4rem !important;
    }
    
    .user-account-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 0 !important;
        width: 250px !important;
        max-width: 90% !important;
    }
    
    /* HERO SECTION MÓVIL */
    .hero-section {
        padding: 3rem 1rem !important;
        min-height: auto !important;
    }
    
    .neon-title {
        font-size: 2.5rem !important;
        letter-spacing: 2px !important;
    }
    
    .subtitle-neon {
        font-size: 1.1rem !important;
        letter-spacing: 3px !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }
    
    /* INFO CARDS MÓVIL */
    .info-cards {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 15px !important;
    }
    
    .info-card {
        min-height: 200px !important;
        padding: 1.5rem !important;
    }
    
    .info-card-icon {
        font-size: 2.5rem !important;
    }
    
    .info-card h3 {
        font-size: 1.4rem !important;
    }
    
    .info-card p {
        font-size: 0.95rem !important;
    }
    
    /* PRODUCTOS GRID MÓVIL */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 15px !important;
    }
    
    .product-card {
        padding: 1.5rem !important;
    }
    
    .product-image {
        height: 250px !important;
    }
    
    .product-title {
        font-size: 1.1rem !important;
    }
    
    .product-price {
        font-size: 1.3rem !important;
    }
    
    /* FEATURES MÓVIL */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 15px !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
    }
    
    /* FOOTER MÓVIL */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 15px !important;
    }
    
    .footer-column h3 {
        font-size: 1.2rem !important;
    }
    
    /* BOTONES MÓVIL */
    .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* ============================================
   MÓVIL PEQUEÑO (375px - 576px)
============================================ */
@media screen and (max-width: 576px) {
    /* Ajustes generales */
    body {
        font-size: 14px !important;
    }
    
    /* Header más compacto */
    .header-container {
        padding: 0 10px !important;
    }
    
    .header-actions {
        gap: 5px !important;
    }
    
    /* Hero más compacto */
    .hero-section {
        padding: 2rem 0.5rem !important;
    }
    
    .neon-title {
        font-size: 2rem !important;
        letter-spacing: 1px !important;
    }
    
    .subtitle-neon {
        font-size: 1rem !important;
        letter-spacing: 2px !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* Cards más pequeñas */
    .info-card {
        min-height: 180px !important;
        padding: 1.2rem !important;
    }
    
    .info-card-icon {
        font-size: 2rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .info-card h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .info-card p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    
    /* Productos más compactos */
    .product-card {
        padding: 1rem !important;
    }
    
    .product-image {
        height: 200px !important;
    }
    
    .product-title {
        font-size: 1rem !important;
    }
    
    .product-price {
        font-size: 1.1rem !important;
    }
    
    /* Botones más pequeños */
    .btn {
        padding: 0.7rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Features más compactas */
    .feature-card {
        padding: 1rem !important;
    }
    
    .feature-card i {
        font-size: 2rem !important;
    }
    
    .feature-card h3 {
        font-size: 1rem !important;
    }
    
    .feature-card p {
        font-size: 0.85rem !important;
    }
}

/* ============================================
   MÓVIL MÍNIMO (375px)
============================================ */
@media screen and (max-width: 375px) {
    /* Padding mínimo */
    .container,
    .header-container {
        padding: 0 8px !important;
    }
    
    /* Header ultra compacto */
    .site-header {
        padding: 0.5rem 0 !important;
    }
    
    .menu-toggle {
        width: 32px !important;
        height: 32px !important;
    }
    
    .mini-cart-toggle,
    .user-account-toggle {
        font-size: 1rem !important;
        padding: 0.3rem !important;
    }
    
    /* Hero ultra compacto */
    .hero-section {
        padding: 1.5rem 0.5rem !important;
    }
    
    .neon-title {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .subtitle-neon {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-description {
        font-size: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Cards mínimas */
    .info-card {
        min-height: 150px !important;
        padding: 1rem !important;
    }
    
    .info-card-icon {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .info-card h3 {
        font-size: 1.1rem !important;
    }
    
    .info-card p {
        font-size: 0.8rem !important;
    }
    
    /* Productos mínimos */
    .product-card {
        padding: 0.8rem !important;
    }
    
    .product-image {
        height: 180px !important;
    }
    
    .product-title {
        font-size: 0.95rem !important;
    }
    
    .product-price {
        font-size: 1rem !important;
    }
    
    /* Botones mínimos */
    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Textos generales */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    h4 { font-size: 1rem !important; }
    p { font-size: 0.85rem !important; }
    
    /* Footer mínimo */
    .footer-column h3 {
        font-size: 1rem !important;
    }
    
    .footer-column p,
    .footer-column a {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   FIXES ESPECÍFICOS PARA OVERFLOW
============================================ */
@media screen and (max-width: 768px) {
    /* Prevenir overflow horizontal */
    .hero-bg-animation,
    .glitch-effect,
    .cyber-grid,
    .scanlines {
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    /* Imágenes responsivas */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Tablas responsivas */
    table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }
    
    /* Código y pre */
    pre, code {
        max-width: 100% !important;
        overflow-x: auto !important;
        word-wrap: break-word !important;
    }
    
    /* Formularios */
    input, textarea, select {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Modales */
    .modal,
    .legal-modal-content {
        max-width: 95% !important;
        margin: 2% auto !important;
    }
}

/* ============================================
   PÁGINA SINGLE PRODUCT RESPONSIVE
============================================ */
@media screen and (max-width: 768px) {
    .single-product-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1rem !important;
    }
    
    .product-gallery {
        grid-column: 1 !important;
    }
    
    .product-info {
        grid-column: 1 !important;
    }
    
    .product-title {
        font-size: 1.5rem !important;
    }
    
    .product-price {
        font-size: 1.8rem !important;
    }
    
    .add-to-cart-section form.cart {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .quantity-selector {
        width: 100% !important;
    }
    
    .single_add_to_cart_button {
        width: 100% !important;
    }
}

/* ============================================
   CARRITO Y CHECKOUT RESPONSIVE
============================================ */
@media screen and (max-width: 768px) {
    /* Carrito */
    .woocommerce-cart table.shop_table {
        font-size: 0.85rem !important;
    }
    
    .woocommerce-cart table.shop_table td {
        padding: 0.5rem !important;
    }
    
    .cart-collaterals {
        width: 100% !important;
    }
    
    .cart_totals {
        width: 100% !important;
    }
    
    /* Checkout */
    .woocommerce-checkout .col2-set {
        width: 100% !important;
    }
    
    .woocommerce-checkout .col-1,
    .woocommerce-checkout .col-2 {
        width: 100% !important;
        float: none !important;
    }
    
    .woocommerce-checkout #order_review {
        width: 100% !important;
        float: none !important;
    }
    
    /* Formularios */
    .woocommerce form .form-row {
        width: 100% !important;
    }
    
    .woocommerce form .form-row input,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select {
        width: 100% !important;
    }
}

/* ============================================
   ANIMACIONES MÓVIL (Reducidas)
============================================ */
@media screen and (max-width: 768px) {
    /* Reducir o eliminar animaciones pesadas */
    @keyframes float {
        0%, 100% { transform: none; }
    }
    
    @keyframes pulseGlow {
        from, to { 
            text-shadow: 0 0 10px var(--neon-green);
        }
    }
    
    /* Desactivar efectos pesados en móvil */
    .glitch-effect,
    .cyber-grid,
    .scanlines {
        animation: none !important;
        opacity: 0.1 !important;
    }
}