
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #fffaf5;
    color: #493b36;
}

header {
    background-color: #ead5df;
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 42px;
    letter-spacing: 5px;
    margin: 0;
}

header p {
    font-size: 18px;
}

main {
    max-width: 1200px;
    margin: auto;
    padding: 25px;
}

h2 {
    text-align: center;
    margin-bottom: 25px;
}

#productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.producto {
    background-color: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px #00000015;
}

.producto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

button {
    background-color: #218c58;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #176b43;
}

#personalizados {
    margin-top: 40px;
    padding: 30px 20px;
    background-color: #f3e5dc;
    border-radius: 15px;
    text-align: center;
}

footer {
    margin-top: 30px;
    padding: 20px;
    background-color: #ead5df;
    text-align: center;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 32px;
    }

    main {
        padding: 15px;
    }
}

/* Panel administrativo */

#acceso {
    max-width: 420px;
    margin: 30px auto;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 3px 10px #00000015;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid #a16c83;
}

#mensaje-acceso {
    text-align: center;
    font-size: 14px;
}

#panel {
    background-color: white;
    padding: 25px;
    border-radius: 15px;
}

#cerrar-sesion {
    background-color: #795447;
}

button:disabled {
    background-color: #aaaaaa;
    cursor: not-allowed;
}

[hidden] {
    display: none !important;
}

#productos img {
    cursor: zoom-in;
}

#visor-fotografia {
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    padding: 20px;
    border: none;
    border-radius: 15px;
    box-sizing: border-box;
    text-align: center;
}

#visor-fotografia::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

#fotografia-ampliada {
    display: block;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 10px;
}

#cerrar-fotografia {
    display: block;
    margin-left: auto;
    margin-bottom: 10px;
    cursor: pointer;
}

#nombre-fotografia {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
}

@media (max-width: 600px) {

    body {
        margin: 0;
        overflow-wrap: break-word;
    }

    main {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    #productos {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #productos .producto {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    #productos img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    #filtros-catalogo {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    input, select, textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    button {
        max-width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    #productos button,
    #formulario-personalizado button {
        width: 100%;
    }

    #visor-fotografia {
        width: 95%;
        padding: 12px;
    }

    header h1 {
        font-size: 32px;
    }

}

.foto-admin {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto 12px;
    background-color: #f8f5f0;
}

.producto-admin {
    overflow-wrap: break-word;
}

@media (max-width: 600px) {

    .foto-admin {
        width: 100px;
        height: 100px;
    }

    .producto-admin button {
        width: 100%;
        margin: 5px 0;
    }

    #formulario-producto input,
    #formulario-producto select,
    #formulario-producto textarea {
        width: 100%;
        box-sizing: border-box;
    }

}

/* Identidad visual de ISYADA */

:root {
    --marfil: #FFF5E6;
    --terracota: #BD7962;
    --arena: #C9AB85;
    --cafe-oscuro: #493A32;
}

.encabezado-isyada {
    background-color: var(--marfil);
    padding: 25px 15px;
    text-align: center;
    border-bottom: 1px solid var(--arena);
}

.marca-isyada {
    margin: 0;
    padding: 0;
}

.logo-isyada {
    display: block;
    width: 100%;
    max-width: 350px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

@media (max-width: 600px) {

    .encabezado-isyada {
        padding: 15px 10px;
    }

    .logo-isyada {
        max-width: 250px;
    }

}

body {
    background-color: #FCF8F2;
    color: var(--cafe-oscuro);
    font-family: "Segoe UI", Arial, sans-serif;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--cafe-oscuro);
}

h2 {
    font-size: 30px;
    font-weight: normal;
    letter-spacing: 1px;
}

.encabezado-isyada {
    padding: 15px;
}

.logo-isyada {
    max-width: 280px;
}

button {
    background-color: #A65D46;
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

button:hover:not(:disabled) {
    background-color: #854632;
}

button:disabled {
    background-color: #D5CEC7;
    color: #625950;
    cursor: not-allowed;
}

input, select, textarea {
    border: 1px solid #DCCBB8;
    background-color: #FFFFFF;
    color: var(--cafe-oscuro);
    border-radius: 8px;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--terracota);
    outline-offset: 2px;
}

@media (max-width: 600px) {

    .logo-isyada {
        max-width: 220px;
    }

    h2 {
        font-size: 25px;
    }

}

#filtros-catalogo {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px 16px;
    align-items: end;
    background-color: #FFFFFF;
    border: 1px solid #E7D8C8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

#filtros-catalogo label {
    font-size: 14px;
    font-weight: 600;
}

#filtros-catalogo input,
#filtros-catalogo select {
    margin: 0;
    min-width: 0;
    width: 100%;
    height: 44px;
    box-sizing: border-box;
}

#filtros-catalogo label:nth-of-type(1) {
    grid-area: 1 / 1;
}

#filtros-catalogo label:nth-of-type(2) {
    grid-area: 1 / 2;
}

#filtros-catalogo label:nth-of-type(3) {
    grid-area: 1 / 3;
}

#limpiar-filtros {
    grid-area: 2 / 4;
    min-height: 44px;
    white-space: nowrap;
    margin: 0;
}

@media (max-width: 900px) {

    #filtros-catalogo {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }

}

#productos {
    gap: 24px;
    align-items: stretch;
}

#productos .producto {
    background-color: #FFFFFF;
    border: 1px solid #E7D8C8;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 5px 18px rgba(73, 58, 50, 0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#productos .producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(73, 58, 50, 0.12);
}

#productos .producto img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    background-color: #FCF8F2;
    border-radius: 12px;
}

#productos .producto h3 {
    font-size: 23px;
    font-weight: normal;
    margin: 18px 0 10px;
}

#productos .producto p {
    line-height: 1.6;
}

#productos .producto button {
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    font-weight: 600;
}

@media (max-width: 600px) {

    #productos {
        gap: 18px;
    }

    #productos .producto {
        padding: 15px;
    }

    #productos .producto:hover {
        transform: none;
    }

}

#productos .producto .precio-producto {
    color: #A65D46;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    margin: 12px 0;
}

.estado-disponible,
.estado-vendido {
    display: inline-block;
    align-self: center;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0 18px;
}

.estado-disponible {
    background-color: #E4EDDF;
    color: #42613C;
}

.estado-vendido {
    background-color: #EAE3DC;
    color: #79685C;
}

.estado-disponible::before,
.estado-vendido::before {
    content: "● ";
}

#personalizados {
    background-color: var(--marfil);
    border: 1px solid #E7D8C8;
    border-radius: 20px;
    padding: 35px 25px;
    margin: 40px 0;
    text-align: center;
}

#personalizados h2 {
    margin-top: 0;
    color: var(--cafe-oscuro);
}

#personalizados p {
    font-size: 17px;
    line-height: 1.7;
}

#pedido-personalizado {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
}

#formulario-personalizado {
    max-width: 650px;
    margin: 25px auto 0;
    padding: 25px;
    background-color: #FFFFFF;
    border: 1px solid #E7D8C8;
    border-radius: 15px;
    text-align: left;
    box-sizing: border-box;
}

#formulario-personalizado label {
    display: block;
    font-weight: 600;
    margin: 12px 0 6px;
}

#formulario-personalizado input,
#formulario-personalizado select,
#formulario-personalizado textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
}

@media (max-width: 600px) {

    #personalizados {
        padding: 25px 15px;
    }

    #formulario-personalizado {
        padding: 15px;
    }

    #pedido-personalizado {
        width: 100%;
    }

}

footer {
    background-color: var(--cafe-oscuro);
    color: var(--marfil);
    text-align: center;
    padding: 30px 20px;
    border-top: 3px solid var(--terracota);
}

footer p {
    margin: 8px 0;
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 1.6;
}

footer a {
    color: var(--marfil);
    text-decoration: underline;
}

footer .marca-footer {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    letter-spacing: 6px;
    margin-bottom: 15px;
}

@media (min-width: 901px) {
    #buscar-figura {
        grid-area: 2 / 1;
        width: 100%;
        box-sizing: border-box;
    }

    #filtro-categoria {
        grid-area: 2 / 2;
        width: 100%;
    }

    #filtro-disponibilidad {
        grid-area: 2 / 3;
        width: 100%;
    }

    #limpiar-filtros {
        grid-area: 2 / 4;
    }
}

#productos .precio-producto {
    color: #A65D46 !important;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    margin: 12px 0;
}

#productos .estado-disponible,
#productos .estado-vendido {
    display: block;
    width: fit-content;
    margin: 10px auto 15px;
}

#productos .producto {
    display: flex;
    flex-direction: column;
}

#productos .producto button {
    display: block;
    width: 100%;
    margin-top: auto;
    min-height: 46px;
}

#productos .producto:not(:has(img))::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #FFF5E6;
    background-image: url("logo-isyada.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65%;
    border-radius: 12px;
}

#productos .producto img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
}

.subtitulo-admin {
    color: #493A32;
    font-size: 18px;
    font-weight: 600;
    margin: 5px 0 15px;
}

#productos-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

#productos-admin > div,
#productos-admin > article {
    background-color: #FCF8F2;
    border: 1px solid #E7D8C8;
    border-radius: 15px;
    padding: 18px;
    text-align: center;
}

#productos-admin .foto-admin {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto 12px;
}

#productos-admin button {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    #productos-admin {
        grid-template-columns: 1fr;
    }
}

#formulario-producto {
    background-color: #FFF5E6;
    border: 1px solid #E7D8C8;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0 35px;
}

#formulario-producto label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin: 15px 0 8px;
}

#formulario-producto input,
#formulario-producto select,
#formulario-producto textarea {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    padding: 12px;
    box-sizing: border-box;
}

#formulario-producto button {
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
}

#cerrar-sesion {
    background-color: #493A32;
    min-height: 40px;
}

@media (max-width: 600px) {
    #formulario-producto {
        padding: 15px;
    }
}

.enlaces-legales {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    font-size: 13px;
}

.enlaces-legales a {
    color: #FFF5E6;
    text-decoration: none;
}

.enlaces-legales a:hover {
    text-decoration: underline;
}

/* DOCUMENTOS LEGALES */

.documento-legal {
    max-width: 900px;
    margin: 35px auto;
    padding: 40px;
    background: #FFFFFF;
    border: 1px solid #DCCBB8;
    border-radius: 18px;
    color: #493A32;
    line-height: 1.8;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.documento-legal h1 {
    font-family: Georgia, serif;
    font-size: 32px;
    font-weight: normal;
    text-align: center;
    color: #493A32;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #DCCBB8;
}

.documento-legal h2 {
    font-family: Georgia, serif;
    font-size: 22px;
    color: #A65D46;
    text-align: left;
    margin-top: 30px;
    margin-bottom: 12px;
}

.documento-legal p {
    margin-bottom: 15px;
}

.documento-legal ul {
    padding-left: 25px;
}

.documento-legal li {
    margin-bottom: 8px;
}

.documento-legal a {
    color: #A65D46;
    text-decoration: underline;
}

.documento-legal > a:last-child {
    display: inline-block;
    background: #A65D46;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 25px;
}

@media (max-width: 600px) {
    .documento-legal {
        margin: 15px;
        padding: 20px;
    }

    .documento-legal h1 {
        font-size: 26px;
    }

    .documento-legal h2 {
        font-size: 20px;
    }
}

.aviso-formulario {
    font-size: 13px;
    line-height: 1.6;
    color: #493A32;
    background: #FFF5E6;
    padding: 15px;
    border: 1px solid #DCCBB8;
    border-radius: 8px;
    margin: 18px 0;
}

.aviso-formulario a {
    color: #A65D46;
    text-decoration: underline;
}
