/* =========================================================
   EDITAR PRODUCTO - ADMIN
   Estilo e-commerce / Dormiliers
   ========================================================= */


/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

/* .main-container {
    min-height: 100vh;

    background: #f5f7fa;

    padding: 35px 20px 60px;
} */
.input-group-2{
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}
.container-create {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.edit-page-header {
    margin-bottom: 25px;
}

.edit-page-label {
    display: block;

    margin-bottom: 5px;

    color: #048ABF;

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .7px;
}

.edit-page-header h4 {
    margin: 0;

    color: #1f2937;

    font-size: 28px;
    font-weight: 700;
}

.edit-page-header p {
    margin: 7px 0 0;

    color: #6b7280;

    font-size: 14px;
}

.edit-page-header strong {
    color: #374151;
}


/* =========================================================
   ERRORES
   ========================================================= */

.edit-errors {
    margin-bottom: 22px;

    padding: 16px 18px;

    background: #fff5f5;

    border: 1px solid #f1c1c1;
    border-radius: 12px;

    color: #842029;
}

.edit-errors-title {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 8px;
}

.edit-errors-title i {
    font-size: 18px;
}

.edit-errors ul {
    margin: 8px 0 0;

    padding-left: 25px;

    font-size: 14px;
}

.edit-errors li {
    margin-bottom: 3px;
}


/* =========================================================
   SECCIONES
   ========================================================= */

.edit-section {
    margin-bottom: 22px;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #e7ebef;
    border-radius: 14px;

    box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
}


/* =========================================================
   ENCABEZADO DE SECCIÓN
   ========================================================= */

.edit-section-header {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 25px;
    padding-bottom: 18px;

    border-bottom: 1px solid #edf0f2;
}

.edit-section-icon {
    flex-shrink: 0;

    width: 44px;
    height: 44px;

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

    background: rgba(4, 138, 191, .10);

    border-radius: 11px;

    color: #048ABF;

    font-size: 20px;
}

.edit-section-header h5 {
    margin: 0;

    color: #1f2937;

    font-size: 19px;
    font-weight: 700;
}

.edit-section-header p {
    margin: 4px 0 0;

    color: #6b7280;

    font-size: 14px;
}


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

.edit-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   FORMULARIOS
   ========================================================= */

.edit-form-group {
    margin-bottom: 20px;
}

.edit-form-group label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}


/* Inputs */

.edit-form-group .form-control,
.edit-form-group .form-select {
    width: 100%;

    min-height: 44px;

    padding: 10px 13px;

    background: #ffffff;

    border: 1px solid #dfe4e8;
    border-radius: 9px;

    color: #374151;

    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


/* Focus */

.edit-form-group .form-control:focus,
.edit-form-group .form-select:focus {
    border-color: #048ABF;

    box-shadow:
        0 0 0 3px rgba(4, 138, 191, .10);

    outline: none;
}


/* Textarea */

.edit-form-group textarea {
    min-height: 130px;

    resize: vertical;
}


/* Placeholder */

.edit-form-group .form-control::placeholder {
    color: #9ca3af;
}


/* Error */

.edit-form-group .is-invalid {
    border-color: #dc3545;
}

.edit-form-group .invalid-feedback {
    margin-top: 6px;

    font-size: 13px;
}


/* =========================================================
   ESTADO
   ========================================================= */

.edit-status-group {
    max-width: 520px;

    margin-bottom: 0;
}

.edit-status-group small {
    display: block;

    margin-top: 7px;

    color: #8a949e;

    font-size: 12px;
}


/* =========================================================
   IMÁGENES ACTUALES
   ========================================================= */

.existing-images-grid {
    display: flex;
    flex-wrap: wrap;

    gap: 16px;
}


/* Card individual */

.existing-img-container {
    position: relative;
}


/* Imagen */

.existing-img {
    position: relative;

    width: 145px;
    height: 145px;

    overflow: hidden;

    background: #f8fafb;

    border: 1px solid #e1e6ea;
    border-radius: 11px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}

.existing-img img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =========================================================
   BOTÓN ELIMINAR IMAGEN
   ========================================================= */

.delete-image-btn {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 30px;
    height: 30px;

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

    padding: 0;

    background: rgba(220, 53, 69, .95);

    border: 0;
    border-radius: 50%;

    color: #ffffff;

    font-size: 12px;

    cursor: pointer;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .20);

    transition:
        transform .2s ease,
        background-color .2s ease;
}

.delete-image-btn:hover {
    background: #c82333;

    transform: scale(1.08);
}


/* =========================================================
   INPUT NUEVAS IMÁGENES
   ========================================================= */

#imgs {
    cursor: pointer;
}

.edit-input-help {
    margin-top: 7px;

    color: #8a949e;

    font-size: 12px;
}


/* =========================================================
   PREVIEW NUEVAS IMÁGENES
   ========================================================= */

.new-images-preview {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 18px;
}

.new-images-preview img {
    width: 125px;
    height: 125px;

    object-fit: cover;

    background: #f8fafb;

    border: 1px solid #e1e6ea;
    border-radius: 10px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .06);
}


/* =========================================================
   ACCIONES
   ========================================================= */

.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 18px 22px;
}


/* =========================================================
   BOTONES
   ========================================================= */

.edit-btn {
    min-height: 42px;

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

    gap: 8px;

    padding: 9px 20px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


/* Cancelar */

.edit-btn-secondary {
    background: #ffffff;

    border: 1px solid #d9dfe3;

    color: #4b5563;
}

.edit-btn-secondary:hover {
    background: #f5f7f9;

    border-color: #cbd2d7;

    color: #374151;

    text-decoration: none;
}


/* Guardar */

.edit-btn-primary {
    background: #048ABF;

    border: 1px solid #048ABF;

    color: #ffffff;
}

.edit-btn-primary:hover {
    background: #037ba9;

    border-color: #037ba9;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(4, 138, 191, .20);
}

.edit-btn:active {
    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 768px) {

    .main-container {
        padding: 25px 15px 45px;
    }

    .edit-page-header h4 {
        font-size: 25px;
    }

    .edit-section {
        padding: 22px 20px;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .edit-section-header {
        align-items: flex-start;
    }

    .edit-section-icon {
        width: 40px;
        height: 40px;

        font-size: 18px;
    }

    .edit-section-header h5 {
        font-size: 17px;
    }

    .existing-img {
        width: 125px;
        height: 125px;
    }

    .edit-form-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .edit-btn {
        width: 100%;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .main-container {
        padding: 20px 10px 40px;
    }

    .edit-page-header {
        margin-bottom: 20px;
    }

    .edit-page-header h4 {
        font-size: 22px;
    }

    .edit-page-header p {
        font-size: 13px;
    }

    .edit-section {
        padding: 18px 15px;

        border-radius: 12px;
    }

    .edit-section-header {
        gap: 10px;

        margin-bottom: 20px;
    }

    .edit-section-icon {
        width: 36px;
        height: 36px;

        border-radius: 9px;

        font-size: 16px;
    }

    .edit-section-header h5 {
        font-size: 16px;
    }

    .edit-section-header p {
        font-size: 12px;
    }

    .existing-images-grid {
        gap: 10px;
    }

    .existing-img {
        width: 95px;
        height: 95px;
    }

    .delete-image-btn {
        top: 5px;
        right: 5px;

        width: 27px;
        height: 27px;

        font-size: 10px;
    }

    .new-images-preview {
        gap: 9px;
    }

    .new-images-preview img {
        width: 90px;
        height: 90px;
    }

    .edit-form-actions {
        padding: 15px;
    }

}