.main-mantenimiento {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 20px;
    padding: 20px;
    flex: 1;
    background: #E0E0E0;
    min-height: 0;
    overflow-y: auto;
}

/* SECCIÓN DEL FORMULARIO */
.formulario-section {
    background: #566c86;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.formulario-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    color: #fff;
    margin-bottom: 15px;
}

#alertContainer {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    background: #f0f0f0;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 10px;
    background: linear-gradient(135deg, #889bb0 0%, #acbfd4 100%);
    color: #15253f;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    transition: .2s ease;
}

.file-input-label:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.file-name {
    margin-top: 8px;
    color: #e0e0e0;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    word-break: break-word;
}

.preview-image {
    width: 100%;
    max-width: 120px;
    margin-top: 10px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
    font-family: 'Lato', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #889bb0 0%, #acbfd4 100%);
    color: #15253f;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn:disabled{
    opacity:.45;
    filter:grayscale(.6);
    cursor:not-allowed;
    transform:none;
    box-shadow:none;

}

/* SECCIÓN DE PRODUCTOS */
.productos-section {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.productos-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #889bb0;
    box-shadow: 0 0 0 2px rgba(136, 155, 176, 0.1);
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    flex: 1;
    overflow-y: auto;
}

.producto-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
    transition: .2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.producto-card:hover {
    border-color: #889bb0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.producto-imagen {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #f5f5f5;
    display: block;
}

.producto-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.producto-nombre {
    font-weight: 900;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
}

.producto-categoria {
    color: #889bb0;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'Lato', sans-serif;
}

.producto-precio {
    color: #023047;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
    font-family: 'Lato', sans-serif;
}

.producto-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.btn-small {
    padding: 8px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: .2s ease;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
}

.btn-edit {
    background: #889bb0;
    color: white;
}

.btn-edit:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-delete {
    background: #023047;
    color: white;
}

.btn-delete:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.sin-productos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.close-btn:hover {
    color: #333;
}

/* ALERTAS */
.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .main-mantenimiento {
        grid-template-columns: 1fr;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-mantenimiento {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }

    .formulario-section,
    .productos-section {
        padding: 15px;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .producto-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .btn{
        font-size: 12px;
        padding: 8px 10px;
    }
}
