@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700;800;900&display=swap');

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #222220;
}

header {
    background-color: #EDD9B8;
    color: #222220;
    text-align: center;
    padding: 40px;
}

.encabezado-coleccion {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 28px 42px;
    box-sizing: border-box;
}

.encabezado-patreon {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 28px 42px;
    box-sizing: border-box;
}

.seccion-superior,
.nombre-patreon {
    margin: 0;
    font-family: "Franklin Gothic Medium", Arial, sans-serif;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.encabezado-patreon h1,
.encabezado-coleccion h1 {
    margin: 10px 0 0;
    font-family: "Libre Franklin", sans-serif;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.encabezado-texto {
    text-align: left;
    transform: translateY(12px);
}

.nombre-patreon {
    margin: 0;
}

.encabezado-logo img {
    width: 120px;
    height: auto;
    display: block;
}

main {
    padding: 20px 40px 40px;
}

.coleccion {
    background: #EDD9B8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Imágenes de tarjetas de colecciones y subcategorías */

.coleccion img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    display: block;
}


.grid-colecciones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.grid-patreons,
.grid-subcategorias {
    grid-template-columns: repeat(5, 1fr);
}

button {
    background-color: #e68a00;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.coleccion img {
    width: 100%;
    border-radius: 0;
    margin-bottom: 0;
    display: block;
}

.coleccion-info {
    padding: 10px 22px 22px;
}

.boton-coleccion {
    display: inline-block;
    background-color: #e68a00;
    color: white;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.boton-coleccion:hover {
    background-color: #c97800;
}

.volver {
    display: inline-block;
    margin-bottom: 25px;
    text-decoration: none;
    font-weight: bold;
    color: #CFCFCF;
}

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

.tarjeta {
    background: #EDD9B8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);

    transition: transform 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.tarjeta img {
    width: 100%;
    height: 290px;

    object-fit: cover;
    object-position: center;
    display: block;
}

.tarjeta h3 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
}

.tamano {
    margin: 0 15px 15px;
    display: inline-block;
    background-color: #e68a00;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    align-self: flex-start;

}

.tarjeta:hover {
    transform: translateY(-5px);
}

.visor {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.visor-contenido {
    width: 90%;
    max-width: 1200px;

    background: #222220;

    border-radius: 12px;

    display: flex;

    overflow: hidden;

    position: relative;
}

.visor-imagen {
    position: relative;
    height: 95vh;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    padding: 20px 0 20px 20px;

    background: #222220;

    box-sizing: border-box;
}

#imagen-grande {

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
    display: block;
}

.visor-info {
    width: 360px;
    flex-shrink: 0;

    padding: 40px 32px 40px 26px;

    color: white;
    background: #222220;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

#nombre-figura {
    margin: 0 0 34px;

    color: #EDD9B8;

    font-size: 34px;
    line-height: 1.05;
    font-weight: bold;
}

.visor-info p {
    color: #d0d0d0;
    line-height: 1.7;
    margin-bottom: 20px;
}

.cerrar {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 30;

    width: 42px;
    height: 42px;

    padding: 0;

    color: #EDD9B8;
    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(237, 217, 184, 0.20);
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.cerrar:hover {
    color: #222220;
    background: #DC911B;

    transform: scale(1.08);
}

@media (max-width: 900px) {

    .visor-contenido {
        flex-direction: column;
    }

    .visor-imagen {
        width: 100%;
    }

    .visor-info {
        width: 100%;
    }

}

.dato {

    margin-bottom: 28px;
}

.dato:last-child {
    margin-bottom: 0;
}

.titulo-dato {

    display: block;

    color: #DC911B;

    font-size: 12px;

    letter-spacing: 2px;

    margin-bottom: 8px;

    font-weight: bold;

}

.tag-tamano {

    display: inline-block;

    padding: 8px 18px;

    border-radius: 30px;

    background: #DC911B;

    color: #222220;

    font-weight: bold;

}

#contador-figura {
    margin-top: 8px;

    color: #EDD9B8;

    font-size: 14px;
    letter-spacing: 1px;

    opacity: 0.75;
}

.flecha-visor {
    position: absolute;
    top: 50%;
    z-index: 10;

    width: 42px;
    height: 64px;

    padding: 0;

    color: #EDD9B8;
    background: rgba(34, 34, 32, 0.72);

    border: none;
    border-radius: 8px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    opacity: 0.72;
    transform: translateY(-50%);

    transition:
        opacity 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.flecha-anterior {
    left: 40px;
}

.flecha-siguiente {
    right: -320px;
}

.flecha-visor:hover {
    color: #222220;
    background: #DC911B;

    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.breadcrumb {
    padding: 18px 42px 0;
    font-size: 14px;
    color: #EDD9B8;
}

.breadcrumb span,
.breadcrumb a {
    margin-right: 8px;
}

.breadcrumb a {
    color: #EDD9B8;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #e68a00;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .grid-colecciones {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    main {
        padding: 12px 24px 24px;
    }

    .grid-colecciones {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        gap: 12px;
        margin: 0;
        padding: 0;
        justify-items: center;
    }

    .coleccion {
        width: 100%;
        max-width: 420px;
        margin: 0;
    }

    .breadcrumb {
        padding: 24px 24px 0;
        margin-bottom: 10px;
    }

    .encabezado-patreon,
    .encabezado-coleccion {
        padding-left: 24px;
        padding-right: 24px;
        gap: 16px;
    }

    .encabezado-patreon h1,
    .encabezado-coleccion h1 {
        font-size: 30px;
    }

    .galeria {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tarjeta img {
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .visor-contenido {
        flex-direction: column;
        width: 94%;
        height: 92vh;
        max-height: 92vh;
        overflow-y: auto;
    }

    .visor-imagen {
        width: 100%;
        height: 50vh;
        flex: none;

        padding: 16px 16px 0;
        box-sizing: border-box;

        display: flex;
        justify-content: center;
        align-items: center;
    }

    #imagen-grande {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .visor-info {
        width: 55%;
        margin: 0 auto;
        padding: 18px 0 24px;
        box-sizing: border-box;
        text-align: left;
    }

    #nombre-figura {
        min-height: 0px;
        margin: 0 0 24px;

        font-size: 28px;
        line-height: 1.05;
        text-wrap: balance;
    }

    .flecha-visor {
        display: none;
    }
}

@media (min-width: 601px) and (max-width: 1100px) {

    .breadcrumb {
        font-size: 18px;
    }

    .seccion-superior,
    .nombre-patreon {
        font-size: 22px;
    }

    .encabezado-patreon h1,
    .encabezado-coleccion h1 {
        font-size: 38px;
    }

    .tarjeta h3 {
        font-size: 20px;
    }

    .tamano {
        font-size: 16px;
    }
}

@media (max-width: 600px) {

    .breadcrumb {
        font-size: 14px;
    }


    .encabezado-texto {
        max-width: 280px;
    }

    .encabezado-patreon h1,
    .encabezado-coleccion h1 {
        font-size: 26px;
    }

    .visor-info {
        width: 84%;
    }
}

/* =========================================================
   PORTADA PRINCIPAL 3DQUEST
   ========================================================= */

/* Elementos generales de la portada */
.pagina-inicio {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #3b2117;
}

main.portada {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.portada {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-image: url("../Imágenes/Portada/Enano y dados.jpg");
    background-size: cover;
    background-position: left center;
    background-color: #3b2117;
}

/* Fotografía compartida */
.portada-superior {
    width: 100%;
    height: 55vh;
    background-color: transparent;
}

.portada-fotografia {
    width: 100%;
    height: 100%;
    background-color: #222220;
    background-image: url("../Imágenes/Portada/Enano y dados.jpg");
    background-size: cover;
    background-position: 35% center;
    background-repeat: no-repeat;
}

/* =========================================================
   PORTADA DE ESCRITORIO
   NOTA: conserva temporalmente la distribución anterior.
   La composición horizontal aprobada se implementará aquí
   después de terminar y validar móvil/tablet.
   ========================================================= */

.portada-inferior {
    position: relative;
    min-height: 40vh;
    background-color: #EDD9B8;
    border-top: 8px solid #DA8E1B;
    border-bottom: 8px solid #DA8E1B;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 150px;
    box-sizing: border-box;
}

.portada-logo {
    position: absolute;
    width: 230px;
    height: auto;
    top: -115px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: contain;
}

.portada-inferior h1 {
    color: #3b2117;
    font-size: 3.5rem;
    margin: 15px 0 30px;
}

.secciones-catalogo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.boton-portada {
    display: inline-block;
    background-color: #DA8E1B;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 7px 14px;
    border-radius: 8px;
}

/* =========================================================
   PORTADA DE TABLET Y MÓVIL
   ========================================================= */

@media (max-width: 768px) {

    .portada {
        min-height: 0;
    }

    .portada-superior {
        height: 50vh;
    }

    .portada-inferior {
        min-height: 0;
        padding: 100px 20px 150px;
    }

    .portada-logo {
        width: 170px;
        top: -85px;
    }

    .portada-inferior h1 {
        font-size: 2rem;
        margin: 15px 0 20px;
    }

    .secciones-catalogo {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 12px;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* Centrar el último botón si queda una fila impar */
    .secciones-catalogo .boton-portada:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .boton-portada {
        display: inline-block;
        background-color: #DA8E1B;
        color: white;
        font-size: 1rem;
        padding: 12px 24px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        text-align: center;
    }

    /* AJUSTE AUTOMÁTICO DEL TAMAÑO DE LOS BOTONES */

    /* Cuando haya de 2 a 4 botones */
    .secciones-catalogo:has(> .boton-portada:nth-child(2)) .boton-portada {
        font-size: 0.95rem;
        padding: 11px 16px;
    }

    /* Cuando haya 5 botones o más */
    .secciones-catalogo:has(> .boton-portada:nth-child(5)) .boton-portada {
        font-size: 0.88rem;
        padding: 9px 8px;
    }
}

/* =====================================
   PORTADA DE ESCRITORIO 3DQUEST
   ===================================== */

@media (min-width: 769px) {

    .portada {
        display: block;
        position: relative;
        width: 100%;
        height: 100vh;
        min-height: 600px;

        background-image:
            url("../Imágenes/Portada/Enano y dados.jpg"),
            url("../Imágenes/Portada/Enano y dados.jpg");
        background-size: auto 120%, auto 120%;
        background-position: calc(0% + 150px) center, left center;
        background-repeat: no-repeat, no-repeat;
        background-color: #3b2117;
    }

    /* Capa transparente sobre la fotografía */
    .portada-superior {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    .portada-fotografia {
        width: 100%;
        height: 100%;
        background-image: none;
        background-color: transparent;
        clip-path: inset(0 0 0 30%);
    }

    /* Panel beige izquierdo */
    .portada-inferior {
        position: absolute;
        top: 0;
        left: 2%;
        width: 28%;
        height: 100%;
        min-height: 100%;
        z-index: 1;

        background-color: #EDD9B8;
        border: none;
        border-left: 12px solid #DA8E1B;
        border-right: 12px solid #DA8E1B;

        padding: 45px 25px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    /* Logo */
    .portada-logo {
        position: static;
        width: 240px;
        max-width: 85%;
        height: auto;
        transform: none;
        margin-bottom: 25px;
    }

    /* Título */
    .portada-inferior h1 {
        color: #3b2117;
        font-size: 2.6rem;
        margin: 15px 0 30px;
        text-align: center;
    }

    /* Botones */
    .secciones-catalogo {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 380px;
        gap: 12px;
    }

    .boton-portada {
        background-color: #DA8E1B;
        color: #3b2117;
        text-align: center;
    }

    .secciones-catalogo .boton-portada:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }

    /* Patreons: 5 columnas / Colecciones: 3 columnas */
    .grid-colecciones.grid-subcategorias {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Portadas automáticas de categorías con subcarpetas */

    .contenedor-portada:empty {
        display: none;
    }

    .portada-mosaico {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
        width: 100%;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        gap: 2px;
        background-color: #222220;
        border-radius: 8px 8px 0 0;
    }

    .portada-mosaico img {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: cover;
        display: block;
    }

    .contenedor-portada>img {
        display: block;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .contenedor-portada {
        width: 100%;
    }

    .portada-mosaico {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        width: 100%;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

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

.boton-inactivo {
    background-color: #777777;
    color: #eeeeee;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.85;
}

.boton-inactivo span {
    font-size: 0.7em;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
}