:root {
    --defborder: 14px;
    /* ANTES: 0.01rem, por eso todo era cuadrado */

    --bg-1: #1e1e1e;
    --bg-2: #f2f2f2;
    --bg-3: #111111;
    --card: #ffffff;

    --text-main: #1a1a1a;
    --text-soft: #555;

    --accent-1: #111111;
    --accent-2: #00c8ff;

    --danger: #ff4d4d;
    --amarillo: #ffee00;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-1);
    color: var(--text-main);
    font-family: Arial, Helvetica, sans-serif;
}

/* QUITÉ EL white-space: nowrap DE AQUÍ, ESE ERA EL ASESINO */
p {
    margin: 0.5rem 0;
    color: var(--text-soft);
    line-height: 1.4;
}

ul {
    list-style: none;
}

a {
    color: #00c8ff;
    text-decoration: none;
}

button {
    font-family: Arial, sans-serif;
    font-weight: 800;
    background: #111;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
    width: auto;
}

button:hover {
    transform: scale(1.03);
    background: #222;
}

/* ===================== */
/*        NAVBAR         */
/* ===================== */
.nav {
    display: flex;
    background: var(--bg-2);
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-image: url(./AKRlogo.ico);
    cursor: pointer;
    flex-shrink: 0;
}

#titular {
    font-weight: bold;
    font-size: 15px;
}

/* ===================== */
/*        MENÚ           */
/* ===================== */
.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 10px;
    gap: 8px;
    width: 100%;
}

input.menu,
select.menu {
    background: #111;
    color: #fff;
}

/* ===================== */
/*       IMÁGENES        */
/* ===================== */
.imagenes-contenedor,
#imagenes-contenedor,
.div-solicitudes {
    display: grid;
    gap: 12px;
    padding: 12px;
    grid-template-columns: repeat(2, 1fr);
}

.imagen {
    display: flex;
    flex-direction: column;
    background: var(--bg-2);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.la-imagen {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border: none;
}

/* ANTES TENÍA height: 1rem Y SE CORTABA */
.producto-titulo {
    display: block;
    text-align: center;
    text-transform: uppercase;
    background: #333;
    color: var(--amarillo);
    font-weight: 900;
    font-size: 13px;
    line-height: 1.3;
    padding: 8px 6px;
    min-height: 38px;
}

.detalles {
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
}

.detalles ul {
    margin: 0;
}

.detalles li {
    margin-bottom: 4px;
}

.desc-soli {
    margin-top: auto;
    padding: 0 10px 10px;
}

.desc-soli button {
    width: 100%;
}

/* Banner de arriba */
.novedad {
    grid-column: 1 / -1;
    align-items: center;
}

.novedad .la-imagen {
    aspect-ratio: 16 / 6;
    height: auto;
}

/* ===================== */
/*    PANEL / FORMULARIO */
/* ===================== */
.panel,
.queso,
.cargador {
    display: flex;
    flex-direction: column;
    gap: 1vh;
    background: var(--bg-2);
    margin: 12px;
    padding: 18px;
    border-radius: 18px;
    border: none;
}

.webo,
.webo1 {
    width: 100%;
    font-size: 16px;
    padding: 0.75vw;
    border-radius: 10px;
    background: #111;
    border: 2px solid #00c8ff;
    color: #fff;
}

.webo1 {
    background: #fff;
    color: #111;
    border-color: #111;
}

#mem {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    align-self: center;
}

.mensage {
    width: 100%;
    padding: 3rem 1rem;
    text-align: center;
    font-size: 18px;
    color: #fff;
}

/* ===================== */
/*     PAGINACION        */
/* ===================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 44px;
}

/* ===================== */
/*     RESPONSIVE PC     */
/* ===================== */
@media (min-width: 800px) {

    .imagenes-contenedor,
    #imagenes-contenedor {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1100px;
        margin: 0 auto;
    }

    .nav {
        padding: 12px 24px;
    }
}

.no-ver {
    display: none !important;
}

/* === PUERTA CORREDIZA VERTICAL - TU IDEA ORIGINAL === */

/* LA CAJA - LA PUERTA */
.nav {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 235px;
    /* Cuando está cerrada, solo mide lo del logo */
    height: 68px;
    overflow: hidden;
    /* Esto es lo importante: lo que no cabe, no se ve */
    background: #f2f2f2;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    z-index: 9999;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* La animación de estirarse */
    transition: height 0.35s ease;
}

/* CUANDO LE PICAS, SE ESTIRA */
.nav:not(.navhiden) {
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
    padding: 12px;
}

/* EL LOGO - ES LA MANIJA DE LA PUERTA */
.logo {
    width: 58px;
    height: 58px;
    min-height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff url(./AKRlogo2.png) center / 82% no-repeat;
    border: 3px solid #111;
    cursor: pointer;
    transition: transform 0.35s ease;
}
#titular{
    margin-left: 60px;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif sans-serif !important;
}

.logo.rotado {
    transform: rotate(180deg);
}

/* EL TÍTULO Y EL MENÚ */
.nav h1 {
    font-size: 20px;
    margin: 0;
}

.nav h1 {
    display: none;
}

.nav .ses {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.nav .menu {
    width: 100%;
    min-height: 44px;
    margin: 0;
}


/* ===================== */
/*  NAV - PUERTA CORREDIZA */
/*  Teléfono: cuadrito flotante */
/*  PC: lateral izquierdo */
/* ===================== */

.nav {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 235px;
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-2);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    z-index: 9999;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: width 0.35s ease, height 0.35s ease, padding 0.35s ease;
}

/* CERRADO EN TELÉFONO: cuadrito 68x68, sin rectángulo blanco */
.nav.navhiden {
    width: 68px;
    height: 68px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.nav:not(.navhiden) {
    height: auto;
}

.logo {
    width: 58px;
    height: 58px;
    min-height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff url(./AKRlogo2.png) center / 82% no-repeat;
    border: 3px solid #111;
    cursor: pointer;
    transition: transform 0.35s ease;
}

.logo.rotado {
    transform: rotate(180deg);
}

/* Cuando está cerrado, el logo llena el cuadrito */
.nav.navhiden .logo {
    width: 68px;
    height: 68px;
    border: none;
    border-radius: 16px;
    background-size: 90%;
}

.nav h1 {
    font-size: 20px;
    margin: 0;
}

#titular {
    font-weight: bold;
    font-size: 15px;
}

.nav .ses {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Cuando está cerrado, esconde todo menos el logo */
.nav.navhiden h1,
.nav.navhiden #titular,
.nav.navhiden .ses {
    display: none;
}

/* ===================== */
/*        MENÚ           */
/* ===================== */
.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: #333;
    color: #fff
}

/* === ARREGLO GALERÍA - QUE NO SE HAGA GIGANTE === */

.legumbre {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.imagenes-contenedor,
#imagenes-contenedor {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* La cajita de cada foto */
.imagen {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* LA FOTO EN SÍ - AQUÍ ESTABA EL PEDO */
.la-imagen {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    display: block !important;
}

/* El banner sí puede ser más ancho, es el de arriba */
.novedad .la-imagen {
    aspect-ratio: 16 / 6 !important;

}

/* En PC 4 por fila, pero sin pasarse */
@media (min-width: 800px) {

    .imagenes-contenedor,
    #imagenes-contenedor {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        max-width: 1100px !important;
        margin: 0 auto !important;
    }
}

/* apartado parea el visualisador del upload del upload.html */

.cargador {
    display: grid;
    flex-direction: row;
    max-height: fit-content;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background-color: #222;
}

.visualizador {
    border-radius: var(--defborder);
    background-color: #0ca0017a;
    border: 3px solid #0ba001;
    min-width: 30%;
    aspect-ratio: 1/1;
    margin: 12px;
    align-content: center;

}

.visualizador p {
    display: flex;
    flex-direction: column;
    color: #00c8ff;
    margin: 20px;
    max-height: 100%;
    justify-self: center;
}

.queso {
    display: flex;
    border: 3px solid #00c8ff;

}

.cargador .grid2ancho {
    grid-column: span 2;
}

.reject {
    background: #ff00007c;
    border: 5px dotted #ff0000;
    border-radius: var(--defborder);
}

.not {
    background-color: #ff00007e;
    border: 3px dotted #ff0000,
}

.yes {
    background-color: #00ff447e;
    border: 3px dotted #00ff95,
}

.descargarBtn,
.eliminarBtn {

    display: flex;

    margin: 0.2px;
    padding: 2px;
    width: 50%;
    flex-direction: row;
}

.ACTIONS {
     display: flex;
    padding: 5px;
    gap: 2px;
    flex-direction: row;
    height: stretch;
    align-items: flex-end;
}


/* ===================== */
/*  PERFIL - SOLO ESTO   */
/* ===================== */

.perfil {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin: 1rem auto 0 auto;
    max-width: 700px;
    width: calc(100% - 28px);
    background: #f2f2f2;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.perfil-foto {
    width: 7rem;
    height: 7rem;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #111;
    background: #fff;
    flex-shrink: 0;
}

.perfil-data {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.perfil-data h2 {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 4px 0;
}

.perfil-data .info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    word-break: break-word;
}

.perfil-data .info label {
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    opacity: .6;
}

.perfil-data .info span {
    font-weight: 500;
}

/* Contenido subido de ese perfil */
.contenido_subido {
    max-width: 700px;
    width: calc(100% - 28px);
    margin: 3rem auto 0 auto;
}

.contenido_subido h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 12px;
}


/* ===================== */
/*     RESPONSIVE telfono     */
/* ===================== */
@media (max-width: 800px) {
    .cargador {
        grid-template-columns: 1fr;

    }

    .cargador .grid2ancho {
        grid-column: span 1;
    }

}