#ejemplares {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.boton-regreso-h1 {
    float: left;
    margin: 0 auto 20px auto;
    font-size: 1em;
    background: #0033e5;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index:11;
}

.boton-admin-toggle {
    float: left;
    margin: 0 auto 20px auto;
    font-size: 1em;
    background: #666;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 11;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boton-admin-toggle:hover {
    background: #333;
    transform: translateY(-2px);
}

.boton-admin-toggle.active {
    background: #0073aa;
}

@media (max-width: 600px) {
    .boton-regreso-h1 {
        max-width: 600px;
        bottom: 10px;
    }
    
    .boton-admin-toggle {
        bottom: 10px;
        left: 10px;
    }
}

.boton-regreso-h1:hover {
    background: #005a87;
    transform: translateY(-2px);
}

#ejemplares h1 {
    font-size: 30px;
    background-color: rgba(0, 0, 0, 0.8);
    float: none;
    margin-top: 20px;
    color: #fff;
    padding: 12px 60px 16px;
    text-align: center;
}

/* Estilos para las categorías */
.categorias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.categoria-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.categoria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #0073aa;
}

.categoria-imagen {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
}

.categoria-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Para imágenes verticales en categorías, usar contain para que se vean completas */
.categoria-imagen img[data-orientation="vertical"] {
    object-fit: contain;
}

.categoria-item:hover .categoria-imagen img {
    transform: scale(1.05);
}

.categoria-info {
    padding: 20px;
    text-align: center;
}

.categoria-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0;
}

.contador {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* Estilos para los ejemplares */
.ejemplares {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.ejemplar-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    vertical-align: middle;
    display: grid;
    grid-template-rows: 1fr auto;
    cursor: zoom-in;
}

.ejemplar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.ejemplar-imagen {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ejemplar-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Para imágenes verticales, usar contain para que se vean completas */
.ejemplar-imagen img[data-orientation="vertical"] {
    object-fit: contain;
}

.ejemplar-item:hover .ejemplar-imagen img {
    transform: scale(1.05);
}

.ejemplar-info {
    display: flex;
    padding: 15px;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    align-content: center;
}

.ejemplar-cod {
    font-size: 1.1em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 8px;
}

.ejemplar-tal {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ejemplar-color {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.95em;
}

/* Responsive */
@media (max-width: 768px) {
    .categorias {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ejemplares {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .categoria-imagen {
        height: auto;
    }
    
    .ejemplar-imagen {
        height: auto;
    }
    
    #ejemplares h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .categorias {
        grid-template-columns: 1fr;
    }
    
    .ejemplares {
        grid-template-columns: 1fr;
    }
    
    #ejemplares {
        padding: 10px;
    }
    
    .categoria-info {
        padding: 15px;
    }
    
    .ejemplar-info {
        padding: 12px;
    }
}

/* Modal para imagen completa */
.modal-imagen {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-contenido {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.modal-cerrar {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-cerrar:hover,
.modal-cerrar:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.modal-info .info-cod {
    font-size: 1.2em;
    font-weight: bold;
    color: #4a9eff;
    margin-bottom: 5px;
}

.modal-info .info-tal {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.modal-info .info-color {
    font-size: 0.9em;
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive para modal */
@media (max-width: 768px) {
    .modal-contenido {
        width: 95%;
        height: 95%;
    }
    
    .modal-cerrar {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 45px;
        height: 45px;
    }
    
    .modal-info {
        bottom: 10px;
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Estilos para controles administrativos */
.ejemplar-admin-controls {
    float: left;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.90em;
    width: 100%;
    display: none; /* Ocultos por defecto por privacidad */
    justify-content: space-between;
}

.visible-control {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    cursor: pointer;
    position: relative;
    
    input[type="checkbox"] {
        width: 12px;
        height: 12px;
        margin-right: 4px;
        margin-top: 0;
        margin-bottom: 0;
        position: relative;
    }
    
    input[type="checkbox"]:checked::after {
        content: "";
        opacity: 1;
        display: block;
        position: absolute;
        left: -1px;
        top: -11px;
        width: 10px;
        height: 18px;
        border: 4px solid #00a028;
        border-top: 0;
        border-left: 0;
        transform: rotate(36deg);
    }
    
    span {
        font-weight: bold;
        color: #666;
        user-select: none;
    }
}

.reserva-estado {
    font-weight: bold;
    margin-bottom: 3px;
    
    &.disponible {
        color: #46b450;
    }
    
    &.reservado {
        color: #d63638;
    }
}

.ejemplar-precio {
    font-weight: bold;
    color: #0073aa;
    text-align: right;
}