/* ==========================================================
   VEHICLE CATALOG PRO
   Versión: 1.0
========================================================== */

:root{

    --background:#0B1220;
    --background2:#111827;

    --card:#182235;
    --cardHover:#24334d;

    --border:#2F415E;

    --blue:#3B82F6;
    --green:#22C55E;
    --red:#EF4444;
    --yellow:#FACC15;
    --purple:#8B5CF6;
    --orange:#F97316;

    --text:#F8FAFC;
    --text2:#94A3B8;

    --radius:18px;

    --transition:.25s;

}

*{

    margin:0;
    padding:0;
    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    background:var(--background);

    color:var(--text);

    font-family:'Inter',sans-serif;

}

img{

    max-width:100%;

    display:block;

}

button{

    cursor:pointer;

    font-family:'Inter',sans-serif;

}

select,input{

    font-family:'Inter',sans-serif;

}

/* ==========================================================
HEADER
========================================================== */

.header{

    height:80px;

    background:var(--background2);

    border-bottom:1px solid var(--border);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 35px;

    position:sticky;

    top:0;

    z-index:999;

}

.logo{

    display:flex;

    align-items:center;

    gap:18px;

}

.logo-img{

    width:55px;

    height:55px;

    object-fit:contain;

    background:#182235;

    padding:6px;

    border-radius:12px;

    border:1px solid #2F415E;

}

.logo h1{

    font-size:28px;

}

.logo span{

    color:var(--text2);

    font-size:13px;

}

.header-buttons{

    display:flex;

    gap:15px;

}

.header-buttons button{

    border:none;

    background:var(--blue);

    color:white;

    padding:12px 22px;

    border-radius:10px;

    transition:.2s;

}

.header-buttons button:hover{

    background:#2563EB;

}

/* ==========================================================
DASHBOARD
========================================================== */

.dashboard{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));

    gap:20px;

    padding:35px;

}

.dashboard-card{

    background:var(--card);

    border-radius:var(--radius);

    border:1px solid var(--border);

    padding:25px;

    text-align:center;

    transition:var(--transition);

}

.dashboard-card:hover{

    transform:translateY(-5px);

    border-color:var(--blue);

}

.dashboard-card h2{

    font-size:42px;

    color:var(--blue);

}

.dashboard-card span{

    color:var(--text2);

}

/* ==========================================================
TOOLBAR
========================================================== */

.toolbar{

    display:flex;

    flex-wrap:wrap;

    gap:15px;

    padding:0 35px 35px;

}

.search-box{

    flex:2;

    position:relative;

}

.search-box i{

    position:absolute;

    left:18px;

    top:50%;

    transform:translateY(-50%);

    color:var(--text2);

}

.search-box input{

    width:100%;

    background:var(--card);

    color:white;

    border:1px solid var(--border);

    border-radius:12px;

    padding:15px 15px 15px 50px;

}

.search-box input:focus{

    outline:none;

    border-color:var(--blue);

}

.toolbar select{

    flex:1;

    min-width:170px;

    background:var(--card);

    color:white;

    border-radius:12px;

    border:1px solid var(--border);

    padding:15px;

}

.toolbar select:focus{

    outline:none;

    border-color:var(--blue);

}

/* ==========================================================
LAYOUT
========================================================== */

.layout{

    display:grid;

    grid-template-columns:260px 1fr;

    gap:30px;

    padding:0 35px 35px;

}

/* ==========================================================
MODAL
========================================================== */

.modal{

    display:none;

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.75);

    justify-content:center;

    align-items:center;

    z-index:99999;

}

.modal-content{

    background:#182235;

    width:min(1200px,95vw);

    max-height:90vh;

    border-radius:18px;

    border:1px solid #2F415E;

    overflow-x:hidden;

    overflow-y:auto;

    scrollbar-width:none;

    position:relative;

    animation:modalOpen .25s ease;

}

.modal-content::-webkit-scrollbar{

    display:none;

}

.modal img{

    width:100%;

    height:auto;

    max-height:55vh;

    object-fit:contain;

    background:#111827;

}

.modal-body{

    padding:30px;

}

.modal-body h2{

    margin-bottom:20px;

    color:white;

}

.modal table{

    width:100%;

    border-collapse:collapse;

}

.modal th{

    text-align:left;

    width:220px;

    padding:12px;

    color:#3B82F6;

}

.modal td{

    padding:12px;

    color:white;

}

.modal tr{

    border-bottom:1px solid #2F415E;

}

.modal ul{

    margin-left:18px;

}

.closeModal{

    position:absolute;

    right:20px;

    top:10px;

    font-size:36px;

    cursor:pointer;

    color:white;

}

.closeModal:hover{

    color:#EF4444;

}

@keyframes modalOpen{

    from{

        transform:scale(.9);

        opacity:0;

    }

    to{

        transform:scale(1);

        opacity:1;

    }

}

/* ==========================================================
SIDEBAR
========================================================== */

.sidebar{

    background:#111827;

    border:1px solid #2F415E;

    border-radius:18px;

    padding:20px;

    height:max-content;

    position:sticky;

    top:100px;

}

.sidebar h3{

    margin-bottom:20px;

}

#sidebarCategories{

    display:flex;

    flex-direction:column;

    gap:10px;

}

#sidebarCategories button{

    background:#182235;

    color:white;

    border:none;

    padding:14px;

    border-radius:10px;

    text-align:left;

    font-size:15px;

    transition:.25s;

}

#sidebarCategories button:hover{

    background:#3B82F6;

    transform:translateX(5px);

}

/* ==========================================================
CATEGORIAS
========================================================== */

.category{

    margin-bottom:35px;

}

.category-title{

    width:100%;

    background:#182235;

    color:white;

    border:none;

    border-radius:12px;

    padding:18px;

    font-size:20px;

    font-weight:bold;

    text-align:left;

    margin-bottom:20px;

}

/* ==========================================================
TARJETAS
========================================================== */

.category-content{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));

    gap:20px;

}

.vehicle-card{

    background:#182235;

    border-radius:16px;

    overflow:hidden;

    border:1px solid #2F415E;

    cursor:pointer;

    transition:.25s;

}

.vehicle-card:hover{

    transform:translateY(-8px);

    border-color:#3B82F6;

}

.vehicle-card img{

    width:100%;

    height:180px;

    object-fit:cover;

}

.vehicle-info{

    padding:18px;

}

.vehicle-info h3{

    margin-bottom:10px;

}

.vehicle-info p{

    margin:6px 0;

    color:#cbd5e1;

}

.badge{

    display:inline-block;

    margin-top:12px;

    background:#3B82F6;

    color:white;

    padding:6px 12px;

    border-radius:20px;

    font-size:13px;

}

#sidebarCategories button.active{

    background:#3B82F6;

    color:white;

    border-left:4px solid white;

    font-weight:bold;

    transform:translateX(5px);

}

.hidden{

    display:none;

}

/* ==========================================
CATEGORY HEADER
========================================== */

.category-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.category-left{

    display:flex;

    align-items:center;

    gap:12px;

}

.category-name{

    font-size:21px;

    font-weight:700;

}

.category-right{

    display:flex;

    align-items:center;

    gap:18px;

}

.vehicle-counter{

    background:#24334d;

    padding:6px 12px;

    border-radius:20px;

    color:#cbd5e1;

    font-size:13px;

}

.category-arrow{

    font-size:16px;

    transition:.25s;

}

.rotate{

    transform:rotate(-90deg);

}


.header-link{

    text-decoration:none;

    color:white;

    background:#182235;

    padding:12px 18px;

    border-radius:10px;

    transition:.25s;

    display:flex;

    align-items:center;

    gap:8px;

}

.header-link:hover{

    background:#3B82F6;

}


/*==========================
BOTÓN PROPONER
==========================*/

.header-link{

    text-decoration:none;

    color:white;

    padding:12px 18px;

    border-radius:10px;

    display:flex;

    align-items:center;

    gap:8px;

    transition:.25s;

}

.contribute{

    background:#22C55E;

}

.contribute:hover{

    background:#16A34A;

}

/*==========================
ADMIN OCULTO
==========================*/

.admin-access{

    position:fixed;

    bottom:15px;

    right:15px;

    width:35px;

    height:35px;

    border-radius:50%;

    background:#111827;

    color:#444;

    display:flex;

    justify-content:center;

    align-items:center;

    text-decoration:none;

    opacity:.15;

    transition:.3s;

}

.admin-access:hover{

    opacity:1;

    color:white;

    background:#3B82F6;

}

.empty-category{

    padding:30px;

    text-align:center;

    color:#8b8b8b;

    font-style:italic;

}

@media (max-width:900px){

    .modal-content{

        width:95%;

        max-height:95vh;

    }

    .modal-body{

        padding:20px;

    }

    .modal th{

        width:120px;

        font-size:14px;

    }

    .modal td{

        font-size:14px;

    }

}

/* ==========================================================
RESPONSIVE
========================================================== */

@media (max-width:1200px){

    .layout{

        grid-template-columns:220px 1fr;

    }

}

@media (max-width:992px){

    .layout{

        grid-template-columns:1fr;

    }

    .sidebar{

        position:relative;

        top:auto;

    }

    .modal-content{

        width:95%;

    }

}

@media (max-width:768px){

    .header{

        flex-direction:column;

        height:auto;

        gap:20px;

        padding:20px;

    }

    .header-buttons{

        width:100%;

        justify-content:center;

        flex-wrap:wrap;

    }

    .toolbar{

        padding:20px;

    }

    .dashboard{

        padding:20px;

    }

    .layout{

        padding:20px;

    }

    .modal-body{

        padding:20px;

    }

    .modal th{

        width:120px;

        font-size:14px;

    }

    .modal td{

        font-size:14px;

    }

}

@media (max-width:480px){

    .dashboard{

        grid-template-columns:1fr;

    }

    .category-content{

        grid-template-columns:1fr;

    }

    .logo{

        flex-direction:column;

        text-align:center;

    }

    .header-buttons{

        flex-direction:column;

    }

    .toolbar{

        flex-direction:column;

    }

}

/* ==========================================
OCULTAR SCROLL DEL MODAL
========================================== */

.modal-content{

    scrollbar-width:none;

}

.modal-content::-webkit-scrollbar{

    display:none;

}

/* ==========================================
SCROLL MODERNO
========================================== */

/* Chrome, Edge y Opera */
::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-track{
    background:#111827;
}

::-webkit-scrollbar-thumb{
    background:#3B82F6;
    border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
    background:#2563EB;
}

/* Firefox */
*{
    scrollbar-width:thin;
    scrollbar-color:#3B82F6 #111827;
}