:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #18202b;
    background: #f4f6f8;
    font-synthesis: none;
    --acento: #713642;
    --acento-texto-claro: #f1dfe3;
    --acento-foco: #d6a1ad;
    --acento-etiqueta: #8b5661;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button,
input,
textarea {
    font: inherit;
}

.contenedor {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.cabecera {
    padding: 64px 0 54px;
    background: var(--acento);
    color: white;
}

.cabecera-interior {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
}

.marca,
.etiqueta {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}


.marca-linea {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.marca-linea .marca {
    margin: 0;
}

.version-visible {
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgb(255 255 255 / 12%);
    color: white;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.cabecera h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.1rem, 6vw, 4rem);
    line-height: 1;
}

.subtitulo {
    max-width: 650px;
    margin: 18px 0 0;
    color: var(--acento-texto-claro);
    font-size: 1.08rem;
}

.boton {
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 750;
}

.boton-claro {
    flex: 0 0 auto;
    background: white;
    color: var(--acento);
}

.boton-primario {
    background: var(--acento);
    color: white;
}

.panel-formulario {
    margin-top: 32px;
    padding: 26px;
    border: 1px solid #dce3ea;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 24px rgb(20 35 50 / 5%);
}

.oculto {
    display: none;
}

.panel-cabecera,
.acciones-formulario,
.pie-tarjeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.panel-cabecera h2 {
    margin: 0;
}

.boton-icono {
    border: 0;
    background: transparent;
    color: #657383;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.campos {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.campos label {
    display: grid;
    gap: 7px;
    color: #344454;
    font-weight: 650;
}

.campos input,
.campos textarea {
    width: 100%;
    border: 1px solid #cdd6df;
    border-radius: 9px;
    padding: 10px 12px;
    background: #fff;
    color: #18202b;
}

.campos input:focus,
.campos textarea:focus {
    outline: 2px solid var(--acento-foco);
    outline-offset: 1px;
}

.campos small {
    color: #748292;
    font-weight: 400;
}

.campo-ancho {
    grid-column: 1 / -1;
}

.acciones-formulario {
    margin-top: 22px;
}

.mensaje-formulario {
    margin: 0;
    color: #657383;
}

.mensaje-formulario.exito {
    color: #1c6a3d;
}

.mensaje-formulario.fallo {
    color: #9a3030;
}

.titulo-seccion {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 48px 0 24px;
}

.titulo-seccion h2 {
    margin: 0;
    font-size: 1.9rem;
}

.etiqueta {
    color: var(--acento-etiqueta);
}

.estado {
    margin: 0;
    color: #657383;
}

.rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    padding-bottom: 56px;
}

.tarjeta {
    overflow: hidden;
    border: 1px solid #e0e5ea;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 24px rgb(20 35 50 / 6%);
}

.zona-imagen {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: #e9eef3;
}

.imagen-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 20px;
    color: #7a8794;
    font-size: 0.9rem;
    text-align: center;
}

.imagen-producto {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contenido-tarjeta {
    padding: 20px;
}

.nombre {
    margin: 0;
    font-size: 1.08rem;
}

.descripcion {
    min-height: 3em;
    margin: 10px 0 20px;
    color: #617080;
    line-height: 1.5;
}

.precio {
    margin: 0;
    color: var(--acento);
    font-size: 1.25rem;
    font-weight: 800;
}

.boton-eliminar {
    border: 0;
    background: transparent;
    color: #9a3030;
    cursor: pointer;
    font-weight: 700;
}

.error {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px solid #d9b4b4;
    border-radius: 12px;
    background: #fff4f4;
    color: #7f2929;
}

@media (max-width: 700px) {
    .contenedor {
        width: min(100% - 28px, 1120px);
    }

    .cabecera {
        padding: 52px 0 44px;
    }

    .cabecera-interior,
    .titulo-seccion,
    .acciones-formulario {
        align-items: start;
        flex-direction: column;
    }

    .campos {
        grid-template-columns: 1fr;
    }

    .campo-ancho {
        grid-column: auto;
    }
}

/* Garantiza que el atributo HTML hidden prevalezca sobre reglas como display:grid. */
[hidden] {
    display: none !important;
}

.panel-tecnico {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin: 0 0 56px;
    padding: 22px 24px;
    border: 1px solid #dce3ea;
    border-radius: 14px;
    background: #eef3f7;
}

.panel-tecnico h2 {
    margin: 0;
    font-size: 1.15rem;
}

.datos-tecnicos {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin: 0;
}

.datos-tecnicos div {
    min-width: 120px;
}

.datos-tecnicos dt {
    margin-bottom: 4px;
    color: #657383;
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.datos-tecnicos dd {
    margin: 0;
    color: var(--acento);
    font-weight: 750;
}

@media (max-width: 700px) {
    .panel-tecnico {
        align-items: start;
        flex-direction: column;
    }

    .datos-tecnicos {
        flex-direction: column;
        gap: 14px;
    }
}
