/**
 * Estilos para el módulo de Categorías Mobile en la Home (Diseño Sin Imágenes)
 * y Fix para el botón flotante de WhatsApp sobre el menú inferior.
 */

/* ==========================================================================
   1. CONTENEDOR Y TARJETAS DE CATEGORÍAS (DISEÑO COMPACTO PREMIUM)
   ========================================================================== */
.molino-mobile-cats-wrapper {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 10px 16px 10px;
    background: #ffffff;
    font-family: inherit;
}

.molino-mobile-cats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 2px;
}

.molino-mobile-cats-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.molino-mobile-cats-badge {
    display: inline-block;
    background: #ffefe5;
    color: #e04b16;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.molino-mobile-cats-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* Grilla pixel perfect 2 columnas */
.molino-mobile-cats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.molino-mobile-cat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fdfdfd;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 8px 10px;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.molino-mobile-cat-card:active {
    background: #fff6f2;
    border-color: #fca5a5;
    transform: scale(0.98);
}

/* Caja de micro-icono */
.molino-mobile-cat-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: #f5f6f8;
    border-radius: 6px;
    color: #e04b16;
    transition: background 0.15s ease, color 0.15s ease;
}

.molino-mobile-cat-card:active .molino-mobile-cat-icon-box {
    background: #e04b16;
    color: #ffffff;
}

/* Cuerpo de texto: Permite multilínea elegante para que nunca se trunque el nombre */
.molino-mobile-cat-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.molino-mobile-cat-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #22252a;
    line-height: 1.22;
    margin: 0;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.molino-mobile-cat-count {
    font-size: 10px;
    font-weight: 500;
    color: #8c939d;
    margin-top: 2px;
    line-height: 1;
    white-space: nowrap;
}

/* Chevron eliminado para otorgar 100% de espacio al texto en columnas mobile */
.molino-mobile-cat-chevron {
    display: none !important;
}

/* ==========================================================================
   2. FIX REPOSICIONAMIENTO BOTÓN DE WHATSAPP (MOBILE VIEWPORT)
   Asegura que el widget de WhatsApp quede SIEMPRE por encima de la barra inferior (.et-mobile-navbar)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .nta-whatsapp-chat,
    .nta-whatsapp-default,
    #nta-whatsapp-button,
    .wa__btn_popup,
    .joinchat,
    .wp-block-whatsapp,
    div[class*="whatsapp-btn"],
    div[id*="whatsapp-btn"] {
        bottom: 75px !important;
        right: 16px !important;
        z-index: 9999 !important;
    }

    .nta-whatsapp-content,
    .wa__popup_chat_box {
        bottom: 135px !important;
        z-index: 10000 !important;
    }
}
