.mbcreate{
    margin-top:80px;
}


/* ------------------------------ */
/* SIDEBAR */
/* ------------------------------ */
.sidebar {
    width: 27%;
}

/* ------------------------------ */
/* BUSCAR */
/* ------------------------------ */
.buscador-searh {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;  position: relative;z-index: 100;
}
.buscador-searh h3 {
    font-size: 20px;
    font-weight:600;
    margin-bottom: 10px;
    color: var(--color-secondary);
}

.search-buscador {
    border-radius: 6px;
    padding: 6px 0px;
    display: flex;
    align-items: center;
    position: relative;
}
#searchResults {
    position: relative;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}


/* Modal de búsqueda */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.search-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.search-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-secondary);
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.search-modal-close:hover {
    color: #333;
}

.search-modal-body {
    padding: 15px;
}

.search-modal-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-modal-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-modal-input:focus {
    border-color: var(--color-primary);
}

.modal-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.modal-clear-btn:hover {
    color: #333;
}

.search-modal-results {
    max-height: 55vh;
    overflow-y: auto;
}

.search-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 8px;
}

.search-modal-item:hover {
    background: #f5f5f5;
}

.search-modal-item-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.search-modal-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.search-modal-item-info {
    flex: 1;
}

.search-modal-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.search-modal-item-price {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
}

.search-modal-no-results {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* Estilo para los items de resultado */
.search-result-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background 0.2s;
}

.search-result-item-custom:hover {
    background: #f5f5f5;
}

.search-result-img-custom {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.search-result-img-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-info-custom {
    flex: 1;
}

.search-result-name-custom {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.search-result-price-custom {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
}
.search-buscador input {
    /*border: 1px solid #ddd;*/
    border: none;
    border-radius: 4px;
    outline: none;
    width: 100%;
    padding: 20px 50px 20px 10px;
    font-size: 14px;
    color: var(--color-secondary);
}
.search-buscador input::placeholder {
  color: var(--color-placeholder);
  font-size: 15px;
}
.search-buscador button {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    border-radius: 4px;
    border: none;
    cursor: pointer;
    color: var(--color-white);
    transition:all ease .3s;
}
.search-buscador button:hover{
    background-color:var(--color-primary-hover);
}

/* ------------------------------ */
/* CATEGORÍAS */
/* ------------------------------ */
.categoria-box {
    margin-top: 25px;
    background: #f9f9f9;
    border-radius: 8px;
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 20px;
}

.categoria-header i{
    display: none;
}

.categoria-header h3 {
    font-size: 20px;
    color: var(--color-secondary);
    margin: 0;
    font-weight:600;
}

.arrow-main {
    display: none; /* solo mobile */
    transition: .3s;
}

.categoria-list {
    margin-top: 5px;
}

/* ------------------------------ */
/* SUBMENÚ PADRE (fila de categoría) */
/* ------------------------------ */
.submenu-padre {
    border-top: 1px solid #e0e0e0;
    margin-bottom:10px;
}

/* Título del submenú (el header clickeable) */
.submenu-titulo {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    background-color: #e8e8e8;
    font-size: 15px;
    color: var(--color-secondary);
    font-weight: 600;
}

.submenu-titulo i {
    font-size: 13px;
    transition: .3s;
}

/* Flecha del submenú */
.arrow-sub {
    transition: .3s;
    font-size: 12px;
}

.submenu-padre.open .arrow-sub {
    transform: rotate(90deg);
}

/* ------------------------------ */
/* LISTA DEL SUBMENÚ */
/* ------------------------------ */
.submenu-list {
    display: none;
}

.submenu-padre.open .submenu-list {
    display: block;
}

.submenu-list label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 13px 10px 25px;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition:all ease .3s;
}

.submenu-list label:hover {
    color: var(--color-primary);
}

/* Badge con el número */
.submenu-list label span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--color-white);
    color:var(--color-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}


/*Rotamos la flecha para que en destok este activo el 1ro para que nos muestre los submenus*/
.submenu-padre.open .arrow-sub {
    transform: rotate(90deg); /* la flecha apunta hacia abajo */
}

.arrow-sub {
    transition: transform 0.3s ease; /*le damos una transaccion suave*/
}

/**/

.container-flex-productos{
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-top: 50px;

}
.flex-container-productos{
    width: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.flex-container-img-prod{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0px;
    width: 80%;
    margin: auto;
}
.flex-container-img-prod img{
    width: 100%;
}
.product{
    width: 300px;
    background-color: var(--color-white);
    padding: 10px 10px;
    position: relative;
    border-radius: 10px;
    position: relative;
    box-shadow: rgba(14, 63, 126, 0.04) 0px 0px 0px 1px, rgba(42, 51, 69, 0.04) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.04) 0px 6px 6px -3px, rgba(14, 63, 126, 0.04) 0px 12px 12px -6px, rgba(14, 63, 126, 0.04) 0px 24px 24px -12px;
}

.etiqueta{
    position: absolute;
    top: 0px;
    padding-top: 10px;
}
.product .gap-none{
    gap: 0px;
}




.container-product-info{
    padding: 0px 10px;
    color: var(--color-title);

    /*padding-bottom: 20px;*/

}

.container-product-info .product-name{
    color: var(--color-secondary);
    transition: all ease .3s;
}


.product:hover .product-name{
    color: var(--color-primary);
}


/* ------------------------------ */
/* RESPONSIVE — MENOS DE 900 PX */
/* ------------------------------ */


@media (max-width:1380px ) {
  .flex-container-productos{
       gap:15px;width:72%;
    }
}



@media (max-width:1080px ) {
 .sidebarP{
    width: 26%;
 }
}

@media (max-width: 900px) {
    .categoria-header i{
        display: block;
    }
    .sidebar {
        width: 100%;
    }


    .categoria-header{
        justify-content: space-between;
        padding: 20px;
    }

    .arrow-main {
        display: block;
    }

    .categoria-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }

    .categoria-box.open .categoria-list {
        max-height: 500px;
       overflow-y: auto;   /* scroll solo vertical */
        overflow-x: hidden; /* evita scroll horizontal */
    }

    .categoria-box.open .arrow-main {
        transform: rotate(180deg);
    }

    .flex-container-conectores{
        flex-direction: column;
        gap: 30px;
    }
    .flex-container-productos{
        width: 100%;
    }
    .container-flex-productos{
        flex-direction: column;
        gap: 30px;
    }


}





@media (max-width: 655px) {
    .product{
        width:250px;
    }
}






@media (max-width: 600px) {
 .padding-top-cero{
    padding-top: 0px; /*COLOCAMOS ESTO POR QUE CUANDO LLEGABA A 600PX PARA ABAJO TENIA MUCHO ESPACIO PADDING-TOP */
 }

 .container-flex-productos{
    margin-top:20px;
 }
}





@media (max-width:550px) {
    .product{
        width:220px;
    }
}




@media (max-width:485px) {
    .product{
        width:210px;
    }
}


@media (max-width:470px) {
    .product{
        width:200px;
    }
}

@media (max-width:450px) {
    .product{
        width:180px;
    }
}




@media (max-width:410px) {
    .product{
        width:170px;padding:5px 5px;
    }

    .container-product-info .product-name{
        font-size:14px;
        line-height:1.2;
    }
    .viewdetailss{
     font-size:12px;
    }
    .categoria-header h3,.buscador-searh h3{
        font-size:17px;
    }
}


@media (max-width:385px) {
    .flex-container-productos{
        gap:10px;
    }
    .product{
        width:160px;
    }
}

@media (max-width:370px) {
    .product{
        width:150px;
    }
}

@media (max-width:346px) {
    .product{
        width:145px;
    }
}


@media (max-width:330px) {
    .product{
        width:auto;
    }
}
