
/* CONFIGURACIÓN GENERAL */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: #18243c;
    font-family: Inter, system-ui, -apple-system,
                 "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}

/* BARRA SUPERIOR */
.barra {
    background: #fff;
    border-bottom: 1px solid #e4e9f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 19px max(20px, calc((100vw - 1160px) / 2));
}

.marca {
    font-weight: 850;
    font-size: 23px;
    color: #162338;
    letter-spacing: -0.8px;
}

.marca span {
    color: #2563eb;
}

.volver {
    font-weight: 650;
    color: #2563eb;
}

/* CONTENEDOR */
.contenedor {
    max-width: 1200px;
    margin: 38px auto;
    padding: 0 20px;
}

.encabezado {
    margin-bottom: 27px;
}

.encabezado h1 {
    font-size: 30px;
    letter-spacing: -1px;
    margin: 7px 0 6px;
}

.encabezado p,
.ayuda {
    color: #6b7890;
}

.etiqueta {
    font-size: 11px;
    letter-spacing: 1.4px;
    color: #2563eb;
    font-weight: 800;
}

/* DISTRIBUCIÓN */
.distribucion {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
    gap: 22px;
    align-items: start;
}

/* PANELES */
.panel {
    background: #fff;
    border: 1px solid #e2e9f3;
    border-radius: 17px;
    padding: 27px;
    box-shadow: 0 5px 25px rgba(20, 40, 80, 0.035);
}

.panel h2 {
    font-size: 18px;
    margin: 0 0 22px;
}

/* CAMPOS */
.campo {
    margin-bottom: 19px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 650;
    font-size: 13px;
}

.campo input,
.campo textarea,
.campo select {
    width: 100%;
    border: 1px solid #d8e0eb;
    padding: 12px 14px;
    border-radius: 9px;
    font: inherit;
    color: #18243c;
    background: #fff;
    outline: none;
    min-width: 0;
}

.campo input:focus,
.campo textarea:focus,
.campo select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #2563eb18;
}

.campo textarea {
    resize: vertical;
}

.dos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

hr {
    border: 0;
    border-top: 1px solid #edf0f5;
    margin: 10px 0 24px;
}

/* PRECIOS CON PREFIJO */
.prefijo {
    display: flex;
    align-items: center;
    border: 1px solid #d8e0eb;
    border-radius: 9px;
    overflow: hidden;
}

.prefijo > span {
    padding: 0 13px;
    color: #6b7890;
    background: #f4f7fb;
    align-self: stretch;
    display: flex;
    align-items: center;
    border-right: 1px solid #d8e0eb;
}

.prefijo input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.ayuda {
    font-size: 12px;
    line-height: 1.6;
}

/* FOTOGRAFÍAS */
.fila-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fila-titulo h2 {
    margin-bottom: 7px;
}

.contador {
    background: #edf3ff;
    color: #225dd4;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 750;
}

.fotos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.foto-card {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid #e4e9f1;
    border-radius: 11px;
    background: #f7f9fc;
    overflow: hidden;
}

.foto-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* BOTÓN QUITAR FOTO */
.quitar {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 7px;
    background: #ef4444;
    color: white;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.quitar:hover {
    background: #c42121;
}

/* AGREGAR FOTOGRAFÍAS */
.subir {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    text-align: center;
    border: 2px dashed #aac3ed;
    border-radius: 13px;
    padding: 26px 12px;
    background: #f8fbff;
    color: #2458a4;
    cursor: pointer;
}

.subir:hover {
    background: #eef5ff;
}

.subir-icono {
    font-size: 32px;
    line-height: 1;
}

.subir small {
    color: #66778e;
    line-height: 1.5;
}

.sin-fotos {
    font-size: 13px;
    color: #758196;
    grid-column: 1 / -1;
}

.foto-preview {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid #dce6f2;
    border-radius: 10px;
    background: #fff;
}

/* BOTONES INFERIORES */
.barra-acciones {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

.cancelar,
.guardar {
    border-radius: 10px;
    padding: 13px 22px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.cancelar {
    color: #35435b;
    background: white;
    border: 1px solid #dce3ee;
}

.guardar {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.guardar:hover {
    background: #1d4ed8;
}

/* MENSAJES */
.alerta {
    padding: 13px 17px;
    border-radius: 11px;
    margin: 0 0 20px;
    font-weight: 600;
}

.ok {
    color: #166534;
    background: #dcfce7;
}

.error {
    color: #991b1b;
    background: #fee2e2;
}

.form-oculto {
    display: none;
}

/* TABLETS */
@media (max-width: 800px) {
    .distribucion {
        grid-template-columns: 1fr;
    }

    .contenedor {
        margin-top: 25px;
    }

    .panel {
        padding: 20px;
    }

    .barra {
        padding: 18px 20px;
    }
}

/* TELÉFONOS */
@media (max-width: 420px) {
    .dos {
        grid-template-columns: 1fr;
    }

    .fotos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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