/* ==========================
   CONFIGURACION GENERAL
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


body{

    font-family:Arial, Helvetica, sans-serif;
    background:#f6f7f5;
    color:#333;

}


.container{

    width:90%;
    max-width:1200px;
    margin:auto;

}



/* ==========================
 HEADER
========================== */


.top-header{

    background:white;
    border-bottom:1px solid #ddd;
    position:sticky;
    top:0;
    z-index:1000;

}


.header-content{

    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 0;

}


.logo img{

    width:95px;
    height:95px;
    object-fit:contain;

}


.menu{

    display:flex;
    gap:25px;
    align-items:center;

}


.menu a{

    text-decoration:none;
    color:#333;
    font-weight:bold;

}


.menu a:hover{

    color:#198754;

}


.usuario{

    color:#198754;
    font-weight:bold;

}


.btn-login{

    background:#198754;
    color:white!important;
    padding:10px 22px;
    border-radius:25px;

}



/* ==========================
 MENSAJES
========================== */


.mensajes{

    margin-top:20px;

}


.alerta{

    background:#d1e7dd;
    color:#0f5132;
    padding:15px;
    border-radius:10px;

}



/* ==========================
 BANNER
========================== */


.banner{

    background:linear-gradient(135deg,#198754,#146c43);
    color:white;
    margin:40px 0;
    padding:60px 0;

}


.banner-content{

    display:flex;
    justify-content:space-between;
    align-items:center;

}


.banner-text{

    width:55%;

}


.banner-text span{

    background:white;
    color:#198754;
    padding:8px 18px;
    border-radius:30px;
    font-size:13px;
    font-weight:bold;

}


.banner-text h1{

    font-size:52px;
    margin:25px 0;
    line-height:1.1;

}


.banner-text p{

    font-size:20px;
    margin-bottom:30px;

}


.banner-image img{

    width:300px;
    object-fit:contain;

}



/* ==========================
 BOTONES GENERALES
========================== */


.btn-primary{

    display:inline-block;
    background:white;
    color:#198754;
    padding:15px 35px;
    border-radius:30px;
    text-decoration:none;
    font-weight:bold;

}



.btn-secondary{

    display:inline-block;
    background:#6c757d;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
    font-weight:bold;

}


.btn-secondary:hover{

    background:#5c636a;

}



.btn-danger{

    display:inline-block;
    background:#dc3545;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
    font-weight:bold;

}


.btn-danger:hover{

    background:#bb2d3b;

}



/* ==========================
 TITULOS
========================== */


.section{

    padding:50px 0;

}


.section-title{

    text-align:center;
    margin-bottom:40px;

}


.section-title h2{

    font-size:38px;
    color:#198754;

}


.section-title p{

    color:#777;

}

/* ==============================
   ADMIN CATEGORIAS / SUBCATEGORIAS
============================== */


.admin-toolbar{

    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:30px;
    flex-wrap:wrap;

}



.search-form{

    display:flex;
    gap:10px;
    flex-wrap:wrap;

}



.search-box{

    padding:12px 15px;

    border:1px solid #ddd;

    border-radius:12px;

    font-size:15px;

    width:280px;

}





.category-grid{

    display:grid;

    grid-template-columns:
    repeat(auto-fill,minmax(270px,1fr));

    gap:25px;

}





/* TARJETAS ADMIN */

.category-card{

    background:white;

    border-radius:20px;

    overflow:hidden;

    box-shadow:
    0 8px 25px rgba(0,0,0,.08);

    transition:.3s;

    display:flex;

    flex-direction:column;

}



.category-card:hover{

    transform:translateY(-5px);

}





.category-image{

    width:100%;

    height:180px;

    overflow:hidden;

}



.category-image img{

    width:100%;

    height:100%;

    object-fit:cover;

}





.category-body{

    padding:20px;

    display:flex;

    flex-direction:column;

    flex:1;

}





.category-body h3{

    color:#198754;

    font-size:22px;

    margin-bottom:10px;

}





.category-body p{

    color:#666;

    min-height:50px;

    line-height:1.5;

}





.category-info{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin:20px 0;

}





.product-count{

    background:#f1f5f9;

    padding:8px 12px;

    border-radius:20px;

    font-size:14px;

}





.status{

    padding:7px 14px;

    border-radius:20px;

    font-size:13px;

    font-weight:bold;

}





.status.active{

    background:#dcfce7;

    color:#166534;

}



.status.inactive{

    background:#fee2e2;

    color:#991b1b;

}





/* BOTONES EDITAR / ELIMINAR */

.category-actions{

    display:flex;

    gap:10px;

    margin-top:auto;

}





.category-actions a{

    flex:1;

    text-align:center;

}





.btn-secondary{

    background:#6c757d;

    color:white;

    padding:12px 15px;

    border-radius:10px;

    text-decoration:none;

    font-weight:bold;

    display:inline-block;

}





.btn-secondary:hover{

    background:#565e64;

}





.btn-danger{

    background:#dc3545;

    color:white;

    padding:12px 15px;

    border-radius:10px;

    text-decoration:none;

    font-weight:bold;

    display:inline-block;

}





.btn-danger:hover{

    background:#bb2d3b;

}






/* ==============================
   PRODUCTOS ADMIN
============================== */



.admin-product-card{

    background:white;

    border-radius:20px;

    padding:20px;

    box-shadow:
    0 8px 25px rgba(0,0,0,.08);

}




.product-info{

    margin-top:15px;

}



.product-info p{

    margin:8px 0;

    color:#555;

}





/* INVENTARIO */

.stock{

    background:#198754;

    color:white;

    padding:8px 15px;

    border-radius:20px;

    font-weight:bold;

    display:inline-block;

}



.stock-low{

    background:#ffc107;

    color:#333;

}



.stock-zero{

    background:#dc3545;

    color:white;

}





/* ==============================
   FORMULARIOS ADMIN
============================== */


.form-admin{

    background:white;

    padding:35px;

    border-radius:20px;

    box-shadow:
    0 8px 25px rgba(0,0,0,.08);

}



.form-admin input,
.form-admin select,
.form-admin textarea{


    width:100%;

    padding:14px;

    margin-bottom:15px;

    border-radius:12px;

    border:1px solid #ddd;

    font-size:16px;

}



.form-admin input:focus,
.form-admin select:focus,
.form-admin textarea:focus{

    outline:none;

    border-color:#198754;

}

/* ==============================
   TARJETAS DE PRODUCTOS
============================== */


.products{

    display:grid;

    grid-template-columns:
    repeat(3,1fr);

    gap:25px;

}



.product-card{

    background:white;

    border-radius:20px;

    padding:25px;

    box-shadow:
    0 8px 25px rgba(0,0,0,.08);

    text-align:center;

    overflow:hidden;

    display:flex;

    flex-direction:column;

    justify-content:space-between;

    min-height:480px;

}




.product-card img{

    width:100%;

    height:240px;

    object-fit:contain;

    border-radius:15px;

    background:#fff;

    margin-bottom:20px;

}




.product-card h3{

    color:#198754;

    font-size:22px;

    margin:15px 0;

}




.product-card p{

    color:#666;

    margin:8px 0;

}




.product-card strong{

    color:#f57c00;

    font-size:22px;

}





/* INVENTARIO EN TARJETAS */

.stock{

    display:inline-block;

    margin-top:15px;

    padding:8px 15px;

    border-radius:20px;

    background:#198754;

    color:white;

    font-weight:bold;

}



.stock-low{

    background:#ffc107;

    color:#333;

}



.stock-zero{

    background:#dc3545;

    color:white;

}





/* BOTONES PRODUCTOS */


.acciones-producto{

    display:flex;

    justify-content:center;

    gap:10px;

    margin-top:20px;

}



.btn-editar,
.btn-eliminar{

    padding:10px 18px;

    border-radius:20px;

    color:white;

    text-decoration:none;

    font-weight:bold;

    font-size:14px;

}



.btn-editar{

    background:#198754;

}



.btn-editar:hover{

    background:#146c43;

}



.btn-eliminar{

    background:#dc3545;

}



.btn-eliminar:hover{

    background:#bb2d3b;

}




@media(max-width:900px){


.products{

    grid-template-columns:1fr;

}


.product-card img{

    height:220px;

}


}



/* ==============================
   BOTONES ACCIONES PRODUCTOS
============================== */


.acciones-producto{

    display:flex;

    justify-content:center;

    gap:10px;

    margin-top:20px;

}



.btn-editar{

    background:#198754;

    color:white;

    padding:10px 18px;

    border-radius:20px;

    text-decoration:none;

    font-weight:bold;

}



.btn-editar:hover{

    background:#146c43;

}





.btn-eliminar{

    background:#dc3545;

    color:white;

    padding:10px 18px;

    border-radius:20px;

    text-decoration:none;

    font-weight:bold;

}



.btn-eliminar:hover{

    background:#bb2d3b;

}





/* ==============================
   BUSCADOR
============================== */


.product-filter{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:15px;

    margin:35px 0;

    flex-wrap:wrap;

}




.product-filter input,
.product-filter select{


    padding:14px 18px;

    border-radius:12px;

    border:1px solid #ddd;

    font-size:16px;

    background:white;

}





/* ==============================
   RESPONSIVE ADMIN
============================== */


@media(max-width:900px){


.admin-toolbar{

    flex-direction:column;

    align-items:stretch;

}


.category-grid{

    grid-template-columns:1fr;

}



.category-actions{

    flex-direction:column;

}



.search-form{

    width:100%;

}



.search-box{

    width:100%;

}



}




@media(max-width:600px){


.admin-card{

    padding:20px;

}



.banner-text h1{

    font-size:35px;

}



.product-filter input,
.product-filter select,
.product-filter button{

    width:100%;

}



}

/* ==============================
   PANEL ADMINISTRATIVO
============================== */


.admin-grid{

    display:grid;

    grid-template-columns:
    repeat(3,1fr);

    gap:25px;

    margin-top:40px;

}




.admin-card{

    background:white;

    padding:35px;

    border-radius:20px;

    box-shadow:
    0 8px 25px rgba(0,0,0,.08);

    text-align:center;

}




.admin-card h3{

    color:#198754;

    font-size:26px;

    margin-bottom:15px;

}




.admin-card p{

    color:#666;

    min-height:60px;

    margin-bottom:25px;

}





.admin-card .btn-primary{

    background:#198754;

    color:white;

}





.admin-card .btn-primary:hover{

    background:#146c43;

}





/* ==============================
   BOTONES GENERALES
============================== */


.btn-primary{


    display:inline-block;

    background:#198754;

    color:white;

    padding:12px 25px;

    border-radius:25px;

    text-decoration:none;

    font-weight:bold;

    border:none;

    cursor:pointer;

}



.btn-primary:hover{

    background:#146c43;

}




.btn-secondary{


    display:inline-block;

    background:#6c757d;

    color:white;

    padding:12px 25px;

    border-radius:25px;

    text-decoration:none;

    font-weight:bold;

}



.btn-secondary:hover{

    background:#565e64;

}





.btn-danger{


    display:inline-block;

    background:#dc3545;

    color:white;

    padding:12px 25px;

    border-radius:25px;

    text-decoration:none;

    font-weight:bold;

}



.btn-danger:hover{

    background:#bb2d3b;

}





/* ==============================
   IMAGENES FORMULARIOS
============================== */


.image-box{


    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:15px;

    margin-bottom:20px;

}




.preview-img{


    width:200px;

    height:200px;

    object-fit:cover;

    border-radius:20px;

    border:3px solid #eee;

}





/* ==============================
   DOMICILIO
============================== */


.delivery{


    background:#198754;

    color:white;

    padding:60px 0;

    text-align:center;

}




.delivery h2{


    font-size:38px;

    margin-bottom:20px;

}




.delivery p{


    font-size:20px;

    margin-bottom:30px;

}





.btn-whatsapp{


    display:inline-block;

    background:#25d366;

    color:white;

    padding:15px 35px;

    border-radius:30px;

    text-decoration:none;

    font-weight:bold;

}





.btn-whatsapp:hover{


    background:#1ebe5d;

}






/* ==============================
   REDES SOCIALES FLOTANTES
============================== */


.btn-flotante{


    position:fixed;

    right:25px;

    width:60px;

    height:60px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:9999;

    box-shadow:
    0 5px 15px rgba(0,0,0,.25);

}



.btn-flotante img{


    width:35px;

    height:35px;

    object-fit:contain;

}




.whatsapp{


    bottom:90px;

    background:#25d366;

}




.facebook{


    bottom:20px;

    background:#1877f2;

}





.btn-flotante:hover{


    transform:scale(1.1);

    transition:.3s;

}






/* ==============================
   LOGIN
============================== */


.login-section{


    min-height:75vh;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:40px 0;

}





.login-card{


    width:100%;

    max-width:420px;

    background:white;

    padding:40px;

    border-radius:25px;

    box-shadow:
    0 10px 30px rgba(0,0,0,.15);

    text-align:center;

}





.login-logo img{


    width:120px;

    height:120px;

    object-fit:contain;

    margin-bottom:20px;

}




.login-card h2{


    color:#198754;

    font-size:32px;

    margin-bottom:15px;

}





.input-group{


    text-align:left;

    margin-bottom:20px;

}




.input-group label{


    display:block;

    font-weight:bold;

    margin-bottom:8px;

}




.input-group input{


    width:100%;

    padding:14px;

    border-radius:12px;

    border:1px solid #ddd;

}





.btn-login-form{


    width:100%;

    padding:15px;

    background:#198754;

    color:white;

    border:none;

    border-radius:30px;

    font-size:18px;

    font-weight:bold;

    cursor:pointer;

}





.btn-login-form:hover{


    background:#146c43;

}







/* ==============================
   FOOTER
============================== */


footer{


    background:#1f2937;

    color:white;

    padding:40px 0 20px;

}




.footer-content{


    display:flex;

    justify-content:space-between;

    gap:30px;

}




.footer-content h3{


    color:#22c55e;

}




.footer-content p{


    color:#ddd;

}





.copyright{


    text-align:center;

    margin-top:30px;

    color:#aaa;

}







/* ==============================
   RESPONSIVE FINAL
============================== */



@media(max-width:900px){



.admin-grid{


    grid-template-columns:1fr;

}



.footer-content{


    flex-direction:column;

    text-align:center;

}



.menu{


    flex-wrap:wrap;

    justify-content:center;

}



}





@media(max-width:600px){



.container{


    width:95%;

}




.banner{


    padding:40px 0;

}




.banner-text h1{


    font-size:32px;

}




.admin-card{


    padding:20px;

}




.login-card{


    padding:25px;

}



.btn-flotante{


    right:15px;

    width:55px;

    height:55px;

}



}