/* ============================
   ESTILO GENERAL
============================ */

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f7f3ef;
    margin: 0;
    padding: 20px;
    color: #4a3f35;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

/* ============================
   LOGO (estilo landing)
============================ */

.logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================
   BANNER (estilo landing)
============================ */

.banner {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================
   GRID RESPONSIVO
============================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}

/* ============================
   TARJETAS DE CATEGORÍA
============================ */

.card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    color: #4a3f35;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform .2s, box-shadow .2s;
    display: block;
    overflow: hidden;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.card-sub {
    font-size: 0.9em;
    color: #7a6f66;
}

/* ============================
   MINIATURAS DE FOTOS
============================ */

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

@media (max-width: 600px) {
    .card img {
        height: 130px;
    }
}

/* ============================
   BOTÓN GENERAL
============================ */

.btn {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    background: #d8a47f;
    padding: 10px 15px;
    border-radius: 6px;
    color: #fff;
    font-weight: bold;
}

/* ============================
   BUSCADOR (solo ver.php)
============================ */

.buscador {
    text-align: center;
    margin-bottom: 20px;
}

.buscador input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 70%;
    max-width: 260px;
}

.buscador button {
    padding: 10px 14px;
    background: #d8a47f;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

/* ============================
   ORDENAMIENTO
============================ */

.orden {
    text-align: center;
    margin-bottom: 20px;
}

.orden a {
    margin-right: 10px;
    color: #4a3f35;
    text-decoration: underline;
}

/* ============================
   PAGINACIÓN
============================ */

.paginacion {
    text-align: center;
    margin-top: 20px;
}

.pag {
    padding: 8px 12px;
    margin: 3px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #d8a47f;
    text-decoration: none;
    color: #4a3f35;
}

.pag.activa {
    background: #d8a47f;
    color: white;
}

/* ============================
   LIGHTBOX RESPONSIVO
============================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.lightbox-titulo {
    margin-top: 10px;
    color: white;
    font-size: 1.1em;
    text-align: center;
}

/* Botón cerrar */
.cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2em;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* Navegación */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3em;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
}

.prev { left: 20px; }
.next { right: 20px; }

@media (max-width: 600px) {
    .nav { font-size: 2.4em; }
    .cerrar { font-size: 1.8em; }
}
