/* --- TRUCO: OCULTAR HEADER/FOOTER DEL TEMA (Puede variar según tu tema) --- */
header,
footer,
.site-header,
.site-footer {
    display: none !important;
}

/* --- FONDO GENERAL --- */
body {
    background-color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* --- ANIMACIÓN FADE-IN PARA EVITAR FLASHEOS --- */
@keyframes mundoonFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fade-in-load {
    opacity: 0;
    /* Inicia invisible */
    animation: mundoonFadeIn 0.6s ease-out forwards;
    /* Aparece suavemente */
}

/* CONTENEDOR MAESTRO CENTRADO */
.mundoon-master-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
}

/* CABECERA DE MARCA POTENTE */
.mundoon-clean-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* ESTILO DE TARJETA PROFESIONAL */
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
        0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid #f8fafc;
    border: 1px solid #f8fafc;
    width: 100%;
    /* Ocupar todo el ancho disponible */
    box-sizing: border-box;
}

/* LOGO GRANDE Y VISIBLE */
.brand-logo {
    max-height: 120px;
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* NOMBRE "MUNDO ON" IMPONENTE */
.mundoon-clean-header h1 {
    font-size: 2.5rem;
    color: #0f172a;
    font-weight: 900;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* SUBTÍTULO "PANEL TÉCNICO" */
.mundoon-clean-header p {
    font-size: 1.1rem;
    color: #64748b;
    margin: 5px 0 0 0;
    font-weight: 500;
}

/* INDICADOR DE INVENTARIO EN VIVO (NEUROVENTAS) */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: #ecfdf5;
    color: #059669;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* --- BUSCADOR INTELIGENTE (NEUROVENTAS) --- */
.mundoon-search-wrapper {
    margin-bottom: 25px;
    position: relative;
}

#mundoon-search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    color: #334155;
    background: #fff;
    box-sizing: border-box;
    /* Asegurar que el padding no rompa el ancho */
}

#mundoon-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#mundoon-search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* --- ESTILO DE GAVETAS (ACORDEÓN) --- */
.mundoon-master-container .category-drawer {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}

/* CABECERA DE LA GAVETA */
.mundoon-master-container .drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}

.mundoon-master-container .drawer-header:hover {
    background: #f8fafc;
}

.mundoon-master-container .cat-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
    flex-grow: 1;
}

.mundoon-master-container .cat-count {
    background: #eff6ff;
    color: #3b82f6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 15px;
}

.mundoon-master-container .drawer-icon {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.3s;
}

/* CLASE ACTIVA (Cuando se abre) */
.category-drawer.active .drawer-icon {
    transform: rotate(180deg);
}

.category-drawer.active {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- CONTENIDO DE PRODUCTOS --- */
.mundoon-master-container .drawer-content {
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

/* FICHA DE PRODUCTO (DISEÑO LINEAL COMPACTO NEUROVENTAS) */
/* Usamos selectores Específicos para evitar conflictos */
.mundoon-master-container .product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    gap: 10px;
    transition: background 0.2s;
}

.mundoon-master-container .product-card:hover {
    background: #f8fafc;
}

.mundoon-master-container .product-card:last-child {
    border-bottom: none;
}

/* IZQUIERDA: FOTO + TEXTO (Compacto) */
.mundoon-master-container .pc-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    width: auto;
    /* Asegura que no se colapse */
}

.mundoon-master-container .p-thumb {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    /* Prevenir colapso */
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.mundoon-master-container .p-details {
    min-width: 0;
    flex: 1;
}

.mundoon-master-container .p-name {
    display: block !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.3;
    font-size: 0.9rem;
    white-space: normal;
    /* Permitir que el texto baje */
    word-break: break-word;
    /* Romper palabras forzosamente si no caben */
    overflow-wrap: anywhere;
    /* Asegura break en cualquier lugar */
    hyphens: auto;
    overflow: visible;
    text-overflow: unset;
    margin: 0;
    padding-right: 2px;
}

/* DERECHA: PRECIO + ACCIÓN (Todo en línea) */
.mundoon-master-container .pc-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.mundoon-master-container .p-price {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.95rem;
    white-space: nowrap;
    margin: 0;
}

.mundoon-master-container .action-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* INPUT CANTIDAD PEQUEÑO */
.mundoon-master-container .qty-box {
    width: 35px;
    height: 32px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
    margin: 0;
}

.mundoon-master-container .qty-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* BOTÓN PEDIR (Neuroventas: Acción directa) */
.mundoon-master-container .btn-wa {
    background: #22c55e;
    color: white;
    border: none;
    padding: 0 12px;
    height: 32px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mundoon-master-container .btn-wa:hover {
    background: #16a34a;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(34, 197, 94, 0.4);
}

/* --- RESPONSIVE OPTIMIZADO (Mantiene la línea) --- */
/* --- RESPONSIVE OPTIMIZADO (Mantiene la línea) --- */
@media (max-width: 600px) {
    .mundoon-master-container {
        margin: 10px auto;
        padding: 0 4px;
        /* Mínimo padding */
    }

    .mundoon-master-container .product-card {
        padding: 8px 5px;
        gap: 12px;
        /* Aumentado drásticamente para evitar choque */
    }

    /* IZQUIERDA: IMAGEN + NOMBRE */
    .mundoon-master-container .pc-left {
        gap: 8px;
        flex: 1;
        min-width: 0;
        margin-right: 5px;
        /* Margen de seguridad extra contra el precio */
    }

    .mundoon-master-container .p-thumb {
        width: 32px !important;
        /* Más pequeña */
        height: 32px !important;
        min-width: 32px;
        border-radius: 4px;
    }

    .mundoon-master-container .p-name {
        font-size: 0.8rem;
        /* Texto un poco más pequeño */
        line-height: 1;
    }

    /* DERECHA: PRECIO + CANTIDAD + BOTÓN */
    .mundoon-master-container .pc-right {
        gap: 4px;
        /* Todo pegadito */
        flex-shrink: 0;
        /* No se encoge */
        width: auto;
    }

    .mundoon-master-container .p-price {
        font-size: 0.8rem;
        margin-right: 2px;
    }

    .mundoon-master-container .action-box {
        gap: 3px;
    }

    .mundoon-master-container .qty-box {
        width: 28px;
        /* Muy estrecho */
        height: 28px;
        font-size: 0.8rem;
        padding: 0;
    }

    .mundoon-master-container .btn-wa {
        height: 28px;
        padding: 0 8px;
        /* Padding lateral mínimo */
        font-size: 0.7rem;
        /* Texto pequeño pero legible */
        border-radius: 4px;
        gap: 2px;
        /* Espacio con icono si lo hubiera */
    }
}