
/* ==========================================================================
   MBSOFT COMPONENTS - Modern UI/UX
   ========================================================================== */

/* 1. BARRA DE BÚSQUEDA (GLASSMORPHISM) */
.mbsoft_search_container {
    margin: 20px 0 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mbsoft_search_form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.mbsoft_search_form:focus-within {
    border-color: var(--mbsoft-accent);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.mbsoft_search_form input {
    border: none !important;
    background: transparent;
    padding: 10px;
    flex-grow: 1;
    font-size: 1rem;
    outline: none !important;
}

.mbsoft_search_btn {
    background: var(--mbsoft-accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.mbsoft_search_btn:hover {
    transform: scale(1.1);
}

/* 2. CARRUSEL DE CATEGORÍAS (NEO-BRUTALISM LIGHT) */
.mbsoft_category_carousel {
    padding: 20px 5px !important;
    margin-bottom: 40px;
}

.mbsoft_cat_item {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mbsoft_cat_item:hover, .mbsoft_cat_item.active {
    border-color: var(--mbsoft-accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
    transform: translateY(-5px);
}

.mbsoft_cat_item.active {
    background: var(--mbsoft-accent);
}

.mbsoft_cat_item.active .mbsoft_cat_name, 
.mbsoft_cat_item.active .mbsoft_cat_count {
    color: #fff;
}

.mbsoft_cat_thumb img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 12px;
}

.mbsoft_cat_name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
}

.mbsoft_cat_count {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* 3. SIDEBAR DE FILTROS (STICKY GLASS) */
.mbsoft_filter_sidebar {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 25px;
    border-radius: 24px;
    position: sticky;
    top: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.mbsoft_filter_group {
    margin-bottom: 25px;
}

.mbsoft_filter_group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 15px;
}

.mbsoft_price_inputs {
    display: flex;
    gap: 8px;
}

.mbsoft_price_inputs input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.mbsoft_btn_reset {
    width: 100%;
    padding: 14px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.mbsoft_btn_reset:hover {
    background: #334155;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

/* 4. GRID DE PRODUCTOS (MODERNO) */
.mbsoft_grid_wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
}

.mbsoft_product_card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 12px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.mbsoft_product_card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transform: translateY(-8px);
}

.mbsoft_card_image {
    background: #f8fafc;
    border-radius: 15px;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.mbsoft_card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mbsoft_product_card:hover .mbsoft_card_image img {
    transform: scale(1.1);
}

.mbsoft_card_info {
    padding: 15px 5px;
    text-align: center;
}

.mbsoft_product_title a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.mbsoft_product_price {
    color: var(--mbsoft-accent);
    font-weight: 800;
    font-size: 1.1rem;
}

/* 5. ESTADO DE CARGA (LOADING) */
.mbsoft_grid_loading {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.5);
    transition: 0.3s;
}








.mbsoft_add_to_cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espacio entre el icono y el texto */
    width: 100%;
    padding: 10px;
    background: #000; /* Ajusta a tu color */
    color: #fff;
    border: none;
    cursor: pointer;
}

.mbsoft_add_to_cart .dashicons {
    font-size: 18px; /* Ajusta el tamaño del icono */
    width: 18px;
    height: 18px;
}

/* Animación de rotación para el icono de carga */
.mbsoft-spin {
    animation: mbsoft-rotate 1s infinite linear;
}

@keyframes mbsoft-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(359deg); }
}

/* Estilo de éxito */
.mbsoft_add_to_cart.added {
    background-color: #28a745 !important; /* Verde éxito */
    color: white;
}

.mbsoft_add_to_cart.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Badge de Agotado */
.mbsoft_badge_oos {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    z-index: 2;
}

/* Tarjeta deshabilitada */
.mbsoft_out_of_stock .mbsoft_card_image img {
    filter: grayscale(100%);
    opacity: 0.6;
}

/* Botón deshabilitado */
.mbsoft_add_to_cart.btn_disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    color: #666;
}


